Exam 2 Review - Caches Flashcards

1
Q

. Explain to me like I am five what a cache is.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

List the three types of cache organizations and the advantages and disadvantages of each.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

We are given a system with 12-bit addresses, and a cache with 4 blocks and a block size of 16 bytes.

Determine:

a. The cache size
b. The number of bits for offset
c. For direct mapping, the number of bits for the tag
d. For fully-associative mapping, the number of bits for the tag
e. For 2-way set-associative mapping, the number of bits for the tag

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

For direct mapping, we are given the following requests to memory. Draw or list out the state of the cache after each request.

0xBAE = 0b1011 1010 1110

0xABC = 0b1010 1011 1100

0xAAA = 0b1010 1010 1010

0x007 = 0b0000 0000 0111

0x180 = 0b0001 1000 0000

0xCDA = 0b1101 1101 1101

What is the percentage of cache hits with these six requests?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the difference between write-back and write-through in the context of caches?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

We are given a system with the following properties:

32-bit address space

8-way set associative

4 bits for the set number

6 bits for the byte offset

a. What is the cache size?
b. Let’s say we have the same table from above, but now we are also using a write-back scheme with a dirty bit.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly