2,103 views
2 votes
2 votes
Consider a system with a two level paging scheme in which a regular memory access takes 150 ns, and servicing a page fault takes 8 ms. An average instruction takes 100 ns 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?

a) 645 ns

b) 1050 ns

c) 1215 ns

d) 1230 ns

3 Answers

2 votes
2 votes

Given-

  • Number of levels of page table = 2
  • Main memory access time = 150 ns
  • Page fault service time = 8 msec
  • Average instruction takes 100 ns of CPU time and 2 memory accesses
  • TLB Hit ratio = 90% = 0.9
  • Page fault rate = 1 / 104 = 10-4

 

Assume TLB access time = 0 since it is not given in the question.

Also, TLB access time is much less as compared to the memory access time.

 

Effective Access Time Without Page Fault-

Effective memory access time without page fault

= 0.9 x { 0 + 150 ns } + 0.1 x { 0 + (2+1) x 150 ns }

= { 0.9 x 150 ns } + { 0.1 x 450 ns }

= 135 ns + 45 ns

= 180 ns

Effective Access Time With Page Fault-

Effective access time with page fault

= 10^-4 x { 180 ns + 8 msec } + (1 – 10^-4) x 180 ns

= 8 x 10^-4 msec + 180 ns

= 8 x 10^-7 sec + 180 ns

= 800 ns + 180 ns

= 980 ns

Effective Average Instruction Execution Time-

Effective Average Instruction Execution Time

= 100 ns + 2 x Effective memory access time with page fault

= 100 ns + 2 x 980 ns

= 100 ns + 1960 ns

= 2060 ns

resource- gatevidyalya

edited by
1 votes
1 votes

Here's mine,

Hence answer will be d) 1230 ns

0 votes
0 votes
answer is a- 645, your half approach is correct this helped a lot, thanks

Emat= tlb-hit(mat)+tlb-miss(page-fault*ps+ no page-fault*k*mat)

where, k= level of page.=2
mat= mem. acc. time=150
ps= page service=8
put the values.

now Eeit= 100+2*Emat

Related questions

6 votes
6 votes
3 answers
1
Cruise Device asked Jan 26, 2016
3,566 views
Which page replacement policy sometimes leads to more page faults when size of memory is increased?A] OptimalB] LRUC] FIFOD] None of these.
0 votes
0 votes
1 answer
2
Cruise Device asked Jan 26, 2016
2,467 views
Match the pairs in the following questionPair - 1A. Virtual MemoryB. Shared MemoryC. Look-ahead bufferD. Look-aside bufferPair - 2P. Temporal localityQ. Spatial localityR...
2 votes
2 votes
1 answer
3
3lurryface asked Jan 9, 2019
1,112 views
If there is 2 or more level paging for processes, is it possible to have more than 1 page fault while accessing any single addressable unit(byte or word) ?
0 votes
0 votes
0 answers
4
SSR17 asked Feb 8
212 views
we have 8 pages (each side 32B) to store in physical memory of 2^32 bits how many bits are required to identify each page , according to me 3 bits are required but that i...