Memory in Computers
Memory is the storage area of a computer where instructions and data are stored, helping in the processing and execution of tasks. It's categorized into Primary Memory (Main Memory) and Secondary Memory (Permanent Storage).
Memory Hierarchy
Computers require different types of memory for efficient functioning. Since fast memory is more expensive, it can't be used excessively. Therefore, a hierarchy exists based on speed and cost:
- Registers - The fastest and smallest, even faster than cache.
- Cache Memory (SRAM) - Faster than main memory and close to the CPU.
- Main Memory (RAM)
- Secondary Storage - Long-term, slower storage.
(Figure hierarchy). |
Types of Memory
Primary Memory
- Read Only Memory (ROM): This non-volatile memory stores permanent data and instructions. Once data is written, it cannot be changed, hence "read-only." ROM is crucial for storing the BIOS, which initializes hardware and loads the operating system.
- Types of ROM:
- PROM (Programmable ROM)
- EPROM (Erasable Programmable ROM)
- EEPROM (Electrically Erasable Programmable ROM)
- Types of ROM:
- Random Access Memory (RAM): RAM allows random access to stored data and is volatile—data is lost once power is off. RAM temporarily holds data and instructions during processing.
- Types of RAM:
- Static RAM (SRAM)
- Dynamic RAM (DRAM)
- Types of RAM:
- Read Only Memory (ROM): This non-volatile memory stores permanent data and instructions. Once data is written, it cannot be changed, hence "read-only." ROM is crucial for storing the BIOS, which initializes hardware and loads the operating system.
Secondary Memory
- Long-term storage where data persists even after power loss. Secondary memory has a higher storage capacity but is slower and cheaper.
- Access Types:
- Sequential Access: Accesses data in a sequence (e.g., magnetic tape).
- Direct Access: Directly accesses specific data locations (e.g., hard drives).
Cache Memory
- A high-speed SRAM located between the CPU and main memory. The CPU first checks cache memory for data before moving to main memory, improving access speed.
- Types of Cache:
- Instruction Cache - Stores instructions only.
- Data Cache - Stores data only.
- Unified Cache - Stores both data and instructions.
- Cache Levels (L1, L2, L3):
- Data retrieval follows this hierarchy: L1 > L2 > L3 > RAM. If data isn't found in L1, the system checks L2, and so on, up to RAM
Comments