So there is physical and virtual memory. Let's say we have 10 MB physical and 10 MB virtual.

There is also paging. As far as I get it, paging basically splits physical and virtual memory into slots of the same size. Such slots are called frames. So if we use slots of 1 MB, we will have 10 frames in physical memory and 10 in virtual memory.

A process requires memory, and all such memory must be located in the physical side. If we load a process that needs 5 MB, then 5 frames in the physical side will be claimed for it.

If the process requires 15MB, then... 10 frames in physical memory are claimed, and 5 in virtual? But the process needs ALL its memory in the physical side, right? So the first question is:

  • Does this mean that a process that needs 15 MB cannot run on our machine, since only 10 MB fit in the physical side?

Alright. Let's say we have two processes. Each needs 8 MB. 8 frames in the physical side will be claimed for the first process, and 2 frames for the second. Then 6 frames in the virtual side will be claimed for the second.

Only one process can run at a time, so when it is the second process' turn, it needs to retrieve its 6 frames from the virtual side to the physical side. This will cause 6 frames of the first process to move from the physical side to the virtual. Is this correct?

Related posts

Recent Viewed