120 likes | 131 Views
This text explains the management of memory address space and page tables in operating systems, including frame table, backing store, frame update, disk validity, and process execution.
E N D
Memory Address Space Frame Table Address Space Free Ref PID Backing Store Frame Update Disk Valid Clock Algorithm Example Process 1 PT 0 1 2 3 4 Frame Update Disk Valid Process 2 PT
Memory Frame Table 1 1 1 1 1 Free Ref PID Backing Store Start State 0 1 2 3 4
Memory Address Space Frame Table 1 1 1 1 1 Free Ref PID Backing Store Create Process 1 / Load into VM Process 1 PT ^ ^ ^ ^ 0 0 0 0 0 1 2 3 4 A B C D Frame Update Disk Valid
Memory Address Space Backing Store Load 1st Two Pages of P1 into Memory Process 1 PT 1 3 0 0 ^ ^ ^ ^ 1 1 0 0 A B 0 1 2 3 4 A B C D Frame Table 1 0 1 0 1 1 1 Frame Update Disk Valid Ref PID Free
Memory Address Space Backing Store P1 Begins Executing using Pages 0&1 Process 1 PT 1 3 0 0 ^ ^ ^ ^ 1 1 0 0 A B 0 1 2 3 4 A B C D Frame Table 1 0 1 0 1 1 1 1 1 Frame Update Disk Valid Ref PID Free
Memory Address Space Address Space Backing Store Frame Update Disk Valid Create Process 2 / Load into VM Process 1 PT 1 3 0 0 ^ ^ ^ ^ 1 1 0 0 A B 0 1 2 3 4 A B C D Frame Table 1 0 1 0 1 1 1 1 1 Frame Update Disk Valid Process 2 PT Ref PID Free D E F ^ ^ ^ 0 0 0
Memory Address Space Address Space Backing Store Frame Update Disk Valid Load 1st Two Pages of P2 into Memory Process 1 PT 1 3 0 0 ^ ^ ^ ^ 1 1 0 0 E A D B 0 1 2 3 4 A B C D Frame Table 0 0 0 0 1 0 1 0 1 2 1 2 1 Frame Update Disk Valid Process 2 PT Ref PID Free D E F 0 0 ^ ^ ^ 2 0 1 1 0
Memory Address Space Address Space Backing Store Frame Update Disk Valid P2 Begins Executing using Pages 0&1 – Update Page 1 Process 1 PT 1 3 0 0 ^ ^ ^ ^ 1 1 0 0 E A D B 0 1 2 3 4 A B C D Frame Table 0 0 0 0 1 1 1 1 1 2 1 2 1 Frame Update Disk Valid Process 2 PT Ref PID Free D E F 0 1 ^ ^ ^ 2 0 1 1 0
Memory Address Space Address Space Backing Store Frame Update Disk Valid P2 Page Fault for Page 2 – P1 Executes During Paging I/O Process 1 PT 1 3 0 0 ^ ^ ^ ^ 1 1 0 0 E A D B F 0 1 2 3 4 A B C D Frame Table 0 0 0 0 0 1 1 1 1 0 2 1 2 1 2 Frame Update Disk Valid Process 2 PT Ref PID Free D E F 0 1 0 ^ ^ ^ 2 0 4 1 1 1
Memory Address Space Address Space Backing Store Frame Update Disk Valid I/O Completion Interrupt – P2 Begins Execution - Updates Page 2 Process 1 PT 1 3 0 0 ^ ^ ^ ^ 1 1 0 0 E A D B F 0 1 2 3 4 A B C D Frame Table 0 0 0 0 0 1 1 1 1 1 2 1 2 1 2 Frame Update Disk Valid Process 2 PT Ref PID Free D E F 0 1 1 ^ ^ ^ 2 0 4 1 1 1
PT Memory 1 3 0 0 ^ ^ ^ ^ 1 1 0 0 Address Space A B C D Frame Table 0 0 0 0 0 0 1 1 1 1 2 1 2 1 2 Frame Update Disk Valid Process 2 Address Space PT Ref PID Free D E F 0 1 2 ^ ^ ^ 2 0 4 1 1 1 Backing Store 0 0 0 1 1 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 Frame Update Disk Valid Timer Interrupt – P1 Begins Execution – Page Fault for Page 2 – No Free Frames – Initiate Clock Algorithm for Page Replacement Process 1 E A D B F 0 1 2 3 4
Memory Address Space Address Space Backing Store Frame Update Disk Valid Replace Frame 0 – Must swap out to disk as updated Process 1 PT 1 3 0 0 0 0 ^ ^ ^ ^ 1 1 1 0 C A D B F 0 1 2 3 4 A B C D Frame Table 0 0 0 0 0 0 0 0 0 0 1 1 2 1 2 Frame Update Disk Valid Process 2 PT Ref PID Free D E F 0 1 2 ^ ^ ^ 2 0 4 1 0 1