1 / 15

Memory Management

Memory Management. Basic Memory Management. Monoprogramming Protection Swapping Overlaying. User space. OS space. Multiprogramming with Fixed Partitions. Placement External Fragmentation Protection Relocation. Variable Partition Allocation. Protection Relocation Compaction

fergus
Download Presentation

Memory Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Memory Management

  2. Basic Memory Management • Monoprogramming • Protection • Swapping • Overlaying User space OS space

  3. Multiprogramming with Fixed Partitions • Placement • External Fragmentation • Protection • Relocation

  4. Variable Partition Allocation • Protection • Relocation • Compaction • Placement Strategies • First fit • Next fit • Best fit • Worst fit • Quick fit Free Allocated Free Allocated Allocated

  5. Variable Partition Allocation • Memory Management with Bitmaps • Memory Management with Linked Lists 1 1 0 0 0 1 1 1 0 0 0 0 1 1 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 0 1 1 1 P/H Starts Length Ptr

  6. Virtual Memory • Memory Hierarchy • Address Space • Run-time Memory • Logical Blocks - Segments • Physical Blocks - Pages Primary memory Secondary memory

  7. Virtual Memory SM • Paging • Fixed size blocks • 2-dim address • Mapping and address translation • Virtual to Physical • (v.page no., byte no.) (p.page no., byte no.) PM Page no. Byte no.

  8. Virtual Memory • Page Tables • Logically one per process • No. of rows equal no. of pages • No. of columns determined by no. of entries (data fields per page) • L/NL, M/NM, Page no., SSA, etc. • Address translation • Active PT, MMU, PTAR

  9. Virtual Memory • Address translation • Active PT, MMU, PTAR 4000 PTAR VA: (2, 596) PT 4000 + 2 PA: (128, 596)

  10. Virtual Memory • Protection • Demand Paging • Page Faults • Expensive overhead • Prepaging • TLB – Translation LookasideBuffer • Cache of high-demand pages

  11. Page Replacement Algorithms • The Optimal Page Replacement Algorithm • Least Recently Used • Least Frequently Used • First In First Out – FIFO

  12. Page Replacement Algorithms • Second Chance • Check “referenced” bit • Clock • Circular list with “referenced” bit • Not Recently Used • Check “referenced” and “modified” bits • 4 classes of pages • The Working Set • The WSClock

  13. Design and Implementation Issues • Page size • Separate Instruction and Data Spaces • Shared Pages • Local versus Global Allocation • Page Fault Handling • Locking Pages in Memory

  14. Segmentation • Process divided into logical blocks – segments • 2 dim addressing (s.no., byte no) – virtual address • Segment Map Table (SMT) is required • Variable partition allocation • Address Translation • VA: (s.no., byte) PA: (partition begin addr., byte) • SMTAR Active SMT

  15. Segmentation with Paging • Process divided into segments • Segments divided into pages • Memory allocated as pages • VA: (s.no., page no., byte) PA: (page frame no., byte)

More Related