I'm trying to solve a objective type question , came In examination. I actually don't know the right answer, and don't know how to get it , need your help. Thank you .

**Question :**
In a certain system the main memory access time is 100 ns. The cache is 10 time faster than the main memory and uses the write though protocol. If the hit ratio for read request is 0.92 and 85% of the memory requests generated by the CPU are for read, the remaining being for write; then the average time consideration both read and write requests is

a) 14.62ns 

b) 348.47ns

c) 29.62ns

d) 296.2ns

**My work ::::**

Well, memory access time = 100ns

cache access time would be = 10 ns (10 time faster)

```
In order to find avg time we have a formula

Tavg = hc+(1-h)M

   where h = hit rate
     (1-h) = miss rate
       c   = time to access information from cache
        M  = miss penalty  (time to access main memory)

```

Write through operation : cache location and main memory location is updated simultaneously.

It is given that 85% request generated by CPU is read request and 15% is write request.

```
Tavg = 0.85(avg time for read request)+ 0.15(avg time for write request)
     = 0.85(0.92*10+0.08*100)+0.15(avg time for write request)

```

//\* 0.92 is a hit ratio for read request , but hit ratio for write request is not given ??

If I assume that hit hit ratio for write request is same as hit ratio for read request then,

```
  = 0.85(0.92*10+0.08*100)+0.15(0.92*(10+100)+0.08*100)
  =31 ns

```

If I assume that hit ratio is 0% for write request then,

```
  = 0.85(0.92*10+0.08*100)+0.15(0*110+1*100)
  =29.62 ns

```