edited by
896 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$
edited by

1 Answer

Best answer
1 votes
1 votes

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
Answer:

Related questions

2 votes
2 votes
1 answer
1
Bikram asked Dec 26, 2016
281 views
Consider the following 3 processes with 3 binary semaphores with initial values $S_{0}=0, S_{1}=0, S_{2}=1$$$ \begin{array}{|c|c|c|} \hline \textbf{P} & \textbf{Q} & \tex...
2 votes
2 votes
3 answers
2
Bikram asked Dec 26, 2016
1,113 views
In a paged memory, the page hit ratio is $0.35$. The time required to service the page fault is $100$ ns. Time required to access a page in primary memory is $10$ ns.The ...
1 votes
1 votes
1 answer
4
Bikram asked Dec 26, 2016
215 views
A counting semaphore is initialized to $10$. The $6$ P(wait) operations and $4$ V(signal) operations were completed in this semaphore. The resulting value of semaphore is...