Question: (a) (3 points) Consider a program P, which contains two different loops, Loop-A and Loop-B. When a user runs P, on a processor, Loop-A iterates

(a) (3 points) Consider a program P, which contains two different loops, Loop-A and Loop-B. When a user runs P, on a processor, Loop-A iterates 10 times and each Loop-A iteration has 5 instructions. In comparison, Loop-B iterates only twice but each Loop-B iteration has 25 instructions. Thus, both Loop-A and Loop-B execute the same total number of instructions (50). Which of the two loops do you expect to have more instruction cache hits? Why? (b) (3 points) The cache block size in many computers is in the range of 32 to 128 bytes. What would be the main advantages and disadvantages of making the size of cache blocks larger or smaller
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
