edited by
9,296 views
6 votes
6 votes

A virtual memory has a page size of $\textsf{1K}$ words. There are eight pages and four blocks. The associative memory page table contains the following entries :

$\begin{array}{|c|c|} \hline  \text{Page} & \text{Block} \\\hline \text{0} & \text{3} \\ \text{2} & \text{1} \\ \text{5} & \text{2} \\ \text{7} & \text{0} \\\hline \end{array}$

Which of the following list of virtual addresses (in decimal) will not cause any page fault if referenced by the CPU?

  1. $1024, 3072, 4096, 6144$
  2. $1234, 4012, 5000, 6200$
  3. $1020, 3012, 6120, 8100$
  4. $2021, 4050, 5112, 7100$
edited by

1 Answer

6 votes
6 votes

since page size is 1k =1024 words so 

address range ( Page number) 

 0-1023           (   0 )

1024- 2047     (  1  )

2048- 3071     (   2 )

3072- 4095     (   3 )

4096- 5119     (   4 )

5120- 6143     (  5  )

6144- 7167     (   6 )

7168-  8191    (   7 )

by using above we can make string from given virtual addresses

pages already im memory are 0,2,5,7  now for no page fault to occur string must be 0,2,5,7

choice a will produce string 1,3,4,6  so page fault will occur

choice b will produce string 1,3,4,6  so page fault will occur

choice d will produce string  1,3,4,6  so page fault will occur

choice C will will produce string 0,2,5,7  hence no page fault so ans is C   

edited by
Answer:

Related questions

2 votes
2 votes
1 answer
1
go_editor asked Aug 8, 2016
2,767 views
In Unix, the login prompt can be changed by changing the contents of the file_____contrabinitgettydefsinittab
2 votes
2 votes
1 answer
3
go_editor asked Aug 8, 2016
4,773 views
Consider a disk with 16384 bytes per track having a rotation time of 16 msec and average seek time of 40 msec. What is the time in msec to read a block of 1024 bytes from...