edited by
1,193 views
2 votes
2 votes

Suppose the page table for the process currently executing looks like the following.

All numbers are decimal, everything is numbered starting from zero, and all addresses are memory byte addresses. The page size is $1024$ bytes.

$\begin{array}{|c|c|c|c|c|} \hline \text{Virtual } & \text{Valid} & \text{Reference} & \text{Modify} & \text{Page} \\ \text{Page no} & \text{Bit} & \text{Bit} & \text{Bit} & \text{Frame No} \\ \hline 0 & 1 & 1 & 0 & 4 \\ \hline 1 & 1 & 1& 1 & 7 \\ \hline 2 & 0 & 0 & 0 & \text{BLANK} \\ \hline 3 & 1 & 0 & 0 & 2 \\ \hline 4 & 0 & 0 & 0 & \text{BLANK} \\ \hline 5 & 1 & 0 & 1 & 0 \\ \hline \end{array}$

What physical address, if any, would each of the following Virtual addresses correspond to?  (Do not try to handle page faults, if any)

  1. $1052$
  2. $2221$
  3. $5499$  respectively.
  1. $1052$,  $2221$, $5499$
  2. $7196$,   -------- ,   $379$
  3. $7196$,   --------- , $5120$
  4. -------,   $2221$,   --------
edited by

3 Answers

Best answer
7 votes
7 votes
(i)1052 = 1024 + 28 maps to VPN 1 in PFN 7 (7 * 1024 + 28 = 7196)    so it is 7196

1052/1024 = 1 and remainder is 28 ,

this 1 is VPN which maps to PFN 7 . so 7 * 1024 + 28 = 7196

ii)  2221 = 2 * 1024 + 173 maps to VPN 2,   page fault ,     this have page fault so blank

(iii)   5499 = 5 * 1024 + 379 maps to VPN 5 in PFN 0  (0 * 1024 + 379 = 379 )  it is 379

5499/ 1024 = 5 , this 5 is VPN 5 which maps to PFN 0

 so (0 * 1024 + 379) ( where 379 is remainder when devide 5499 / 1024 )
selected by
0 votes
0 votes
not getting question ?
0 votes
0 votes

 

All numbers are decimal, everything is numbered starting from zero, and all addresses are memory byte addresses. The page size is 10241024 bytes.

  • 1052

1052th address would be in second page => Page Number 1 => Frame Number 7.

 

  • 2221

2221th address would be in third page => Page Number 2 => Absent.

 

  • 5499

5499th adress would be in sixth page => Page Number 5 => Frame Number 0.

 

Clearly, Option B

Answer:

Related questions

2 votes
2 votes
1 answer
1
Bikram asked Dec 26, 2016
264 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,051 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
203 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...