Paging

So there are several problems we have to face in managing memory.

Remember that ideally each process wants to see its heap, for example, as a contiguous, big area of virtual memory, whereas in reality the physical memory may be fragmented and full of other processes' heaps.

Paging divides up processes' virtual memory into pages (hence the name) and divides physical memory into frames (which are the same size as pages).

Each process sees its pages as contiguous in (virtual) memory, but pages may be stored in arbitrary frames in physical memory. For example:

The diagram above shows a process with 5 pages, which are distributed through the memory frames. This is achieved through a piece of hardware called a memory management unit (MMU). It maps virtual addresses to physical addresses as the program runs, according to a page table. Each process has its own page table, so each process has its own virtual address space.

Paging is a good memory management solution to the problems mentioned above.


last updated 6 March 1998