in Operating System edited by
453 views
1 vote
1 vote
The address sequence generated by tracing a particular program, executing in a pure demand paging system with $100$ records per page, with $1$ free main memory frame is recorded as follows: $560,\  540, \ 430, \ 390, \ 350, \ 450, \ 102, \ 198, \ 754, \ 785$. The page fault rate is _______
in Operating System edited by
by
453 views

2 Comments

560 -> PF -> 560-659 in memory

540 -> PF -> 540-639 in memory

430 -> PF -> 430-529 in memory

390 -> PF -> 390-489 in memory

350 -> PF -> 350-449 in memory

450 -> PF -> 450-549 in memory

102 -> PF -> 102-201 in memory

198 -> Hit

754 -> PF -> 754-853 in memory

785 -> Hit

Second approach:
Frame: 560, 430, 390, 450, 102, 754
PF: 6

Which one to follow??
0
0

The records(data) of a process already exist in pages. If we need to access a record, we'll have to fetch that whole page — and not carve out a page of our own taking the record number as the location for starting address.

Using this knowledge, required page sequence will be: 6,6,5,4,4,5,2,2,8,8.

So, Page Faults = 6.

And page fault rate = 6/10.

0
0

1 Answer

0 votes
0 votes
Best answer
Take like 0,1,2,3,4,5,6,7,8,9
according to question it contain 100 pages, so page no. 0 contain 0-99, page no 2 have 100-199 and so on.

Now just check require page and  don't count repeated page twice.

Hence Page fault rate = 6 /10 =0.6
selected by

4 Comments

@saxena

yes ,

we have to rely on fact that a page has a serial order .

So when there is a page fault occur of any mid value say X34 we ultimately get the complete record of X00-X99  ... yes correct assumption.
1
1
how you took total 10 pages..??
0
0

@shubham shukla 5 

see the question please , it gave total 10 pages ..

0
0
Answer:

Related questions