in CO and Architecture retagged by
838 views
1 vote
1 vote

Consider a computer system in which cache memory write hit takes 5ns and and miss takes 80ns. Cache memory read hit takes 2ns and miss takes 40ns. The cache is having 95% hit. The system received 1000 instructions out of which, 700 operand fetch operations and 300 operand write operations. The average time taken to execute above 1000 instructions is___________?

 

 

what should be the Average access time for read operation(Tread) = 2+ (1-h1)*40 = 2 + (0.05)*4   OR   h1*2+ (1-h1)*40 =0.95*2+(0.05)*40 ?

in CO and Architecture retagged by
838 views

11 Comments

@Shaik Masthan pls clear this doubt as in solution  of question hit % is not multiplied with the cache.

I am asking only for 1 instruction... later it should be multiplied by 700 and  avg write access with 300

 

0
0

i think it should be  h1*2+ (1-h1)*40 =0.95*2+(0.05)*40, i mean h1 should be multiplied.

0
0
0
0

@Shaik Masthan if it is not clearly stated then how do we know that whether the access time of the cache hit is included in the cache miss that in this case for cache miss do we have to take  80ns or 85ns? Please clarify it..

0
0

hit takes means, howmuch time it requires on hit

miss takes means, howmuch time it requires on miss

So if you are using either sequential or simultaneous, hit(hit time) + miss(miss time)

miss penalty means, howmuch time it requires extra

https://gateoverflow.in/28222/madeeasy-test-series?show=291981#c291981

1
1
0
0

@Shaik Masthan so answer should be 

  700*((0.95*2)+(0.05*40)) +  300*((0.95*5)+(0.05*80)). ??

0
0

but the ans given is: 700*(2+(0.05*40)) +  300*(5+(0.05*80))....

so does that mean we have to go by hierarchial access only if not specified?

0
0
edited by

@Shaik Masthan

Please check this ..correct if wrong

Assuming cache is WRITE BACK

Tread = Hread(Trh) + (1-Hread)(Trm) = (0.95)(2) + (0.05)(40) = 1.9 + 2 = 3.9ns

Twrite = Hwrite(Twh) + (1-Hwrite)(Twm) = (0.95)(5) + (0.05)(80) = 4.75 + 4 = 8.75ns

1000 instructions ==> 700 operand fetch and 300 operand write

what is operand write ? will it take Twrite or Tread + Twrite ?? I assume  1Operand write =Twrite

Hence total Read = 700

Total write = 300

Total time for 1000 instructions = 700(3.9) + 300(8.75) =  5355ns

THIS IS NOT ASKED IN QUES

AVG TIME ASKED NOT TOTAL

hence Avg time for 1000 instructions = Total time for 1000 ins / Total number of instructions = 5355 /1000 = 5.355 ns

1
1
operand write means, just we have to write in that memory
0
0
Okkk..rest part is OK ??
1
1

Please log in or register to answer this question.

Related questions