Storage Sub-System Flashcards

1
Q

What is the formula for Average Memory Access Time (AMAT)

A

AMAT = Hit time + (Miss rate × Miss penalty)

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

What are the three components of cache performance

A
  • Hit time
  • Miss rate
  • Miss penalty
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define hit time in cache performance

A

The time taken to access data from the cache successfully

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

What is a miss penalty

A

the additional time required to fetch data from a lower-level cache or main memory after a cache miss

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

Define cache miss

A

a state where data requested by a component (such as a processor) is not found in the cache

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

What are the three main categories of cache performance optimisation

A
  1. reducing miss rate
  2. reducing miss penalty
  3. reducing hit time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How can we reduce the miss rate in a cache

A

increase block size, increase cache size and use higher associativity

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

what is associativity

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

How can we reduce the miss penalty

A

use multilevel caches and prioritise read operations over writes

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

why prioritise multilevel caches

A

✅ Multilevel caches improve speed by catching data closer to the CPU.
✅ They reduce memory access time by lowering miss penalties.
✅ They balance speed vs. size, keeping small caches fast and large caches efficient.
✅ They save power, reducing RAM access.
✅ They enhance multi-core performance, enabling efficient data sharing.

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

How can hit time be reduced

A

optimise cache structure and use faster technologies

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

how can we optimise cache structure

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

What are the three types of cache misses

A
  • compulsory miss
  • capacity miss
  • conflict miss
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a compulsory miss

A

a miss that occurs when data is accessed for the first time and must be loaded into the cache (it currently isn’t there)

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

What is a capacity miss

A

A miss that happens when the cache is too small to store all required data, causing frequent discarded data

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

what is a conflict miss

A

A miss due to limited associativity, where multiple blocks compete for the same cache location even though there is space else where in the cache

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

Explain the differences between a capacity and conflict miss

A

explain conflict miss

18
Q

How does adding a second level cache improve performance

A

It reduces the miss penalty by catching accesses that would otherwise go to main memory

19
Q

What is the formula for AMAT in a two level cache system

A

AMAT = Hit timeL1 + Miss rateL1 × (Hit timeL2 + Miss rateL2 × Miss penaltyL2)

20
Q

What is the difference between local and a global miss rates

A

Local miss rate: Misses in a cache divided by total accesses to that cache.
Global miss rate: Misses in a cache divided by total accesses from the processor.

21
Q

How does higher associativity affect cache performance

A

It reduces conflict misses but may increase hit time.

22
Q

What happens off the block size is too large relative to the case size

A

Miss rate may increase due to more conflict and capacity misses.

23
Q

What is the trade off when increasing block size

A

It reduces compulsory misses but may increase miss penalty and conflict misses.

24
Q

What is associatively in case memory

A

Associativity determines how memory blocks are mapped from main memory into cache.

25
Q

What are the three types of cache associatively

A

Direct-mapped, fully associative, and set-associative.

26
Q

What is a direct-mapped cache?

A

Each memory block maps to exactly one cache location.

27
Q

What is the main advantage of a direct mapped cache

A

Simple and fast memory lookup

28
Q

what is the main drawback of a direct-mapped cache

A

High conflict misses if multiple blocks map to the same cache slot.

29
Q

What is a fully associative cache?

A

Any memory block can be placed anywhere in the cache.

30
Q

What is the advantage of a fully associative cache?

A

It eliminates conflict misses.

31
Q

What is the drawback of a fully associative cache?

A

Slow lookup time due to complex searching mechanisms.

32
Q

What is a set-associative cache?

A

A cache where each memory block maps to one specific set but can be placed in any of the available ways within that set.

33
Q

How does a 4-way set-associative cache work?

A

The cache is divided into sets, and each set has 4 slots (ways). A memory block can be placed in any of the 4 ways within its set.

34
Q

What are the pros and cons of a direct-mapped cache?

A

✅ Fast lookup, ❌ High conflict misses.

35
Q

What are the pros and cons of a fully associative cache?

A

✅ No conflict misses, ❌ Slow lookup and expensive hardware.

36
Q

What are the pros and cons of a set-associative cache?

A

✅ Balance of speed and flexibility, ❌ More complex than direct-mapped.

37
Q

Define sets

A

A set in cache memory is a group of cache lines (blocks) where a memory block can be placed in a set-associative cache.

38
Q

Explain why conflict misses occur for direct mapped cache

A

1️⃣ Suppose we have a direct-mapped cache with 4 slots (sets).
2️⃣ A block’s cache location is determined using (Memory Address) MOD (Number of Sets).
3️⃣ Blocks 4, 8, 12, 16… all map to the same set (Set 0).
4️⃣ Even if Sets 1, 2, and 3 have empty space, these blocks must go into Set 0.
5️⃣ Every time a new block that maps to Set 0 is accessed, it overwrites the previous one, causing a conflict miss.

39
Q

What would L1 cache be used for in multilevel cache

A

Frequently used instructions and data
it could store cpu registers, program counters, instruction decoders

40
Q

What would L2 cache be used for in multilevel cache

A

✅ Recently used data and instructions that didn’t fit in L1
✅ Pre-fetched data the CPU might need soon
✅ Often exclusive (doesn’t duplicate L1 content)

41
Q

What would L3 cache be used for in multilevel cache

A

✅ Data and instructions used across multiple CPU cores
✅ Cache-line sharing data for multi-core processing
✅ Pre-fetched data from RAM to reduce memory bottlenecks