Ticker

6/recent/ticker-posts

GATE|GATE-CS-2014 PAPER-03|Question5

 

GATE|GATE-CS-2014 PAPER-03|Question5

The memory access time is 1 nanosecond for a read operation with a hit in cache, 5 nanoseconds for a read operation with a miss in cache, 2 nanoseconds for a write operation with a hit in cache and 10 nanoseconds for a write operation with a miss in cache.Execution of a sequence of instructions involves 100 instruction fetch operations, 60 memory operand read operation and  40 memory operand write operations.The cache hit-ratio is 0.9.The average memory access time in executing the sequence of instructions  is 

Answer

Total instruction=100 instruction fetch operation+60 memory operand read operation+40 memory operand write operation=200 instruction.

Time taken for fetching 100 instructions(equivalent to read)=90%(60)*1ns+10%(60)*5ns=54ns+30ns=84ns.

Memory operands write operation time=90%(40)*2ns+10%(40)*10ns=72ns+40ns=112ns.

Total time taken for executing 200 instruction=140+84+112=336ns.

Average memory access time=336ns/200=1.68ns.



Post a Comment

0 Comments