edited by
63,687 views
129 votes
129 votes

Consider a system with a two-level paging scheme in which a regular memory access takes $150$ $nanoseconds$, and servicing a page fault takes $8$ $milliseconds$. An average instruction takes $100$ nanoseconds of CPU time, and two memory accesses. The TLB hit ratio is $90$%, and the page fault rate is one in every $10,000$ instructions. What is the effective average instruction execution time?

  1. $\text{645 nanoseconds}$
  2. $\text{1050 nanoseconds}$
  3. $\text{1215 nanoseconds}$
  4. $\text{1230 nanoseconds}$
edited by

19 Answers

0 votes
0 votes

Note : Page fault rate is given instruction wise and not page wise. You have to really be careful of these keywords.

To execute an instruction, you will need 100 cpu time, 2 memory access average time and average instruction wise page fault time. (I’m not saying this, this is given in the question itself, so now we just need to add these 3 terms)

Instruction execution time (Avg) = 100 + 2EAT + EPFT

EAT : TLB access time and Memory access time we’re going to need anyhow, so the extra time that we need will be when TLB fails(2 page table access time)

EAT = 150 + 0.1( 2*150 ) = 180 ns

EPFT : 1/10^4 * 8 * 10^6 = 800 ns

Done ! 

100 + 360 + 800 = 1260 ns ! 

 

 

0 votes
0 votes
Effective average instruction execution time = cpu time for a instruction + avg page fault service time + effective memory access time

 

Here per instruction cpu time is 100 ns.

Average page fault service time is 8*10^6/10000 = 800ns  (: 10^6 is for convert ms to ns)

Effective memory access time is 0.90*150+0.10*3*150 = 180 ns

Now effective average instruction execution time is 100+800+2(180) = 1260ns    (: effective memory access time is multiplied by 2 because it is given in question that average instruction take two memory access)

: Ans is 1260 ns
Answer:

Related questions

66 votes
66 votes
9 answers
17
Kathleen asked Sep 18, 2014
23,861 views
The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined bythe instruction set architecturepage sizenum...
59 votes
59 votes
4 answers
18
go_editor asked Apr 24, 2016
19,651 views
Consider the following program segment for a hypothetical CPU having three user registers $R_1, R_2$ and $R_3.$\begin{array}{|l|l|c|} \hline \text {Instruction} & \text...
35 votes
35 votes
3 answers
19
52 votes
52 votes
10 answers
20