Question

In: Computer Science

11. (12 pts) Consider a system with 32-bit addresses and a 16KB 8-way set-associative cache. Each...

11. (12 pts) Consider a system with 32-bit addresses and a 16KB 8-way set-associative cache. Each cache line contains 64 bytes.

(a) How many bits of an address are used for the offset in this cache?

(b) How many bits of an address are used for the index in this cache?

(c) How many bits of an address are used in the tag for this cache?

(d) What is the value of the tag for 0x000d6ae2?

(e) What is the value of the index for 0x000d6ae2?

(f) What is the value of the offset for 0x000d6ae2?

Solutions

Expert Solution

Solution:

(11)

Given,

=>Address size = 32 bits

=>Cache size = 16 KB

=>8-way set associative cache

=>Line size = 64 B

(a)

Explanation:

Set associative cache:

Tag Set index Block offset

Calculating number of bits for block offset:

=>Number of bits required for block offset = log2(line size in bytes)

=>Number of bits required for block offset = log2(64)

=>Number of bits required for block offset = 6 bits

(b)

Explanation:

Calculating number of bits for set index:

=>Number of lines in the cache = cache size/line size

=>Number of lines in the cache = 16 KB/64 B

=>Number of lines in the cache = 2^4*2^10 B/2^6 B as 1 KB = 2^10 B

=>Number of lines in the cache = 2^14 B/2^6 B

=>Number of lines in the cache = 2^8 lines

=>Number of lines in the cache = 256 lines

=>Number of sets in the cache = number of lines/N-way

=>Number of sets in the cache = 256/8

=>Number of sets in the cache = 32 sets

=>Number of bits required for set index = log2(number of sets)

=>Number of bits required for set index = log2(32)

=>Number of bits required for set index = 5 bits

(c)

Explanation:

Calculating number of bits for tag:

=>Number of bits for tag = total address bits - set index bits - block offset bits

=>Number of bits for tag = 32 bits - 5 bits - 6 bits

=>Number of bits for tag = 21 bits

(d)

Given,

=>Address = 0x000d6ae2

Explanation:

Calculating value of tag:

=>Address = 0x000d6ae2 in hexadecimal

=>Address = 0000 0000 0000 1101 0110 1010 1110 0010 in binary

=>Tag bits = 0 0000 0000 0001 1010 1101

=>Tag bits = 0000 0000 0000 0001 1010 1101

=>Tag value in hexadecimal = 0x0001ad

(e)

Explanation:

Calcualting value of index:

=>Address = 0000 0000 0000 1101 0110 1010 1110 0010 in binary

=>Index bits = 01011

=>Index bits = 0000 1011

=>Index value in hexadecimal = 0x0b

(f)

Explanation:

Calculating value of offset:

=>Address = 0000 0000 0000 1101 0110 1010 1110 0010 in binary

=>Offset bits = 10 0010

=>Offset bits = 0010 0010

=>Offset value in hexadecimal = 0x22

I have explained each and every part with the help fo statements attached to it.


Related Solutions

Consider a 4-way set-associative cache, 4 rows, a line size of 128 bytes and a write-back...
Consider a 4-way set-associative cache, 4 rows, a line size of 128 bytes and a write-back policy. The following requests are made to memory: Load: 0b0011111001000101 Load: 0b1000111110110100 Load: 0b0110101111110100 Store: 0b0010110000000110 Store: 0b1111001001110101 Store: 0b1110000111000001 Load: 0b0000000010100110 Load: 0b0101001001001101 Assuming the machine is in cold-start, profile the contents to the cache after all of the requests have been made. State any assumption you make (if needed).
5. Given the data set A = {9, 5, 16, 4, 32, 8, 12, 9, 11,...
5. Given the data set A = {9, 5, 16, 4, 32, 8, 12, 9, 11, 15, 5, 9, 18, 10}, which is the data of an entire population of subjects: a. Calculate the arithmetic mean (5 pts) b. Find the median (5 pts) c. Find the mode (5 pts) d. Calculate the range (5 pts) e. Calculate the interquartile range (5 pts) f. Calculate the mean deviation (5 pts) g. Calculate the variance (5 pts) h. Calculate the standard...
A computer uses direct-mapped cache with four16-bit words, and each word has an associ-ated13-bit tag. Consider...
A computer uses direct-mapped cache with four16-bit words, and each word has an associ-ated13-bit tag. Consider the following loop (three instructions) in a program. Before the loop,the values in registersR0,R1,R2are 0, 054E, and 2 respectively. Consider that instructions arealready in separate cache memory. (See Table1.)The loop starts at location LOOP=02EC.LOOPAdd(R1)+,R0;DCRR2; BR>0LOOPShow the content of cache at the end of each pass of this loop if direct mapping cache is used.Compute hit rate.
443 Consider the data set: 8 4 3 6 17 15 13 7 21 11 32...
443 Consider the data set: 8 4 3 6 17 15 13 7 21 11 32 1 1. 1.What is the percentile rank of xi = 21? 2. What is the value corresponding to the 61th percentile, P61? 3. Find outliers, if exist.
6a) (6 pts. each) Find the decimal represented by the 32-bit single precision floating point number...
6a) (6 pts. each) Find the decimal represented by the 32-bit single precision floating point number for the hexadecimal value C47CD000.
11. (12 pts.)Consider a program where 25% of its execution is serial and the remainder is...
11. (12 pts.)Consider a program where 25% of its execution is serial and the remainder is parallel (i.e., its performance scales linearly in the number of cores for an arbitrary number of cores). The performance of the serial portion of the program is directly proportional to memory access latencies. 1) Which is better enhancement, a)Enhance the system with 3 cores, b) Reduce the serial processing time by half. Show your work. 2) What is the maximum speedup that can be...
Consider a computer system with a 64-bit logical address and 8-KB page size. The system supports...
Consider a computer system with a 64-bit logical address and 8-KB page size. The system supports up to 1024 MB of physical memory: How many entries are there in each of the following in the page table? Describe how a logical address may be used to obtain the frame number. You may use the virtual address 14533956 to illustrate your answer. make it short and clear , please type in your keyboard.
For the data set 1 2 3 4 7 7 7 8 11 12 12 15...
For the data set 1 2 3 4 7 7 7 8 11 12 12 15 15 16 17 17 17 18 20 20 22 24 24 25 26 26 26 26 27 30 32 32 33 34 34 36 38 39 43 44 45 46 47 47 48 51 52 52 53 54 54 54 55 56 58 58 59 61 63 65 65 67 69 70 73 75 75 76 77 77 79 80 81 82 82 (a)...
Consider a memory system with a 14 bit long address. Produce the answer to each of...
Consider a memory system with a 14 bit long address. Produce the answer to each of the following parts using hexadecimal numbers. a. There is a 1.5k byte RAM device, starting at address $200. What is its last address? b. There is a 1k byte EPROM device, starting at address $900.What is is last address? c. There is a 7k byte ROM device, its last address is at the highest system address. What is its first address? d. Use your...
15-6: Consider the following set of data: x1              10        8          11    &nbs
15-6: Consider the following set of data: x1              10        8          11        7          10        11            6 x2         50        45        37        32        44        51            42 y          103      85        115      73        97        102            65 Obtain the estimate regression equation. Examine the coefficient of determination and the adjusted of determination. Does it seem that either of the independent variables’ addition to R2 does not justify the reduction in degrees of freedom that results from its addition to the regression model? Support your assertions. Conduct...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT