Introduction of Memory
- Store data and instructions that are currently being used or processed by the computer.
- Determines the performance and efficiency of data access and processing.
Key concepts and types of memory:
1. Volatile vs. Non-Volatile Memory:
- Volatile Memory: Requires power to
maintain stored information. Data is lost when the power is turned off.
Example: RAM.
- Non-Volatile Memory: Retains data even
when the power is turned off. Examples: Hard drives, SSDs, ROM.
2. Memory Hierarchy:
- Organized in levels based on speed, cost,
and size.
Higher levels are
faster but smaller and more expensive, while lower levels are slower, larger,
and cheaper.
- Registers: Small, extremely fast
storage locations within the CPU.
- Cache Memory: Small, fast memory
located close to the CPU to speed up the access to frequently used data.
- Main Memory (RAM): Larger than
cache, slower, and used to store data and instructions currently in use.
- Secondary Storage: Large,
non-volatile storage like HDDs and SSDs used for long-term data storage.
3. Memory Access:
- Sequential Access: Data is accessed
in a fixed order. Example: Magnetic tapes.
-
Random Access: Data can be accessed in any order with equal speed. Example:
RAM.
- Direct Access: Intermediate form,
allowing data to be read or written in a relatively fast manner. Example: HDDs.
Types of Memory
1. Primary Memory:
- Random Access Memory (RAM):
- Dynamic RAM (DRAM): Needs
periodic refreshing, commonly used for main memory.
- Static RAM (SRAM): Faster and
more expensive than DRAM, used for cache memory.
- Read-Only Memory (ROM): Non-volatile
memory used to store firmware and system-level programs. Types include PROM,
EPROM, and EEPROM.
2. Secondary
Memory:
- Hard Disk Drives (HDD): Traditional
magnetic storage with moving parts.
- Solid State Drives (SSD): Faster,
more reliable storage without moving parts.
- Optical Discs: CDs, DVDs, and
Blu-ray discs used for storage and distribution of data.
- Flash Memory: Non-volatile memory
used in USB drives, memory cards, and SSDs.
3. Cache Memory:
- Small, high-speed memory located between
the CPU and main memory to store frequently accessed data and instructions.
- L1, L2, and L3 Cache: Different levels
of cache with varying sizes and speeds. L1 is the fastest and smallest,
integrated into the CPU. L2 and L3 are larger and slightly slower, can be
integrated or external.
Memory Management
Key concepts include:
1. Virtual Memory:
- Technique that uses both hardware and
software to allow a computer to compensate for physical memory shortages by
temporarily transferring data from RAM to disk storage.
- Paging: Divides memory into
fixed-size pages.
- Segmentation: Divides memory into
variable-size segments.
2. Memory
Allocation:
- Static Allocation: Memory allocated
at compile time.
- Dynamic Allocation: Memory
allocated at runtime.
----------------------------------------------------------------------
0 Comments