in Operating System edited by
897 views
0 votes
0 votes

A certain computer provides its users with a virtual-memory space of $2^{32}$ bytes. The computer has $2^{18}$ bytes of physical memory. The virtual memory is implemented by paging, and the page size is $4,096$ bytes or $4K$ bytes.  A user process generates the virtual address $11123456$ ( in Base $16$). What is displacement (page offset) in the page?

  1. $0001 \ 0001 \ 0001$
  2. $0001 \ 0001 \ 0001 \ 0010 \ 0011$
  3. $0010 \ 0011 \ 0100 \ 0101 \ 0110$
  4. $0100 \ 0101 \ 0110$
in Operating System edited by
by
897 views

1 Answer

1 vote
1 vote
Best answer

The user process generated a virtual address in binary form is

             0001   0001   0001   0010   0011  0100   0101  0110

                1         1       1        2        3        4          5      6 

$$\begin{array}{|c|c|c|} \hline 0001 & 0001 & 0001 & 0010 & 0011 & 0100 & 0101 & 0110 \\ \hline 1 & 1 & 1 & 2 & 3 & 4 & 5 & 6 \\ \hline  \end{array}$$

Now it is given  the page size is $2^{12}$ , 

we take lower order 12 bits  from above binary form of virtual address,  that is  0100  0101  0110 are used as the displacement into the page .

The page table size is $2^{20}$, so remaining 20 bits ( 0001 0001  0001 0010  0011 ) are used as the displacement in the page table

edited by

4 Comments

@Bikram Sir, Here displacement means the page no in this virtual address ?
0
0
sir its not clear in the ques that the virtual address given is in what format? Your explanation matches only it in hexadecimal format..
0
0

parulk  

When processor generate address it generate in Hexadecimal , we assume it .. but you are correct it need to mention , i add that info now.

Thanks.

saxena0612

Displacement means  page offset .

1
1
Answer:

Related questions