Chapter 3 Final Revision #1
No description yet. This curated deck is ready for daily study.
Card preview (24)
Memory — Types and Hierarchy
What is internal memory, and what components does it include?
Internal memory includes components close to the processor: • Registers — internal to the processor itself. • Memory cache — external to the processor but still close to it.
What is memory cache, and why does more of it improve CPU performance?
Memory cache is fast-access memory located close to the CPU that stores frequently used / recently accessed instructions and data the processor will likely need again. • More cache means more instructions/data can be transferred faster. • Reduces the need for swapping between RAM and cache. • Prevents the CPU from idling while waiting for data.
What is primary memory, and what does it contain?
Primary memory is the part of computer memory directly accessed by the CPU. It contains RAM and ROM.
What is RAM, what does it store, and what is its key characteristic?
RAM (Random Access Memory) is volatile primary memory — its contents are lost when power is cut. It stores data currently being used: currently running software, active data, and parts of the OS.
What is ROM, what does it store, and what is its key characteristic?
ROM (Read-Only Memory) is non-volatile primary memory — it retains data without power. It stores permanent data that does not change: • Bootstrap program / start-up (boot-up) instructions / BIOS. • Kernel of the Operating System (or parts of the OS). • Firmware (e.g. for embedded systems or peripheral devices).
What is secondary storage, and how does it differ from primary memory?
Secondary storage devices are non-volatile and not directly accessible by the CPU. They have larger capacities than RAM and ROM, and store: • The full operating system, applications, files, and device drivers.
RAM — SRAM vs DRAM
How do DRAM and SRAM differ in construction?
DRAM is built from transistors and capacitors; it requires constant refreshing to retain data. SRAM uses transistors arranged as flip-flops / latches; it holds data without refreshing.
How do DRAM and SRAM compare in speed, power, cost, and density?
Speed: SRAM is significantly faster than DRAM (no refresh needed). Power: SRAM has lower power consumption than DRAM. Cost & density: DRAM is cheaper per unit and has higher memory density (stores more bits per chip) due to its simpler design using fewer transistors. Both SRAM and DRAM are volatile.
Why is SRAM used for processor cache instead of DRAM?
SRAM has faster access time (no refresh requirement) and lower power consumption, making it ideal for the processor memory cache.
Why might a laptop use SRAM instead of DRAM?
• SRAM has faster access time because it does not need to be refreshed. • It improves CPU cache speed. • SRAM has lower power consumption than DRAM.
What are the advantages of DRAM over SRAM?
• Costs less per unit. • Higher storage density. • Simpler design — uses fewer transistors.
ROM — Programmable Variants
What are the three programmable variants of ROM, and how is each programmed or erased?
• PROM: Programmed once by burning internal fuses with an electric current. Cannot be erased. • EPROM: Can be rewritten multiple times using ultraviolet (UV) light. Must be removed from the device to be erased, and must be entirely erased before rewriting. • EEPROM: Erased and rewritten repeatedly using pulsed voltages. Can be erased in situ (no removal needed); individual bytes or the whole chip can be erased without fully clearing it first.
What is Flash memory, and what is it used for?
Flash memory is a type of EEPROM engineered for high-density storage applications such as SSDs, memory cards, and memory sticks.
Why is ROM used in an embedded system?
• To store data that does not change. • Data must be retained even when the device has no power (ROM is non-volatile). • To store boot-up instructions / system software / firmware / BIOS.
What are the benefits of using EEPROM in an embedded system?
• Can be reprogrammed without removing it from the device (in situ). • No additional equipment needed — enables firmware updates by non-technical users. • Can be erased and reprogrammed many times; individual bytes or the whole chip can be erased without fully clearing it first.
Secondary Storage — Hard Disk Drives
Describe the physical structure of a Hard Disk Drive (HDD).
• One or more platters/disks mounted on a central spindle, each surface made of ferrous oxide capable of being magnetised. • The entire mechanism is enclosed in a sealed aluminium box. • Each surface has a read/write head on an arm; electronic circuits control arm movement. • Each surface is divided into concentric tracks, then into sectors. One track-in-one-sector is the basic storage unit, called a block.
How does an HDD read and write data?
• The disks spin at high speed; the read/write head moves to the correct track. • Data is encoded as magnetic patterns for each block. • Writing: a variation in current in the head produces a variation in the magnetic field on the disk. • Reading: a variation in the magnetic field produces a variation in current through the head.
What is latency in the context of an HDD, and what is fragmentation?
Latency: the time taken for the correct sector to rotate under the read/write head. Fragmentation: when files are stored in non-adjacent sectors, forcing the actuator arm to move excessively to retrieve data, degrading performance.
When is magnetic (HDD) storage more appropriate than solid-state storage?
• When a large number of read/write operations are required — HDD has more longevity under heavy write loads. • When very large storage capacity is required (e.g. storing large video files) — HDD costs less per unit of storage.
Secondary Storage — Solid State Drives