Memory & Storage Systems and I/O Devices

Comprehensive study notes, diagrams, and exam preparation for Memory & Storage Systems and I/O Devices.

Memory & Storage Systems and I/O Devices

Definition

Memory and storage systems are the hardware components used to store data and instructions either temporarily or permanently, while I/O devices are peripherals that facilitate data transfer between the computer and the outside environment.

In simple terms:

Memory

  • usually refers to primary storage such as RAM and cache that is directly accessed by the CPU for immediate processing.

Storage systems

  • refer to secondary or long-term storage such as hard disks, SSDs, optical discs, and cloud-backed storage used to retain data persistently.

I/O devices

  • include input devices like keyboards and scanners, output devices like monitors and printers, and communication devices like network adapters.

These three areas are interconnected because data often moves from storage to memory, then to the CPU for processing, and finally back to storage or output devices.


Main Content

1. Memory Hierarchy and Primary Memory

Memory in a computer is organized in a hierarchy based on speed, cost, and capacity. The closer a memory type is to the CPU, the faster and more expensive it tends to be, but its capacity is smaller. Primary memory, especially RAM, plays a critical role in program execution because the CPU can access it quickly.

Registers, cache, and RAM work together to support fast processing

  • Registers are inside the CPU and hold the smallest and fastest data items currently being processed, such as operands, addresses, or instruction results.
  • Cache memory acts as a high-speed buffer between the CPU and RAM. It stores frequently used instructions and data to reduce access time. For example, when a loop repeatedly uses the same variables, the cache helps the CPU retrieve them faster than fetching from main memory every time.
  • RAM (Random Access Memory) stores active programs and data temporarily. When you open a web browser, text editor, or game, the program is loaded from storage into RAM so the processor can access it efficiently.

Types and characteristics of primary memory

  • Volatile memory loses its contents when power is turned off. RAM is volatile, which is why unsaved work can be lost during a sudden shutdown.
  • Non-volatile memory retains information without power, such as ROM and flash memory. ROM stores firmware and boot instructions, while flash memory is used in USB drives and solid-state drives.
  • Access speed and capacity differences are important in performance. Cache is fastest but smallest, RAM is larger but slower than cache, and storage is much larger but slower than RAM. This layered structure helps balance cost and efficiency.

2. Secondary Storage Systems

Secondary storage provides long-term, non-volatile data retention. Unlike RAM, it stores files, software, operating systems, and personal data permanently or until deleted. It is essential because computers need to retain information across restarts and power failures.

Common storage technologies and their features

  • Hard Disk Drives (HDDs) use spinning magnetic disks and mechanical read/write heads. They offer large capacities at lower cost, making them suitable for mass storage, backups, and archival systems. However, they are slower and more prone to mechanical wear.
  • Solid-State Drives (SSDs) use flash memory and have no moving parts. They provide much faster boot times, file access, and application loading compared to HDDs. For example, an operating system installed on an SSD starts significantly faster than on a traditional hard disk.
  • Optical media and removable storage such as CDs, DVDs, Blu-ray discs, and USB flash drives are used for portability, data transfer, and distribution. Although optical media is less common today, it still appears in archives and media distribution.

Storage organization and performance factors

  • Capacity determines how much data can be stored, ranging from gigabytes in portable drives to terabytes or even petabytes in enterprise systems.
  • Latency and throughput affect how quickly data can be accessed and transferred. Latency is the delay before data begins moving, while throughput is the amount of data transferred per second.
  • Reliability and durability are important in choosing storage. SSDs are shock-resistant and silent, while HDDs may fail due to mechanical damage. Storage systems often include redundancy, such as RAID, to improve fault tolerance.

3. Input/Output Devices and Data Transfer

I/O devices make it possible for users and external systems to communicate with the computer. They include devices for entering data, receiving results, and exchanging information with other machines. Efficient I/O is essential because the CPU is extremely fast, but many external devices operate much more slowly.

Categories of I/O devices

  • Input devices send data to the computer. Examples include keyboard, mouse, scanner, microphone, barcode reader, webcam, and touchscreen. These devices convert human actions or physical signals into digital data.
  • Output devices present processed information to the user. Examples include monitors, printers, speakers, plotters, and projectors. A monitor displays visual output instantly, while a printer produces a permanent hard copy.
  • Communication devices support data exchange between systems. Network interface cards, Wi-Fi adapters, modems, and Bluetooth modules allow computers to connect to local networks and the internet.

I/O communication techniques

  • Programmed I/O means the CPU actively checks the device status and transfers data itself. This is simple but inefficient because the CPU must wait and repeatedly poll the device.
  • Interrupt-driven I/O improves efficiency by letting the device signal the CPU only when it is ready or has completed a task. For example, after a printer finishes a job, it sends an interrupt so the CPU can continue other work until needed.
  • Direct Memory Access (DMA) allows devices to transfer blocks of data directly between memory and the device without constant CPU involvement. This is highly useful for disk transfers, audio/video streaming, and network communication, where large data movement must happen quickly.

Working / Process

1. Data is entered or requested

  • A user enters data through input devices such as a keyboard or mouse, or a program requests file data from storage.
  • The operating system identifies the source, manages the request, and determines whether the data must be fetched from memory, storage, or an external device.

2. Data moves through the memory-storage path

  • If the required data is already in cache or RAM, the CPU accesses it quickly for processing.
  • If not, the system retrieves it from secondary storage such as an SSD or HDD, loads it into RAM, and then processes it.
  • During this stage, the hierarchy reduces delay by using the fastest available memory first.

3. Processed results are delivered through output or stored back

  • After computation, results may appear on a monitor, be printed, played through speakers, or transmitted over a network.
  • The data may also be saved back into storage for future use, such as writing a document to disk or updating a database file.
  • I/O control mechanisms like interrupts and DMA improve the efficiency of these transfers by reducing CPU waiting time.

Advantages / Applications

Improved system performance and responsiveness

  • Fast memory and cache reduce CPU waiting time, while SSDs speed up booting, launching applications, and loading files.
  • Efficient I/O methods improve multitasking and allow the system to handle more operations smoothly.

Reliable data storage and easy data access

  • Secondary storage ensures that files, programs, and operating systems remain available after shutdown.
  • Backup and redundant storage systems help protect against data loss caused by failures or accidents.

Wide practical use in computing environments

  • Memory and storage are used in personal computers, smartphones, servers, embedded systems, and cloud infrastructure.
  • I/O devices support real-world tasks such as typing documents, scanning records, displaying graphics, printing reports, recording audio, and connecting to the internet.

Summary

  • Memory provides fast temporary working space, storage systems provide permanent data retention, and I/O devices connect the computer with users and external systems.
  • The memory hierarchy, including registers, cache, RAM, and secondary storage, balances speed, cost, and capacity.
  • Efficient I/O methods such as interrupts and DMA help move data smoothly between devices, memory, and the CPU.
  • Key terms to remember: RAM, ROM, cache, HDD, SSD, input device, output device, DMA, interrupt, programmed I/O, memory hierarchy