The document discusses paging in computer memory systems. Key points:
- Memory is divided into fixed-size blocks called frames, and logical memory is divided into same-sized blocks called pages.
- A page table translates logical addresses to physical frame addresses using a page number as an index and page offset.
- Demand paging only loads pages from disk into memory frames when needed, reducing I/O and memory usage compared to loading the entire process at once.
- A valid-invalid bit tracks whether each page is currently in memory or needs to be paged in from disk on the next reference.
The document discusses paging in computer memory systems. Key points:
- Memory is divided into fixed-size blocks called frames, and logical memory is divided into same-sized blocks called pages.
- A page table translates logical addresses to physical frame addresses using a page number as an index and page offset.
- Demand paging only loads pages from disk into memory frames when needed, reducing I/O and memory usage compared to loading the entire process at once.
- A valid-invalid bit tracks whether each page is currently in memory or needs to be paged in from disk on the next reference.
The document discusses paging in computer memory systems. Key points:
- Memory is divided into fixed-size blocks called frames, and logical memory is divided into same-sized blocks called pages.
- A page table translates logical addresses to physical frame addresses using a page number as an index and page offset.
- Demand paging only loads pages from disk into memory frames when needed, reducing I/O and memory usage compared to loading the entire process at once.
- A valid-invalid bit tracks whether each page is currently in memory or needs to be paged in from disk on the next reference.
Logical address space of a process can be noncontiguous; process is
allocated physical memory whenever the latter is available" Divide physical memory into fixed-sized blocks called frames (size is power of 2, between 512 bytes and 8192 bytes)" Divide logical memory into blocks of same size called pages." Keep track of all free frames To run a program of size n pages, need to find n free frames and load program Set up a page table to translate logical to physical addresses" Internal fragmentation A D D R E S S T R A N S L AT I O N ARCHITECTURE
Address Translation Scheme
■ Address generated by CPU (logical Address) is divided into: ● Page number (p) – used as an index into a page table which contains base address of each page in physical memory. ● Page offset (d) – combined with base address to define the physical memory address that is sent to the memory unit. PAGING EXAMPLE VIRTUAL MEMORY Elusion to expand memory view onto the secondary storage. Moving pages – frames between memory and HD Demand paging DEMAND PAGING Bring a page into memory only when it is needed Less I/O needed Less memory needed Faster response More users
Page is needed = reference to it
Invalid reference = abort Not-in-memory = bring to memory Transfer of a Paged Memory to Contiguous Disk Space Valid-Invalid Bit With each page table entry a valid-invalid Bit is associated (1= in memory, 0 = not-in- memory) Initially valid – invalid but is set to 0 on all entries Example of a page table snapshot: Paage Table When Some Pages Are Not in Main Memory Steps in Handling a Page Fault