4 Memory ShortNotes
4 Memory ShortNotes
Basic Concepts:
● Memory: A fundamental component in
a computer system used for storing
9
data and instructions.
● Address: A unique identifier assigned
64
to each memory location.
● Bit: The fundamental unit of
information, represented by 0 or 1.
● Byte: A group of 8 bits, typically used
17
to store characters.
● Word: A collection of bytes treated
as a single unit by the processor,
77
ranging in size depending on the
architecture.
● Data: Information stored in memory.
● 61
Access Time: The time it takes to retrieve data from or store data into memory.
/8
Semiconductor RAM Memories:
● Random Access Memory (RAM): Volatile memory used for temporary storage of data and program
instructions.
● Dynamic RAM (DRAM): Requires periodic refreshing to maintain data integrity.
● Static RAM (SRAM): Faster and more expensive than DRAM, doesn't require refreshing.
du
Read-only Memories:
● ROM: Non-volatile memory
used for storing firmware and
ry
permanent data.
● PROM: Programmable ROM,
One-time programmable, often
Su
9
the CPU.
● Improves Performance: Reduces CPU overhead
64
and allows for faster data transfers between devices
and memory.
17
Memory Hierarchy:
● Registers: Fastest and smallest
type of memory located inside
the CPU.
77
● Cache Memory: High-speed
memory located between the
CPU and main memory, used to
store frequently accessed data.
● Main Memory (RAM): Slower
61
than cache but larger in size.
/8
● Secondary Storage: Slower
and larger than main memory,
used for long-term storage (e.g.,
hard drives, SSDs).
du
Cache Memories:
● Cache Levels: L1, L2, L3, indicating proximity to the CPU (L1 being closest).
● Cache Coherency: Ensures that data stored in multiple caches remains consistent.
en
● Cache Replacement Policies: Determines which data to evict from the cache when it becomes full
(e.g., LRU - Least Recently Used).
ry
Performance Considerations:
● Latency vs. Throughput: Latency refers to the time taken to access a single piece of data, while
throughput refers to the rate of data transfer.
Su
● Memory Bandwidth: Maximum rate of data transfer between the memory and other components.
Virtual Memory:
● Concept: Allows for the illusion of having more memory than physically available. Uses a combination
of RAM and secondary storage.
● Page Tables: Used to map virtual addresses to physical addresses.
● Paging: Divides the process's virtual address space and physical memory into fixed-size blocks called
pages.
● Segmentation: Divides the process's virtual address space into logical segments based on data type
or function (code, data, stack). Segments can be of varying sizes.
Memory Management Requirements:
● Memory Allocation: Assigning memory blocks to processes as needed.
● Memory Protection: Preventing unauthorized access to memory locations.
● Memory Sharing: Allowing multiple processes to access the same memory region.
Secondary Storage:
● Hard Disk Drives (HDD): Traditional magnetic storage devices with rotating platters.
9
● Solid State Drives (SSD): Faster and more durable than HDDs, use flash memory for storage.
● Optical Drives: CD, DVD, and Blu-ray drives used for long-term data storage.
64
17
77
61
/8
du
en
ry
Su