Effective Access Time

来源:互联网 发布:淘宝退款纠纷率怎么算 编辑:程序博客网 时间:2024/06/07 00:19

 

A paging scheme uses a Translation Loo-aside Buffer (TLB) A TLB access takes 10 ns and a main memory access takes 50 ns. What is the effective access time (in ns) if the TLB hit ratio is 90% and there is no page-fault?

a) 54

b) 60

c) 65

d) 75

 

 

 

Dear student,

the correct answer is c)65

Sol: (10+50)*0.9 +(10+50+50)*0.1=65

 

 


 

Effective Memory Access Time
The percentage of times that a page number is found in the associative registers is called the hit ratio. An 80-percent hit ratio means that we find the desired page number in the associative registers 80 percents of the time. If it takes 20 nanoseconds to search the associative registers, and 100 nanoseconds to access memory, then a mapped memory access takes 120 nanoseconds when the page number is in the associative registers. If we fail to find the page number in the associative registers (20 nanoseconds), then we must first access memory for the page table and frame number (100 nanoseconds), and then access the desired byte in memory (100 nanoseconds), for a total of 220 nanoseconds. To find the effective access time, we must weigh each case by it probability:

effective access time = 0.80 * 120 + 0.20 * 220 
= 140 nanoseconds.
FROM: http://www2.cs.uregina.ca/~hamilton/courses/330/notes/memory/paging.html

Page Fault

 

  • when a process tries to access an address whose page is not currently in memory
  • process must be suspended, process leaves the processor and the ready list, status is now ``waiting for main memory''
原创粉丝点击