edited by
5,412 views
4 votes
4 votes

Given reference to the following pages by a program

0,9,0,1,8,1,8,7,8,7,1,2,8,2,7,8,2,3,8,3

How many page faults will occur if the program has three page frames available to it and uses an optimal replacement?

  1. 7
  2. 8
  3. 9
  4. None of the above
edited by

2 Answers

Best answer
5 votes
5 votes

   0     9   0    1     8     1    8    7     8    7    1     2     8    2     7    8     2    3     8    3  

      1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2
  9 9 9 9 9 9 7 7 7 7 7 7 7 7 7 7 3 3 3
0 0 0 0 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8

F    F    H    F    F    H     H    F   H     H    F    H   H    H    H    H    H    F    H    H

so total no. of page fault = 7

edited by
Answer:

Related questions

7 votes
7 votes
2 answers
1
sh!va asked May 7, 2017
6,411 views
Which of the following statement is true?Hard real time OS has less jitter than soft real time OSHard real time OS has more jitter than soft real time OSHard real time OS...
5 votes
5 votes
1 answer
2
sh!va asked May 7, 2017
7,447 views
The Linux command mknod myfifo b 4 16will create a character device if user is rootwill create a named pipe FIFO if user is rootwill create a block device if user is root...
6 votes
6 votes
4 answers
3
sh!va asked May 7, 2017
5,454 views
A critical regionis a piece of code which only one process executes at a timeis a region prone to deadlockis a piece of code which only a finite number of processes execu...