chapter 8 Flashcards

(20 cards)

1
Q

: What is the primary purpose of cache memory?

  • A) To increase the capacity of main memory
  • B) To reduce the average memory access time
  • C) To provide non-volatile storage
  • D) To replace main memory entirely
A
  • B) To reduce the average memory access time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

In a direct-mapped cache, where can a specific memory block be placed?

  • A) In any cache line
  • B) In a specific cache line determined by the address
  • C) In any cache line within a specific set
  • D) Only at the beginning or end of the cache
A

B) In a specific cache line determined by the address

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

What is the hit ratio in cache memory?

  • A) The ratio of cache size to main memory size
  • B) The ratio of hits to total memory accesses
  • C) The ratio of misses to total memory accesses
  • D) The ratio of read operations to write operations
A

B) The ratio of hits to total memory accesses

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

: Which cache mapping technique offers the highest flexibility in placing memory blocks?

  • A) Direct mapping
  • B) Set-associative mapping
  • C) Fully associative mapping
  • D) Block mapping
A

C) Fully associative mapping

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

What is the principle of locality in cache memory?

  • A) Cache should be physically close to the CPU
  • B) Programs tend to access memory locations that are close to each other
  • C) Cache lines should be organized in a local manner
  • D) Cache should only store local variables
A

B) Programs tend to access memory locations that are close to each other

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

In a 4-way set-associative cache, how many cache lines can a specific memory block be placed in?

  • A) 1
  • B) 4
  • C) Any line in the cache
  • D) Depends on the cache size
A

B) 4

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

: Which of the following is NOT a common cache replacement policy?

  • A) Least Recently Used (LRU)
  • B) First-In-First-Out (FIFO)
  • C) Most Recently Used (MRU)
  • D) Random Replacement
A

C) Most Recently Used (MRU)

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

What is a cache coherence problem?

  • A) When the cache becomes full
  • B) When multiple caches have different values for the same memory location
  • C) When the cache access time is too high
  • D) When the cache size is too small
A

B) When multiple caches have different values for the same memory location

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

Which write policy immediately updates both cache and main memory on a write operation?

  • A) Write-through
  • B) Write-back
  • C) Write-allocate
  • D) Write-around
A

A) Write-through

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

What is the primary advantage of a write-back policy over a write-through policy?

- A) Simpler implementation
- B) Reduced write traffic to main memory
- C) Better cache coherence
- D) Higher reliability
A

B) Reduced write traffic to main memory

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

What is the purpose of a victim cache?

- A) To store blocks that have been replaced from the main cache
- B) To store frequently accessed blocks
- C) To store blocks that have never been accessed
- D) To store blocks that contain errors
A

A) To store blocks that have been replaced from the main cache

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

Which of the following best describes temporal locality?

- A) If a memory location is accessed, nearby locations are likely to be accessed soon
- B) If a memory location is accessed, it is likely to be accessed again soon
- C) Memory locations are accessed in a sequential manner
- D) Memory locations are accessed based on their physical location
A

B) If a memory location is accessed, it is likely to be accessed again soon

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

In a cache with a block size of 64 bytes, what is the primary advantage of increasing the block size?

- A) Improved hit ratio due to spatial locality
- B) Reduced cache size
- C) Faster access time
- D) Simplified cache design
A

A) Improved hit ratio due to spatial locality

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

: What is the tag in a cache memory system?

- A) A unique identifier for each cache line
- B) The part of the address that identifies which block is stored in a cache line
- C) The data stored in the cache
- D) The replacement policy used
A

B) The part of the address that identifies which block is stored in a cache line

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

: Which of the following is NOT a factor affecting cache performance?

- A) Cache size
- B) Block size
- C) Associativity
- D) CPU clock speed
A

D) CPU clock speed

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

What happens in a write-allocate policy when a write miss occurs?

- A) The block is loaded into the cache, then updated
- B) The write goes directly to main memory, bypassing the cache
- C) The write is delayed until the block is naturally replaced
- D) The write operation is cancelled
A

A) The block is loaded into the cache, then updated

17
Q

What is the primary purpose of a multilevel cache hierarchy?

- A) To increase the total cache capacity
- B) To balance access time and hit ratio
- C) To simplify cache management
- D) To reduce power consumption
A

B) To balance access time and hit ratio

18
Q

: Which of the following is a characteristic of L1 cache compared to L2 cache?

- A) Larger size
- B) Higher associativity
- C) Faster access time
- D) Lower hit ratio
A

C) Faster access time

19
Q

: What is the primary disadvantage of a fully associative cache?

- A) Poor hit ratio
- B) Complex hardware for tag comparison
- C) Limited flexibility in block placement
- D) Incompatibility with modern processors
A

B) Complex hardware for tag comparison

20
Q

Which of the following best describes spatial locality?

- A) If a memory location is accessed, it is likely to be accessed again soon
- B) If a memory location is accessed, nearby locations are likely to be accessed soon
- C) Memory locations are accessed based on their importance
- D) Memory locations are accessed in a random manner
A

B) If a memory location is accessed, nearby locations are likely to be accessed soon