Cache Behavior
A large computer has a single direct-mapped integrated cache. There are 2,097,152 frames. A line is 512 bytes. A memory address is 48 bits. Program 'P' is: 'for( j = 0; j < 350000; j++ ) { a[j] = a[j] * a[j]; }, where 'a' is an array of floating-point numbers.
a) In decimal, for this computer, complete:
tag field = _____ bits; index field = _____ bits; offset field = _____ bits
b) Program 'P' is placed at address a6e7ea5b6bd8; this is the address of the first byte of the first instruction. In hexadecimal, complete:
tag = _______; index = _______; offset = ______
c) Write the line number of P's address in mixed bin/hex representation. It's probably a bit hard to calculate it in pure hexadecimal.
d) Array 'a' is placed at address 56e7ea3b6bd8; this is the address of a[0]. In hexadecimal, complete:
tag = _______; index = _______; offset = ______
e) Program 'P' runs well for a while; then, its performance suffers greatly. Estimate the value of 'j' at which performance degrades. Explain.