Question: Assume that this program is run on a processor with a data cache of 4 0 9 6 bytes. Each block of the cache is

Assume that this program is run on a processor with a data cache of 4096 bytes. Each block of the cache is 128 bytes. Memory addresses are of 32 bits. Data in arr1 and arr2 are stored in contiguous memory locations, i.e., in a sequence as arr1[0], arr1[1],...., arr1[255], arr2[0], arr2[1],..., arr2[255].(a) How many paths does the function foo() of this program have? Describe what they are. (b) If the cache is a direct mapped cache, how many bits in a 32-bit address are used for block offset, set index and tag, respectively?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!