Cache Flashcards

1
Q

Temporal locality

A

data accessed will likely be accessed again soon, so save the data in a small storage that is fast. AKA cache

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

Spatial locality

A

more likely to access data close to each other, so we fetch memory in blocks not just one entry at a time.

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

Locality

A

programs tend to accessed data and instructions with address near or the same as data recently used.

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

Describe a cache organization

A

sets, blocks, valid bit, tag, data itself

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

Fully associated cache

A

each set only has one block

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

2-way associated cache / n-way association

A

each set has two blocks or n blocks

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

How to map address in a branch instruction to memory location

A

the address bits is split into offset, index, tag bits.
Index bits specifies which ‘set’, tag bits specify is data matches, offset is to access the right bit in a block.

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

Cache miss

A

when the tag bits doesn’t match the tag in a set

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

How does the offset, index and tag bits of an address change for n-way associative cache

A

n-way associative means. n blocks per set. so number of sets can be reduced by n times. so index bits can be reduced. giving more bits for tag matching. since there’s n times more tags now

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