Presentation is loading. Please wait.

Presentation is loading. Please wait.

Paging Memory Relocation and Fragmentation Paging

Similar presentations


Presentation on theme: "Paging Memory Relocation and Fragmentation Paging"— Presentation transcript:

1 Paging Memory Relocation and Fragmentation Paging
CSCE 410/611 Paging Memory Relocation and Fragmentation Paging The Memory-Lookup process in hardware Paging and Internal Fragmentation Paging

2 Observation: Naïve relocation causes (external) fragmentation.
CSCE 410/611 Paging Observation: Naïve relocation causes (external) fragmentation. simple relocation Memory Management Unit limit register relocation register ? < + logical memory physical memory Paging

3 Solution: Partition memory into equal-size portions.
CSCE 410/611 Paging Solution: Partition memory into equal-size portions. Memory Management Unit < + < + < + < + logical memory physical memory Paging

4 Paging in Hardware CPU page table p d f d p f f logical memory
CSCE 410/611 Paging in Hardware Memory Management Unit page number offset CPU logical addr p d phys. addr f d p f f page table logical memory physical memory Paging

5 Paging Address Resolution: Example
CSCE 410/611 Paging Address Resolution: Example Example: PDP-11 (16-bit addresses, page size 8kB => 64kB address space, with 8 pages) Memory Management Unit CPU 000 011 011 F0 F1 F2 F3 F4 F5 F6 F7 F8 page table ... logical memory physical memory Paging

6 Paging Address Resolution: Example 2
CSCE 410/611 Paging Address Resolution: Example 2 Example: PDP-11 (16-bit addresses, page size 8kB => 64kB address space, with 8 pages) Memory Management Unit CPU 010 101 F0 F1 F2 101 F3 F4 F5 F6 F7 F8 page table ... logical memory physical memory Paging

7 Internal Fragmentation in Paging
CSCE 410/611 Internal Fragmentation in Paging page size 4kB 3 * 4096 + 1012 Bytes logical memory 13300 Byte 3084 bytes wasted! physical memory Observation: Last frame may not be completely full. General Rule: Average internal fragmentation per block is typically half frame size. Q: Frames: large or small?! Large frames cause more fragmentation. Small frames cause more overhead (page table size, disk I/O) Paging

8 Paging: Summary Paging eliminates External Fragmentation
CSCE 410/611 Paging: Summary Paging eliminates External Fragmentation The Memory-Lookup process in the MMU Paging allows for large address spaces Paging does not completely eliminate Internal Fragmentation Paging


Download ppt "Paging Memory Relocation and Fragmentation Paging"

Similar presentations


Ads by Google