0

In the Windows 7 operating system, when an active process is in memory and the system runs out of memory to allocate, does it deny creation of a new processes or does it use a swap file?

1 Answers1

2

This question is too ill-formed to answer as written. The closest to a direct answer I can give you is this: If the system has run out of memory to allocate, then it must have already promised available space in the swap file or it would not have run out. I think your question is coming from the misconception that the system allocates physical memory directly to processes. That is just not how modern memory management works.

Typically, the system allocates backed memory to processes. This is the total pool of physical memory plus paging file space. When it has promised all the backed memory it has, whether or not it is actually being used, the system must stop making promises. This is much the same as how you have to stop writing checks even if there's still money in your account.

The swap file is like a line of credit you can draw on to allow you to continue writing checks. Most of the time, the swap file is not actually used, it just provides a safety net to permit the system to allow virtual memory allocations to succeed.

You can find more details at this answer to a similar question.