CACHE MEMORY Flashcards

(19 cards)

1
Q

What is the main goal of cache memory?

A

To combine the speed of small, fast memory with the size of large, slow memory.

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

What is a cache hit?

A

When the requested data is found in the cache.

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

What is a cache miss?

A

When the requested data is not in the cache and must be fetched from main memory.

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

What is a cache line (or block)?

A

The smallest unit of data transferred between cache and main memory.

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

What is a tag in cache memory?

A

The part of an address stored with data in cache to identify which main memory block it came from.

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

What is the Critical Word First technique?

A

On a miss, the requested word is fetched first and sent to the CPU before the rest of the block.

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

What are the three main cache mapping techniques?

A

Direct Mapping, Associative Mapping, and Set-Associative Mapping.

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

Describe Direct Mapping.

A

Each memory block maps to exactly one cache line.

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

Describe Associative Mapping.

A

Any memory block can go into any cache line.

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

Describe Set-Associative Mapping.

A

Cache is divided into sets; each block maps to one set and can go into any line within that set.

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

What is the Direct Mapping formula?

A

Cache Line Number = (Block Address) % (Number of Lines)

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

What causes cache thrashing?

A

Repeatedly accessing data that maps to the same cache line in direct mapping.

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

What are common cache replacement policies?

A

LRU (Least Recently Used), FIFO (First In, First Out), and LFU (Least Frequently Used).

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

What does LRU stand for and do?

A

Least Recently Used – replaces the block that hasn’t been accessed for the longest time.

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

What is the effect of larger cache size?

A

Increases performance but also increases cost.

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

What is the advantage of a set-associative cache?

A

Higher hit ratio than direct mapping with less complexity than full associative mapping.

17
Q

What is a logical cache?

A

Cache that stores data using virtual (logical) addresses.

18
Q

What is a physical cache?

A

Cache that stores data using main memory physical addresses.

19
Q

What are spatial locality–based replacement algorithms?

A

BCD (Block Correlation Directed Cache) and LAC (Locality-Aware Cache).