edited by
22,807 views
54 54 votes
Assume that for a certain processor, a read request takes $50\:\text{nanoseconds}$ on a cache miss and $5\:\text{nanoseconds}$ on a cache hit. Suppose while running a program, it was observed that $80\%$ of the processor's read requests result in a cache hit. The average read access time in nanoseconds is ______.

7 Answers

Best answer
69 69 votes
Answer is: $14 \ ns$ $= 0.8(5) + 0.2(50)$

PS: Here instead of cache and main memory access times, time taken on a cache hit and miss are directly given in question. So, $$\text{Average Access Time} = \text{Hit Rate} \times \text{Hit Time} + \text{Miss Rate} \times \text{Miss Time}$$
edited by
6 6 votes

Given time to read request on a cache miss=50ns

Time to read cache Hit= 5ns

it was observed that 80% of the processor's read requests result in a cache hit. 

The average read access time will be

50*0.2+5*0.8 =>14ns

4 4 votes

$\text{Read Hit}:$ The main memory is not involved when there is a cache hit in a Read operation

$\text{Read Miss}:$ In this situation There are two cases :

  •  The block of words which containing the requested word copied from the main memory to cache and when block loaded into cache then requested word sent to the processor.
  • Requested word may be sent to the processor as soon as it reads from the main memory.

In this question time given when cache miss so no need to think about cases.

The average read access time :

Assuming there are $100$ read requests and $80\%$ of it results into cache hit and remaining cache miss so,

                                  $t_{avg} =\frac{ \frac{80}{100}\times100 \times 5ns + \frac{20}{100}\times100 \times 50ns}{100}= 14ns $

so $14ns$ should be the right answer

Reference : $\text{Hamacher Sixth Edition : P.no 290-91}$

edited by
3 3 votes

Average Memory Access Time = Cache hit ratio * Hit time + cache miss ratio * miss time 

so AMAT = 0.8(5) + 0.2 (50) 

AMAT = 4+10 = 14

Happy Learning :-)

Answer:
Position:
Show:

Related questions

78 78 votes
5 answers 5 answers
28.1k
28.1k views
go_editor asked Feb 12, 2015
28,126 views
Consider a processor with byte-addressable memory. Assume that all registers, including program counter (PC) and Program Status Word (PSW), are size of two bytes. A stack...
52 52 votes
4 answers 4 answers
17.8k
17.8k views
go_editor asked Feb 12, 2015
17,839 views
Consider the C program below#include <stdio.h int *A, stkTop; int stkFunc (int opcode, int val) { static int size=0, stkTop=0; switch (opcode) { case -1: size = val; brea...
65 65 votes
9 answers 9 answers
15.4k
15.4k views
go_editor asked Feb 12, 2015
15,425 views
Perform the following operations on the matrix $\begin{bmatrix} 3 & 4 & 45 \\ 7 & 9 & 105 \\ 13 & 2 & 195 \end{bmatrix}$Add the third row to the second rowSubtract the th...
73 73 votes
9 answers 9 answers
34.1k
34.1k views
go_editor asked Feb 12, 2015
34,128 views
A computer system implements a $40\;\text{-bit}$ virtual address, page size of $8\;\text{kilobytes}$, and a $128\text{-entry}$ translation look-aside buffer $\text{(TLB)}...