695 views
0 votes
0 votes
Quantify the effect on performance that results from the use of a cache in the case of a program that has a total of 500 instructions, including a 100-instruction loop that is executed 25 times. Determine the ratio of execution time without the cache to execution time with the cache. This ratio is called the speedup.
1)Program execution time is proportional to the total amount of time needed to fetch the instruction from either the main memory or the cache.With operand data access being ignored

2)Initially all instruction is stored in main memory and the cache is empty.

3)The cache is large enough to contain all loop instruction.

_________________________________________________________________

my solution is

execution time without cache is=400∗10+100∗10∗25=29000400∗10+100∗10∗25=29000

execution time with cache =500∗10+100∗1∗25=7500
My question is why we take 400 instructions instead of 500 instruction pls explain.

Please log in or register to answer this question.

Related questions

0 votes
0 votes
0 answers
4