Operating Systems · Question 21 · Medium

Operating Systems question 21

A system has 3 page frames, all initially empty. For the page reference string 1, 3, 0, 3, 5, 6, 3, 1, 0, 5, 3, 6, how many page faults occur with the Optimal page-replacement algorithm?

  1. 7
  2. 6
  3. 9
  4. 10
Answer and explanation

Answer: A. 7

Explanation: 1, 3, 0 fault. 3 hits. 5 faults and replaces 0 (used farthest ahead). 6 faults and replaces 5. 3 and 1 hit. 0 faults and replaces 1 (never used again). 5 faults and replaces 0. 3 and 6 hit. Total = 7.

Previous: In UNIX and Linux, which system call creates a new process that is a copy of… · Next: Process (arrival time, burst time) in ms: P1 (0, 7), P2 (2, 4), P3 (4, 1), P4…

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

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