Part 2: Memory Systems
Types of Memory
Primary Memory (Volatile)
RAM (Random Access Memory): Main working memory, loses data when power is off
o DRAM: Dynamic RAM, needs constant refreshing, used for main memory
o SRAM: Static RAM, faster but more expensive, used for cache
Cache Memory: Extremely fast memory close to CPU
Registers: Fastest memory locations within the CPU
Secondary Memory (Non-volatile)
Hard Disk Drives (HDD): Magnetic storage, high capacity, slower access
Solid State Drives (SSD): Flash memory, faster than HDD, more expensive per GB
Optical Storage: CDs, DVDs, Blu-ray discs
Flash Storage: USB drives, memory cards
Memory Hierarchy
From fastest to slowest: Registers → L1 Cache → L2 Cache → L3 Cache → RAM → Storage
Devices
Memory Management Concepts
Virtual Memory: Uses hard drive space as extended RAM when physical memory is full
Paging: Divides memory into fixed-size blocks for efficient management
Memory Allocation: How programs request and use memory space
Garbage Collection: Automatic memory cleanup in some programming languages
RAM Specifications
Capacity: Amount of data that can be stored (measured in GB)
Speed: Data transfer rate (measured in MHz/MT/s)
Latency: Delay between request and data delivery (measured in nanoseconds)
Form Factor: Physical size and connector type (DIMM, SO-DIMM)
Memory Performance Impact
More RAM allows running more programs simultaneously
Faster RAM improves overall system responsiveness
Insufficient RAM leads to increased virtual memory usage and slower performance