Operating Systems · Question 13 · Hard
Operating Systems question 13
A system has 3 page frames, all initially empty. For the page reference string 4, 1, 2, 4, 5, 1, 3, 4, 2, 1, how many page faults occur with LRU page replacement?
- 8
- 6
- 10
- 9
Answer and explanation
Answer: D. 9
Explanation: 4, 1 and 2 fault, and 4 is a hit. 5 replaces 1 (the LRU page), 1 replaces 2, 3 replaces 4, 4 replaces 5, 2 replaces 1 and 1 replaces 3. The total is 3 + 6 = 9 faults. FIFO gives 8 and optimal gives 6.
Previous: A paged system has a page size of 4 KB, a logical address space of 64 pages… · Next: A TLB lookup takes 20 ns and a main-memory access takes 100 ns. On a TLB miss…
Practise operating systems
Try a fresh set of operating systems questions with an explanation after every answer, free and without signing up: Operating Systems practice. Or sit a full placement mock test.
More operating systems questions
- How many times is "Hi" printed when this C program runs? Assume every fork()…
- In which memory-management scheme does internal fragmentation occur?
- A paged system has a page size of 4 KB, a logical address space of 64 pages…
- A TLB lookup takes 20 ns and a main-memory access takes 100 ns. On a TLB miss…
- Two processes enforce mutual exclusion using only a shared variable turn…
- The Banker's algorithm is used for which deadlock-handling strategy?
- Which of the following is NOT shared between threads of the same process?
- Which page-replacement algorithm gives the lowest possible number of page…
- Belady's anomaly, where giving a process more page frames can increase its…
- In UNIX and Linux, which system call creates a new process that is a copy of…
More technical & programming practice
Computer Networks · Software Engineering · Cloud & DevOps · GenAI Basics · Pseudo-code · C Programming · Java · Python
LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge