• retagged by
18,974 views
53 53 votes
Let the page reference and the working set window be $c\ c\ d\ b\ c\ e\ c\ e\ a\ d\ $ and $4$, respectively. The initial working set at time $t=0$ contains the pages $\{a,d,e\}$, where $a$ was referenced at time $t=0$, $d$ was referenced at time $t=-1$, and $e$ was referenced at time $t=-2$. Determine the total number of page faults and the average number of page frames used by computing the working set at each reference.

6 Answers

Best answer
79 79 votes

Window size of working set $= 4$

Initial pages in the working set window $=    \{  e, d, a\}$

$$\small \begin{array}{|c|c|c|c|}\hline \textbf{Incoming page}  &  \textbf{Time} & \textbf{Working set window} & \textbf{Hit/ Miss} & \textbf{Current window size} \\\hline  c  & 1 &  \{ e, d, a, c\} & \textbf{miss} & 4 \\\hline   c  & 2 &  \{ d, a, c\} & \text{hit} & 3 \\\hline d  & 3 &  \{ a, c,d\} & \text{hit} & 3 \\\hline b & 4 &  \{ c,d,b\} & \textbf{miss} & 3  \\\hline   c  & 5 &  \{ d, b, c\} & \text{hit} & 3 \\\hline e & 6 &  \{ d,b,c,e \} & \textbf{miss} & 4 \\\hline   c  & 7 &  \{ b, c,e\} & \text{hit} & 3 \\\hline   e & 8 &  \{c,e\} & \text{hit} & 2  \\\hline a & 9 &  \{c,e,a \} & \textbf{miss} & 3 \\\hline d & 10 &  \{c,e,a,d \} & \textbf{miss} & 4   \\\hline \end{array}$$


Total number of page faults $=\mathbf{ 5}$.

Average no. of page frames used by window set $= ( 4 + 3 + 3 + 3 + 3 + 4 + 3 + 2 + 3 + 4) / 10 = 32/10 = \mathbf{3.2}$

• edited by
8 8 votes

 

 

According to Operating system concepts ...

Thus after interval of every 4units for each page we will remove it from working set model. If page hit occurs we will update timestamp of that page,hence page which is not referenced after 4unit( in this  case) of time after its previous reference will be removed from working set .

5 5 votes
Average number of page frames => 3.2

Total Page Faults => 5
4 4 votes

The total number of page faults (Miss) = 5

Average no. of page frames used by window set = (4+3+3+3+3+4+3+2+3+4) /10

=32/10 =3.2

–3 –3 votes
Total number of page faults would be 4.  Page fault occures for the frames 1,4,6,10.

How to calculate avg number of page frames?
Answer:
Position:
Show:

Related questions

75 75 votes
9 answers 9 answers
40.4k
40.4k views
Kathleen asked Sep 13, 2014
40,375 views
The access times of the main memory and the Cache memory, in a computer system, are $500$ n sec and $50$ nsec, respectively. It is estimated that $80\%$ of the main memor...
12 12 votes
1 answers 1 answer
5.6k
5.6k views
Kathleen asked Sep 13, 2014
5,615 views
Draw the precedence graph for the concurrent program given belowS1 parbegin begin S2:S4 end; begin S3; parbegin S5; begin S6:S8 end parend end; S7 parend; S9
12 12 votes
3 answers 3 answers
6.5k
6.5k views
go_editor asked Apr 24, 2016
6,469 views
Let $S$ be the set of all integers and let $n 1$ be a fixed integer. Define for $a,b \in S, a R b$ iff $a-b$ is a multiple of $n$. Show that $R$ is an equivalence relat...
2 2 votes
0 0 answers
1.3k
1.3k views
Arjun asked Dec 19, 2015
1,277 views
Three devices $A, B$ and $C$ are connected to the bus of a computer, input/output transfers for all three devices use interrupt control. Three interrupt request lines INT...