Cache Management and Designs Flashcards

1
Q

Temporal locality

A

Programs exhibit temporal locality, if an item in memory is referenced, it is likely to be referenced again soon

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

Spatial locality

A

Programs exhibit spatial locality, if an item in memory is referenced, then it is likely that those nearby will be referenced soon. When a specific memory block is referenced, the cache will also bring in additional memory blocks located at similar addresses

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

Cache hit/Miss

A

When memory is requested from the cache it can either result in a hit or a miss

Hit - the requested data is in cache and can be read
Miss - the data is read from memory into cache first

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

Direct-mapped cache + pros and cons

A

A memory address is mapped to exactly one cache address

Pros:
Easy to search

Cons:
Inefficient use of cache space

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

Fully associative cache + pros and cons

A

A memory address is mapped to the least recently used cache address

Pros:
Flexible, allows the cache to be filled with any combination of memory addresses

Cons:
takes a long time to search

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

Write hit - write back

A

Write into cache memory only, means faster writes but need to remember to later write to memory before replacing modified cache data

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

Write hit - write through

A

Write to both cache and memory, slower but means that cache and memory are in sync

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

Write miss - write around (no write allocate)

A

Write into memory only, avoids unnecessary cache access and pollution but does not utilise temporal locality

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

Write miss - write allocate

A

Write into memory and read into cache - exploits temporal locality but can mean there’s unnecessary cache access and pollution

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