Cache & Internal Memory Flashcards

Week 2.6 (35 cards)

1
Q

name the 7 elements of cache design

A
  1. cache replacment
  2. write policy
  3. replacement algorithms
  4. number of cores
  5. line size
  6. cache size
  7. cache addresses
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what are the three cache write policies

A
  1. cache replacement
  2. write through policy
  3. write back policy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is the cache replacement write policy

A
  • unaltered blocks can be overwritten without updating main memory
  • modified blocks must be written back to main memory replacement
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is the write through policy

A
  • updates cache & main memory for consistency
  • the word being written is updated in cache & memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

advantages of write through polic

A

simplifies consistency in multi-device systems

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

disadvantages of write through policy

A

high memory traffic, potential bottlenecks

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

what is the cache write back policy

A
  • updates only when the block is replaced
  • the entire block is updated even if one single word has changed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

advantages of the cache write back policy

A

v memory traffic

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

disadvantages of the cache write back policy

A

complex handling to avoid memory states

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

what types of mapping need to replacement algorithms

A
  • associative
  • set-associative
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what are the 3 replacement algorithms

A
  1. least recently used
  2. FIFO
  3. least frequently used
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

how does the least recently used algorithm work

A

replaces the block unused for the longest time

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

how does the least frequently used replacement algorithm work

A

replaces block with the fewest references

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

what is split cache

A

seperate cache fore instuctions & data

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

advanatage of split cache

A

avoids contention
- essential for superscalar machines

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

advantage of unified cache

A

^ hit ratio & simple implemetatin & design

17
Q

describe how changing the block size affects cache

A
  • ^ block size fetch adjacent words = ^ hit ratio
  • large blocks
    = v blocks that can fit in cache
    = additional words are further from the requesred block size
18
Q

what is the problem with cache coherency in multi-processor systems

A

altering data in one cache can invalidate corresponding data in main memory & copies in other caches

19
Q

what is are the 3 solutions to cachecoherency in multi-processor systems

A
  1. bus watching
  2. hardware transparency
  3. noncacheable memory
20
Q

what is bus watching

A
  • cache controllers monitor writes to shared memory
  • invalidate matching cache entries when changes are detected
  • CPU next time must fetch the updated value from memory
21
Q

what is hardware transparency

A

if a processor modifies a word in its cache, the update is written to memory & propagated to matching other caches

22
Q

what is non cacheable memory

A
  • shared memory is never stored in cache, so all accesses result in cache misses
  • special hardware marks shared memory as noncacheable
23
Q

structure of static RAM

A
  • uses flip-flop logic-gate configurations
  • no need for refresh as long as power is supplied
24
Q

define operations of SRAM

A
  1. WRITE - bit value is applied to force transistors into the correct state
  2. READ - bit value is read from the designated line
25
characteristics of SRAM
- faster than DRAM - ^ cell size = v density = ^ cost - used for cache
26
structure of DRAM
- stores data as charge on capacitors - requires periodic refreshing by memory controller due to charge leakage
27
operations with DRAM
- WRITE - voltage applied to the bit line charges the capacitor - READ - charge must be transferred to a sense amplifier and must be restored
28
characteristics of DRAM
- simple & small cells -> high density -> cost-effective - slower than SRAM due to refresh overhead - commonly used for main memory
29
describe traditional DRAM
- asynchronous: processor sends addresses and control signals to the DRAM and is idle during this time - during the delay (access time) DRAM: - activates row & column to locate the specific memory cell - senses the charge - 1 0=or 9 - routes data to/from the processor via output buffers
30
describe SDRAM
- operates in syncwith an external clock signal - instructions & address information are latched by the SDRAM, which processes the request in a set number of clock cycles - allows the processor to perform other tasks while SDRAM handles the memory request
31
describe DDR RAM
an enhanced version of SDRAM that increases I/O data rate - uses a prefetch buffer
32
how and why is a prefetch buffer implemented in DDR RAM
- the prefetch buffer in DDR preloads multiple words from slow DRAM, ensuring fast, continuous data transfer to the CPU - The MUX in DDR ensures that prefetched words are sent in the correct, order by assigning them to the rising and failing edges of the clock for smooth, sequential data transfer.
33
what are the prefetch challanges of DDR4
- larger prefetch sizes complicate short bursts - increasing buffer size to 16 bits was inefficent for DDR4
34
describe using bank groups in DDR4 DRAM
- DDR4 DRAM is divided into bank groups, each functionality independently - this allows the memory controller to send commands to multiple groups simultaneously, enabling parallel operations - DDR4 supports up to 4 bank groups, improving throughput
35