Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Basic Memory Management Monoprogramming Protection Swapping Overlaying OS space User space."— Presentation transcript:

1

2 Basic Memory Management Monoprogramming Protection Swapping Overlaying OS space User 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

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/HStartsLengthPtr

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

7 Virtual Memory 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 SM 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 L/ NL M/ NM Page no. SSA 11200xxx 0yyy 10128zzz 4000 PTAR VA: (2, 596) PA: (128, 596) PT 4000 + 2

10 Virtual Memory Protection Demand Paging Page Faults Expensive overhead Prepaging TLB – Translation Lookaside Buffer 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)


Download ppt "Basic Memory Management Monoprogramming Protection Swapping Overlaying OS space User space."

Similar presentations


Ads by Google