What is paging?
Paging is static memory allocation technique that permits the physical address space of a process to be non contiguous. The technique of mapping CPU generated logical address to physical address is called as paging.
The paging will implemented in the hardware level.
If logical address is same as physical address then no hardware support of paging is required.
Frame (Physical Page or Page Frame): A frame is a unit of physical memory. Physical memory is divided into blocks of same size called frames.
Page (Virtual page or Logical page): A page is a unit of logical memory of a program. Logical memory is divided into blocks of same size called pages.
When a new process arrives, its size (in pages) is determined. If the process has n pages in logical memory then n frames must be available in the physical memory.
What is Segmentation?
Paging does not follow user’s view of memory allocation. To achieve user’s view of memory allocation, segmentation is used.
Instead of dividing memory into equal-sized pages, virtual address space is divided into variable-length segments. Segments are variable-length modules of a program that correspond to logical units of the program.
What is Demand Paging?
Load a page into memory only when it is needed (when it is referenced). The virtual memory manager swaps in a page of an executing process whenever the execution of a process references a page that is not in physical memory. Any unused page in physical memory will normally be swapped out to disk.
<< Previous | Next >>
Must Read: What is an operating system and its types?