1/115
Looks like no tags are added yet.
What is a memory hierarchy?
A set of memory levels that provide different speeds and storage capacities
Why is a memory hierarchy necessary?
Large memory is generally slower, while faster memory is more expensive
What are the main memory hierarchy trade-offs?
Storage size, access speed, cost, and power consumption
What is the fastest and smallest type of memory?
CPU registers
What is the order of the memory hierarchy from fastest to slowest?
Registers, cache, RAM, HDD/SSD
Which memory level has the largest storage capacity?
HDD/SSD storage
What is the inclusion property?
Higher memory levels contain data from lower memory levels, such as cache containing data from storage
How does the CPU request data from memory?
The CPU requests data in the form of a word, consisting of one or more bytes
What happens when requested data is not found in the nearest cache?
The data must be retrieved from lower memory levels, such as L2, L3, RAM, or storage
Why are multiple words retrieved when data is fetched from lower memory?
Because of spatial locality, multiple words are retrieved together as a block or line
What is a memory block or cache line?
A group of multiple words retrieved together from a lower memory level
What is the purpose of a cache tag?
It identifies which memory address a block corresponds to
What are the three main cache organisations?
Direct mapped, set associative, and fully associative
What is a direct-mapped cache?
Each memory block can only be stored in one specific cache location
What is the main advantage of a direct-mapped cache?
It is very easy and quick to find blocks
What is a set-associative cache?
A cache where each set can store multiple blocks, allowing some flexibility in block placement
What does n-way associative mean?
Each cache set can contain n blocks
How difficult is it to find blocks in a set-associative cache?
More difficult than in a direct-mapped cache
What is a fully associative cache?
A cache where a block can be stored anywhere in one large set
What is the main advantage of a fully associative cache?
Blocks can be placed anywhere, providing maximum flexibility
What is the main disadvantage of a fully associative cache?
Finding a block is more difficult
What is a write-through cache?
A cache that updates both the cache and main memory when data is changed
What is a write-back cache?
A cache that updates only the cache initially and updates memory when the block is replaced
What is the purpose of a write buffer?
It allows the cache to continue working while modified data is copied back to memory
What is a cache hit?
When the CPU requests a block and the block is found in the cache
What is a cache miss?
When the CPU requests a block and the block is not found in the cache
How do you calculate cache miss rate?
Miss rate = Number of misses / Number of requests
What is the relationship between cache hit and miss?
A hit means the requested block is found
a miss means it is not found
What is a compulsory miss?
A miss that occurs the first time a block is requested because it has not yet been loaded into cache
What is a capacity miss?
A miss caused by the cache being too small to hold all the required blocks
Why do capacity misses occur?
When more blocks are requested than the cache can hold, older blocks are removed to make space
What is a conflict miss?
A miss caused by multiple blocks mapping to the same cache set and competing for space
How can fully associative caches avoid conflict misses?
They allow blocks to be placed anywhere in the cache
What is a coherence miss?
A miss that occurs because multiple processors share a cache
What does AMAT stand for?
Average Memory Access Time
What is the AMAT formula?
AMAT = Hit time + (Miss rate × Miss penalty)
What is hit time?
The time required to find a block in the cache, assuming it is present
What is miss penalty?
The time required to retrieve a missing block from memory and store it in the cache
What is the effect of increasing cache block size?
It reduces miss rate but increases miss penalty
What is the effect of increasing cache size?
It reduces miss rate but increases hit time
What is the effect of increasing cache associativity?
It reduces miss rate but increases hit time
What is the purpose of multilevel caches?
To reduce miss penalty by providing additional cache levels
What are the disadvantages of multilevel caches?
Increased power consumption, cost, and complexity
Which memory technology is used for cache?
SRAM (Static Random-Access Memory)
Which memory technology is mainly used for RAM?
DRAM, including SDRAM and DDR SDRAM
Which memory technologies are used for storage?
Flash, magnetic, and optical memory
What are the characteristics of SRAM?
High speed and low capacity
What are the characteristics of DRAM?
Medium speed and medium capacity
What are the characteristics of flash memory?
Lower speed than SRAM but high storage capacity
What is memory access time?
The time between requesting a memory block and receiving it
What is memory cycle time?
The time between successive requests to memory
What is SRAM?
Static Random-Access Memory, commonly used for CPU cache
How many transistors can SRAM use per bit?
Approximately 4 to 10 transistors per bit
What does WL stand for in an SRAM cell?
Word Line
What is the function of the SRAM word line (WL)?
It controls access transistors M5 and M6 to connect the cell to the bit lines
What are BL and BL-bar in SRAM?
The two bit lines used to transfer data during read and write operations
Can individual SRAM cells be accessed?
Yes, individual cells can be accessed
What contributes to SRAM latency?
Access time and cycle time
Why does DRAM require refreshing?
Its capacitors leak charge, so stored data must be periodically rewritten
What happens to DRAM during refresh?
The memory is temporarily unavailable while its contents are refreshed
How is DRAM organised?
As a two-dimensional matrix containing rows, columns, and banks
What is a DRAM rank?
Several DRAM chips working together as one unit
What does RAS stand for?
Row Access Strobe
What does CAS stand for?
Column Access Strobe
Why are RAS and CAS signals sent in series?
Because the address lines are multiplexed
What happens during a DRAM row access?
An entire row is read before the required column is selected
What does ACT stand for in DRAM?
Activate
it selects a specific bank and row
Why is ACT used instead of RAS in multiple-bank DRAM?
ACT selects the specific bank and row that must be accessed
What does PRE stand for in DRAM?
Precharge
it prepares and rewrites a row so another row can be accessed
What is the general DRAM latency formula when the row is initially ready?
Latency = ACT + CAS
What is the DRAM latency formula when precharging is required?
Latency = PRE + ACT + CAS
What happens when another column from the same DRAM row is required?
No PRE is needed
the system waits for the data transfer time
What is a RAM bus or memory channel width?
The number of bits that can be transferred at once
What is the typical memory channel width per DIMM interface?
64 bits
What is burst rate?
The theoretical maximum memory transfer rate, also called bandwidth
What is the RAM bandwidth formula?
BW = Clock × Bus width in bytes × Transfers per clock
Why do GPUs use GDDR memory?
It provides wider memory buses and higher clock rates for GPU memory
How is GPU memory connected differently from CPU RAM?
GDDR memory connects directly to the GPU, while CPU RAM forms part of a larger expandable memory system
What is GDDR RAM based on according to the notes?
DDR2 RAM
What is flash memory increasingly replacing?
Magnetic disk storage, such as HDDs
What are the advantages of flash memory?
Faster operations, smaller size, lower power consumption, no moving parts, and less heat
What are the disadvantages of flash memory?
Higher cost per GB and a limited number of write operations
What type of memory is flash memory?
Non-volatile EEPROM
What is the most common type of flash memory?
NAND flash
How long does a 2 KB NAND flash transfer take according to the notes?
Approximately 75 microseconds (75 μs)
How long does a 2 KB DDR SDRAM transfer take according to the notes?
Approximately 500 nanoseconds (500 ns)
How long does a 2 KB magnetic disk transfer take according to the notes?
Approximately 30 milliseconds (30 ms)
Why does flash memory have a limited lifespan?
EEPROM memory cells can wear out after repeated write operations
Approximately how many writes to a block may cause flash memory failure?
Around 100,000 writes
What is write leveling?
A technique that distributes write operations evenly across flash memory blocks to maximise lifespan
What are the main components of an HDD?
Platters, spindle, read/write head, actuator arm, actuator axis, and actuator
What are the main components of an SSD?
Cache, controller, and NAND flash memory
What are the two main types of memory errors?
Soft errors (transient faults) and hard errors (permanent faults)
What is a soft memory error?
A temporary error where memory bits dynamically change state during operation
What is a hard memory error?
A permanent fault where a memory location is defective from fabrication
How can RAM and ROM handle defective rows?
They can use extra rows to replace defective rows, with substitution managed by software