Memory & Storage

Cards (49)

  • Computer Memory
    The electronic holding place for the instructions and data a computer needs to reach quickly and where information is stored for immediate use
  • Computer Memory
    • One of the basic functions of a computer, because without it, a computer would not be able to function properly
    • Used by a computer's operating system, hardware and software
  • Virtual Address
    • An address that is used by the operating system and the applications running on it to access memory
    • A logical address that is mapped to a physical address in the computer's memory
  • Virtual Memory
    1. The operating system divides the memory into pages, typically 4KB in size, and each page is assigned a unique virtual address
    2. When an application accesses memory, it uses virtual addresses and the operating system translates these virtual addresses into physical addresses so that the data can be retrieved from memory
  • Virtual Memory
    • Allows multiple applications to share the same physical memory and ensures that each application can only access its own virtual address space, preventing one application from accessing the memory of another
    • Allows applications to use more memory than is physically available by swapping out data from memory to disk when it's not needed and swapping it back in when it is needed again
  • Memory
    Meets temporary data access needs
  • Storage
    Retains data and other files over the long term
  • Types of Computer Memory
    • Cache Memory
    • RAM
    • Rambus Dynamic RAM
    • Read-Only Memory (ROM)
    • Programmable ROM (PROM)
    • Erasable PROM (EPROM)
    • Electrically Erasable PROM (EEPROM)
    • Virtual Memory (VM)
  • Cache Memory
    • A chip-based computer component that makes retrieving data from the computer's memory more efficient
    • Acts as a temporary storage area that the computer's processor can retrieve data from easily
    • Designed to store data and programs that are frequently accessed by the central processing unit (CPU), enabling data and programs to be delivered to the computer more quickly than via standard RAM
    • Despite being faster than RAM, memory cache is slower than a CPU cache, primarily because it is not in close proximity to the processor
  • Cache Memory Operation
    1. When a computer's CPU accesses its internal memory, it first checks to see if the information it needs is stored in the cache
    2. If it is, the cache returns the data to the CPU
    3. If the information is not in the cache, the CPU retrieves it from the main memory
    4. Disk cache memory operates similarly, but the cache is used to hold data that have recently been written on, or retrieved from, a magnetic disk or other external storage device
  • Memory Address
    An ID denoting a discrete byte-sized section of memory that the processor uses to read or write a byte
  • Processors interact with their respective memory pool by reading and writing bytes/words of memory
  • Processors have been getting faster and faster as technology has progressed

    Memory hasn't kept pace
  • There is now a significant gap in performance between CPUs and RAM: this gap has gotten so large that a single memory access can take hundreds of CPU cycles to occur
  • Cache
    A small pool of fast memory located near the CPU core which can provide low latency access to memory by storing frequently accessed and/or soon-to-be-accessed data and instructions
  • If the cache contains the data we want to access
    This is called a cache hit, we can get this data directly from the cache and thus don't need to wait
  • If the cache doesn't contain the relevant data
    This is called a cache miss, we thus need to go get the data from RAM (which is very slow)
  • Cache Hit-Rate
    The ratio of cache hits to misses, it tells us how often the cache contains the data we want
  • Increasing cache size
    Makes a cache more accurate, but also slows it down
  • Latency
    A time delay between the cause and the effect of some physical change in the system being observed, memory latency is the time between initiating a request for a byte or word in memory until it is retrieved by a processor
  • Computing Cache Hit-Rate
    1. Hit-rate = Number of cache hits / Total number of cache accesses
    2. To calculate this, you need to keep track of the number of cache hits and the total number of cache accesses over a period of time
  • Computing Cache Misses
    Number of cache misses = Total number of cache accesses - Number of cache hits
  • External Cache
    Cache memory that is not built into a CPU chip, designed to provide high speed data storage and processing services to the computer processor, its primary/native cache and the main memory
  • Internal Cache Memory
    The L1 cache, a memory area located inside of the CPU, faster than external cache memory
  • Cache Memory Hierarchy
    • L1 - per core, very fast, matter of few cycles to fetch data
    • L2 - slower, but much bigger cache
    • L3 - available in x86 and some mobile CPUs, slowest memory, always shared among cores
    • L4 - Intel used some time ago, shared between CPU and GPU, 64 - 128MB in size, not used any more in consumer but available on workstations
  • L0 Cache
    • Used for caching micro Ops after being decoded to eliminate decoding cycle
  • TLB
    Translation Lookaside Buffer, a cache for address translation, instead of searching translation pages in RAM last used translations are cached in TLB
  • Generally, the more cache the better, the less the CPU needs to access DRAM, the faster it can calculate data
  • Random Access Memory (RAM)
    A computer's short term memory, a small amount of data can be stored here to be accessed quickly when the processor needs it, unlike internal SSD or HDD RAM only stores data temporarily and resets when the computer is rebooted
  • RAM is essential in any computer, without it everything would run much slower since the processor would have to constantly access the slower storage devices
  • DDR
    L3 cache shared between CPU and GPU
  • Inside a core
    1. L0 cache used for caching micro Ops after being decoded to eliminate decoding cycle
    2. TLB (Translation Lookaside Buffer) cache for address translation instead of searching translation pages in RAM
  • The more cache the better, the less the CPU needs to access DRAM, the faster it can calculate data
  • Random Access Memory (RAM)
    Computer's short term memory, stores data temporarily, resets when computer is rebooted
  • RAM is essential in any computer, without it everything would run much slower
  • Dynamic RAM (DRAM)
    Slower and uses more power, but has higher storage capacity than SRAM
  • DRAM speed
    • Measured in MHz, explains how many cycles of data reading and writing can happen per second
    • Latency, the time it takes for DRAM to work, also impacts DRAM speed
  • Types of Dynamic RAM
    • SDRAM (Synchronous DRAM)
    • DDR (Double Data Rate)
    • RDRAM (Rambus Dynamic Random Access Memory)
  • SIMM (Single inline memory module)
    Obsolete, used in 1980s-1990s, 32 bit data transfer
  • DIMM (Dual inline memory module)
    Commonly used now, 64 bit data transfer