retagged by
3,372 views
2 2 votes
The access time of cache memory is $10$ $ns$ and main memory is $100$ $ns$. It is estimated that $80 \%$ of memory requests are for read and remaining are for write. The hit ratio for read access only is $0.9$. A write through procedure is used. Pages are always available in cache for write operation. Then, the average access time is ______ $ns$.

2 Answers

Best answer
11 11 votes

For hierarchical access and write-through:

Tread = H ×Tcache+ (1−H) × ( Tcache + Tmemory_block )

= hit ratio * hit time + Miss ratio * miss time

H = 0.9  [ given ]

1-H = 0.1

[ given = hit ratio for read access only is 0.9 , cache access time , Tcache = 10 ns ]

= 0.9 * 10 + 0.1 * 110 [ as it is hierarchical access , in case of cache miss we need to take cache access time + memory access time , that's why it is 100 + 10 = 110]

it is given in the question 80% of memory requests are for read ,

so for read it is 0.8 * ( T read )

and 20 % is for write, in write through it use write no allocate hence only Main Memory access time will be counted , for write it is 0.2 * 100 ..

hence total access time will be :

0.8 [0.9 * 10 ns + 0.1 * 110 ns] + 0.2 [ 100 ns]

= 36 ns

Reference: https://gateoverflow.in/14480/formula-write-back-write-through-access-time-parallel-serial

selected by
4 4 votes

Write Through Method: 

Write through is a storage method in which data is written into the cache and the corresponding main memory location at the same time. The cached data allows for fast retrieval on demand, while the same data in main memory ensures that nothing will get lost if a crash, power failure, or other system disruption occurs.

80%- requests for Read and 20%- requests for Write

So, according to definition we have to count (memory+cache) only for Read requests while for Write requests we just need to count (Main Memory)

0.80 [ (0.90) {hit ratio for cache} (10 ns) + (0.1) (100+10 ns) ] + 0.20(100 ns) = 36 ns

P.S. 

Doubt-1: Why we taken Main Memory access time for Write Operaion instead of Taking 'Cache'

Doubt-2: What if here 80% Read Request not given?

Solutuion: (0.90) {hit ratio for cache} (10 ns) + (0.1) (100+10 ns) ???

Doubt-3: If they don't specify about method what we have to consider Strict Hierarchy or Simple one?

Doubt-4: What if here 'Write through' method was not used?

Answer:
Position:
Show:

Related questions

2 2 votes
3 answers 3 answers
1.7k
1.7k views
Bikram asked Jan 16, 2017
1,696 views
A computer has a cache, main memory, and a disk used for virtual memory. If a referenced word is in the cache, $10$ $ns$ are required to access it. If it is main memory b...
0 0 votes
1 answers 1 answer
2.8k
2.8k views
Bikram asked Jan 16, 2017
2,840 views
A pipeline system has $4$ stages and each stage takes $10ns$.$30\%$ instructions are branch-instructions and branch-instruction introduce a delay of $3$ stall cycles. The...
4 4 votes
1 answers 1 answer
2.1k
2.1k views
Bikram asked Jan 16, 2017
2,081 views
A computer uses a memory unit with $512K$ words of $64$ bits each. A binary instruction code is stored in one word of memory. The instruction has four parts: an indirect ...
4 4 votes
3 answers 3 answers
3.2k
3.2k views
Bikram asked Jan 16, 2017
3,201 views
Consider two machines, machine $A$ and machine $B$. Machine $B$ runs floating-point instructions $n$ times faster than machine $A$.Consider a program that takes $100$ $se...