• edited by
21,692 views
62 62 votes
The address sequence generated by tracing a particular program executing in a pure demand paging system with $100$ bytes per page is
$\text{0100, 0200, 0430, 0499, 0510, 0530, 0560, 0120, 0220, 0240, 0260, 0320, 0410.}$
 
Suppose that the memory can store only one page and if $x$ is the address which causes a page fault then the bytes from addresses $x$ to $\text{x + 99}$ are loaded on to the memory.

How many page faults will occur?

  1. $0$
  2. $4$
  3. $7$
  4. $8$

4 Answers

Best answer
88 88 votes

$0100$ - page fault, addresses till $199$ in memory

$0200$ - page fault, addresses till $299$ in memory

$0430$ - page fault, addresses till $529$ in memory

$0499$ - no page fault

$0510$ - no page fault

$0530$ - page fault, addresses till $629$ in memory

$0560$ - no page fault

$0120$ - page fault, addresses till $219$ in memory

$0220$ - page fault, addresses till $319$ in memory 

$0240$ - no page fault

$0260$ - no page fault

$0320$ - page fault, addresses till $419$ in memory 

$0410$ - no page fault

So, $7$ is the answer- (C)

• edited by
10 10 votes
Option C is correct we will get 7 page faults. since for each fault, only 100 bytes will be loaded from the faulted byte onwards. 0100 causes fault then 0100 to 0199 will be loaded. Reffering to any byte in this range will not cause any fault. But next is 0200 which is not available so it is fault will load 0200 to 0299. like that we will have total 7 faults.
1 1 vote
Consider [A-B] is range of numbers loaded on to the page or frame in Main memory. if 'A' referred B=A+99, this is given.

Loading sequences

for references 100, 200, 430, 530, 120, 220, 320 following are the contents in the page

[100-199] ==> [200-299] ==> [430-529] ==> [530-629] ==> [120-219] ==>[220-319] ==> [320-419]

 

count the transformations which is = 7
Answer:
Position:
Show:

Related questions

98 98 votes
6 answers 6 answers
38.4k
38.4k views
Ishrat Jahan asked Oct 30, 2014
38,437 views
A demand paging system takes $100$ time units to service a page fault and $300$ time units to replace a dirty page. Memory access time is $1$ time unit. The probability o...
139 139 votes
18 answers 18 answers
43.3k
43.3k views
Ishrat Jahan asked Oct 30, 2014
43,316 views
The head of a hard disk serves requests following the shortest seek time first (SSTF) policy. What is the maximum cardinality of the request set, so that the head changes...
43 43 votes
2 answers 2 answers
11.1k
11.1k views
Ishrat Jahan asked Oct 30, 2014
11,121 views
The head of a hard disk serves requests following the shortest seek time first $\textsf{(SSTF)}$ policy. The head is initially positioned at track number $180$.Which of t...
50 50 votes
6 answers 6 answers
17.6k
17.6k views
Ishrat Jahan asked Oct 30, 2014
17,556 views
Synchronization in the classical readers and writers problem can be achieved through use of semaphores. In the following incomplete code for readers-writers problem, two ...