Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Memory Allocation (Please explain why u chose the answer) 7. In a virtual mem

ID: 656391 • Letter: 1

Question

1. Memory Allocation (Please explain why u chose the answer)

7. In a virtual memory system with 5 physical pages and the following page reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 4, 7, 6, 3, 2, 1, 2, 3, 6 How many page faults will occur if FIFO replacement policy is used? Don't forget that each time a new page enters memory for the first time it is a page fault (a) 6 (b) 7 (c) 8 (d) 9 (e) 10 8. In a virtual memory system with 5 physical pages and the following page reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 4, 7, 6, 3, 2, 1, 2, 3, 6 How many page faults will occur if LRU replacement policy is used? (Don't forget that each time a new page enters memory for the first time it is a page fault.) (a) 6 (b) 7 (c) 8 (d) 9 (e) 10 9. In a virtual memory system with 5 physical pages and the following page reference string: 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 4, 7, 6, 3, 2, 1, 2, 3, 6 How many page faults will occur if optimal replacement policy is used? Don't forget that each time a new page enters memory for the first time it is a page fault (a) 6 (b) 7 (c) 8 (d) 9 (e) 10

Explanation / Answer

page fault= 10(for fifo)(for 1, 2, 3,4,5,6,1,2,7,3) [On a page fault, the frame that has been in memory the longest is replaced.]

page fault for lru=9(1,2,3,4,5,6,7,3,1) [On a page fault, the frame that was least recently used in replaced.]

page fault for optimal =7(1,2,3,4,5,6,7) [It looks forward in time to see which frame to replace on a page fault.]