Advanced Computer Architecture

Chapter 9
I/O, Storage and Persistent-Memory Architectures

Post Graduate Program in Computer Science Engineering
Advanced Computer Architecture   •   Post Graduate

I/O, Storage and Persistent-Memory Architectures

Introduction and Context

A computer system is useful only when it can acquire data, transform it, communicate results, and preserve information beyond the lifetime of a program or power supply. These activities are governed by the input/output (I/O) subsystem and by storage and memory technologies. In modern systems, the distinction between “memory” and “storage” is becoming less rigid. Solid-state drives, non-volatile memory modules, storage-class memory, and persistent-memory programming models increasingly occupy the space between conventional DRAM and secondary storage.

Advanced computer architecture therefore treats I/O as a first-class performance and reliability concern. Processor performance may improve rapidly while data movement remains constrained by latency, bandwidth, queueing, software overhead, energy consumption, and consistency requirements. A high-performance architecture must optimize not only computation but also the movement, placement, persistence, and protection of data.

This chapter examines I/O organization, storage hierarchies, storage interfaces, persistent-memory technologies, data paths, performance models, reliability, and system-level design trade-offs.

Learning Objectives

After completing this chapter, the learner should be able to:

  1. Explain the organization and operation of modern I/O subsystems.
  2. Distinguish latency, bandwidth, throughput, IOPS, queue depth, and tail latency.
  3. Analyze storage hierarchies from registers to persistent storage.
  4. Compare programmed I/O, interrupt-driven I/O, and direct memory access.
  5. Explain SSD architecture, flash translation layers, and NVMe-style interfaces.
  6. Describe persistent-memory technologies and programming models.
  7. Analyze durability, ordering, consistency, and failure-atomicity requirements.
  8. Evaluate architectural trade-offs involving performance, cost, endurance, reliability, and energy.

1. The I/O System as a Data-Movement Architecture

An I/O system connects processors and memory to devices such as network adapters, storage controllers, sensors, graphics processors, and accelerators. Its major components are:

  • Device: Performs an external function, such as storing blocks or transmitting packets.
  • Controller: Implements device-specific control logic and presents registers, queues, and status information.
  • Interconnect: Carries commands, data, and control messages. Examples include PCI Express, CXL, Ethernet, and on-chip networks.
  • Operating-system driver: Converts software requests into device operations.
  • I/O memory-management unit (IOMMU): Translates device-visible addresses and enforces isolation.
  • Buffering and queueing structures: Absorb speed differences and permit concurrency.

A modern data path is often asynchronous. The processor submits a request, the device performs work independently, and a completion notification later informs software that the operation has finished.

Layered I/O data path from application to device Application and libraries Operating system and file system Device driver and I/O queues Interconnect, IOMMU, and controller Device: SSD, network adapter, or accelerator
Layered I/O data path from application to device
Figure: Layered I/O data path from application to device

Figure: A layered I/O path. Data and control travel through software, interconnect, and device layers; completion information travels in the reverse direction.

1.1 Programmed, Interrupt-Driven, and DMA I/O

In programmed I/O, the processor repeatedly reads device status and transfers data through load and store instructions. This approach is simple but wastes processor cycles during long device operations.

In interrupt-driven I/O, the device interrupts the processor when an event occurs. Interrupts reduce busy waiting, but high interrupt rates can create overhead. Systems commonly use interrupt moderation, in which several events are reported together.

Direct memory access (DMA) allows a controller to transfer data between a device and main memory without requiring the processor to copy every word. The processor configures a descriptor containing an address, length, direction, and control flags. The controller then performs the transfer and signals completion.

DMA introduces important architectural issues. Cache coherence must ensure that the device and processor observe appropriate data. The IOMMU can restrict the physical regions that a device may access, reducing the impact of a faulty or compromised device. Scatter-gather DMA permits one logical request to use multiple non-contiguous memory buffers.

1.2 Polling and Event Notification

Polling can outperform interrupts when request rates are high and predictable because it avoids interrupt entry and exit costs. However, polling consumes processor resources and can increase energy consumption. Hybrid approaches poll briefly after submitting a request and then sleep or use interrupts if completion does not arrive quickly.

2. Storage Hierarchy and Performance Metrics

The storage hierarchy exploits locality. Small, fast, expensive technologies are placed near the processor, while larger, slower, less expensive technologies provide capacity and persistence.

LevelTypical roleVolatile?Main performance concern
Registers and cachesImmediate instruction/data accessYesAccess latency
DRAMMain memoryYesLatency and bandwidth
Persistent memoryByte-addressable durable dataUsually noPersistence and endurance
NVMe SSDBlock-oriented secondary storageNoLatency, IOPS, tail behavior
HDD or archival storageLarge-capacity storageNoSeek time, cost, capacity
Remote storageShared or replicated dataNoNetwork and service latency

Important metrics include:

  • Latency: Time from request submission to completion.
  • Bandwidth: Data transferred per unit time, commonly bytes/s.
  • IOPS: Completed I/O operations per second.
  • Throughput: Useful work completed per unit time; it may be measured in bytes/s or operations/s.
  • Queue depth: Number of outstanding requests.
  • Tail latency: A high percentile, such as the 99th or 99.9th percentile, rather than the average.
  • Endurance: Amount of data or number of program/erase cycles a device can sustain.
  • Availability: Fraction of time that the service is operational.

For a single request, a useful decomposition is:

Ttotal = Tqueue + Tcontroller + Ttransfer + Tdevice + Tsoftware

Here, each term is a time in seconds: queueing delay, controller processing, data-transfer time, device service time, and software overhead. The decomposition is approximate because some activities overlap. It is most useful when identifying bottlenecks.

For a transfer of size S bytes over a link with effective bandwidth B bytes/s, the transfer component is:

Ttransfer = S ÷ B

This assumes that protocol overhead, contention, and startup delay have either been included in the effective bandwidth or modeled separately.

For an idealized sequential workload with average request size S and request rate R, the required bandwidth is:

Brequired = R × S

For example, 100,000 requests/s of 16 KiB each require approximately 1.6384 GB/s using decimal bytes only if 1 KiB is interpreted as 1,024 bytes: 100,000 × 16 × 1,024 = 1,638,400,000 bytes/s. This is about 1.64 GB/s. Real systems require additional capacity for protocol overhead, metadata, and burst behavior.

2.1 Queueing and Little’s Law

A useful relationship for a stable system is Little’s Law:

L = λ × W

L is the average number of requests in the system, λ is the average arrival rate in requests/s, and W is the average time a request spends in the system in seconds. The result is dimensionless as a count of requests. The law applies to a stable long-run system in which average arrival and departure rates match.

If a storage device sustains 200,000 IOPS and the average residence time is 2 ms, the average number of outstanding requests is 200,000 × 0.002 = 400. Increasing queue depth beyond the point at which the device is saturated generally increases latency rather than throughput.

Average latency alone is insufficient for interactive services. Garbage collection, thermal throttling, firmware recovery, and contention may cause rare but severe delays. Therefore, service-level objectives often specify both throughput and percentile latency.

3. Interconnects, Queues, and Coherent I/O

Older peripheral buses often relied on a shared bus and centralized arbitration. Modern systems use packetized, point-to-point links with multiple lanes and full-duplex communication. A link with n lanes, each providing effective rate r bits/s per direction, has ideal aggregate one-direction bandwidth:

Bideal = n × r

This is a link-rate calculation, not an application-throughput guarantee. Encoding, packet headers, flow control, contention, and software overhead reduce usable bandwidth.

High-performance devices use submission and completion queues. A producer places descriptors into a submission queue, and the device places results into a completion queue. Multiple queues allow parallelism across controller cores, channels, or CPU cores. Queue placement should consider NUMA locality: a request submitted by a processor on one socket may incur additional latency if its data and device are attached to another socket.

Coherent I/O extends coherence or shared-memory semantics toward devices. A coherent accelerator can observe memory updates according to a defined protocol, reducing explicit copying. However, coherence traffic consumes bandwidth and does not automatically guarantee durable persistence. Visibility to another cache, visibility to a device, and persistence after power failure are distinct properties.

4. Solid-State Storage Architecture

A flash-based SSD contains NAND flash packages, channels, controllers, DRAM or SRAM buffers, firmware, and error-correction mechanisms. NAND flash is organized hierarchically into pages, blocks, planes, and dies. Reading and programming occur at page granularity, whereas erasing generally occurs at larger block granularity.

NAND cells store one or more bits. Single-level cell stores one bit per cell; multi-level, triple-level, and quad-level technologies store progressively more bits. Higher density reduces cost per bit but generally introduces tighter voltage margins, greater latency variation, and lower endurance.

Because flash cannot freely overwrite arbitrary data in place, an SSD uses a flash translation layer (FTL). The FTL maps logical block addresses to physical flash locations. On a write, new data may be placed in a fresh page while the old page becomes invalid. Garbage collection later copies valid pages from selected blocks and erases those blocks.

This creates write amplification:

WA = (byteswrittentoflash) ÷ (byteswrittenbyhost)

The ideal value is 1. A value greater than 1 indicates that internal copying, metadata updates, or recovery operations caused more flash writes than the host requested. Write amplification depends on workload randomness, overprovisioning, garbage-collection policy, alignment, and available free space.

Overprovisioning reserves physical capacity that is not exposed to the host. It gives the FTL room for wear leveling and garbage collection. Wear leveling distributes program/erase cycles across blocks. TRIM or deallocate commands inform the SSD that logical ranges no longer contain useful data, reducing unnecessary copying.

SSDs use error-correcting codes, bad-block management, metadata journaling, and sometimes capacitors or batteries to protect in-flight data. A device’s advertised durability should be interpreted together with workload size, write pattern, temperature, and warranty conditions.

5. NVMe and High-Performance Storage Interfaces

Traditional storage protocols were designed for rotating disks and often impose unnecessary serialization or interrupt overhead on flash devices. NVMe is designed around PCI Express and supports many submission and completion queues, large queue depths, and efficient command structures.

An NVMe-style design typically maps queues into memory and uses doorbell registers to notify the controller. The host writes a command into a submission queue and updates a tail pointer. The controller consumes the command, performs the operation, and writes a completion entry. The host processes completions and advances the queue head.

The architectural benefits include:

  • parallel queues associated with processor cores;
  • reduced locking and synchronization;
  • lower command-processing overhead;
  • support for high IOPS and non-uniform latency;
  • explicit features for namespaces, reservations, virtualization, and telemetry.

The interface does not remove all bottlenecks. File-system metadata, system calls, memory copies, PCIe contention, CPU scheduling, encryption, and device garbage collection may dominate observed latency.

6. Persistent Memory: Concepts and Technologies

Persistent memory is memory whose contents survive power loss or reset, subject to the technology’s durability guarantees. It can be distinguished from ordinary storage by its potential for direct, byte-addressable access and by its ability to reduce software data movement.

Technologies associated with persistent memory include:

  • Battery-backed or non-volatile DRAM: Uses backup power or non-volatile support to preserve contents.
  • NAND-based persistent storage: Provides high density but normally exposes block-oriented access.
  • Phase-change memory and resistive memory: Store state through material resistance or phase changes; they remain important research and specialized technologies.
  • Persistent-memory modules: Present durable media through a memory interface and may support load/store access with appropriate software modes.
  • CXL-attached memory and devices: Extend memory capacity or device attachment beyond traditional socket boundaries; coherence and persistence semantics depend on the implementation.

Persistent memory has two independent dimensions:

  1. Addressability: Whether software accesses data through loads and stores or through block commands.
  2. Durability: Whether completed writes survive power failure and under what ordering rules.

A byte-addressable device may still require explicit instructions to flush modified cache lines and order persistence. A store reaching a processor cache is not necessarily durable.

6.1 Visibility, Ordering, and Persistence

Consider a record containing data and a validity flag. A correct update requires that data become persistent before the validity flag indicates completion. A simplified sequence is:

  1. Write the new data.
  2. Flush or otherwise make the data durable.
  3. Execute the required persistence-ordering barrier.
  4. Write and flush the validity flag.

The exact instructions and guarantees depend on the processor architecture, operating system, memory mode, and persistent-memory programming library. A memory fence orders operations for the specified observers; it is not automatically a persistence operation.

Three states should be distinguished:

  • Program order: Order in which instructions are issued.
  • Visibility order: Order in which other processors or devices can observe writes.
  • Persistence order: Order in which writes become recoverable after power failure.

Failure-atomicity means that after a crash, an update appears either complete or absent, rather than arbitrarily partially applied. It commonly requires logging, copy-on-write, checksums, version numbers, or transactional mechanisms.

6.2 Persistent Data Structures

A persistent data structure must account for cache-line granularity, alignment, torn writes, metadata consistency, and recovery time. Common approaches include:

  • Undo logging: Save old values before modification, then restore them if the operation fails.
  • Redo logging: Record intended new values and apply them during recovery.
  • Copy-on-write: Write a new version and atomically publish a pointer or root reference.
  • Shadow paging: Maintain old pages until a new consistent root is committed.
  • Checksummed versioning: Store a version and checksum so recovery can identify valid records.

Persistent-memory programming is not simply “using a faster SSD.” It changes the boundary between application data structures and storage software. Pointer swizzling, allocation, recovery, concurrency control, and compatibility become architectural concerns.

7. Reliability, Availability, and Data Protection

Storage systems must tolerate media errors, controller failures, power interruption, software defects, and malicious modification. Reliability mechanisms include:

  • ECC and stronger page-level error correction;
  • replication and erasure coding;
  • end-to-end checksums;
  • journaling and copy-on-write;
  • spare blocks and wear leveling;
  • power-loss protection;
  • secure erase and encryption;
  • monitoring of temperature, error rates, and remaining endurance.

For independent components with availabilities A1, A2, …, a series system that fails when any component fails has availability:

Aseries = ∏ Ai

For two independent redundant components in parallel, where the system works if at least one works:

Aparallel = 1 − (1 − A1)(1 − A2)

These formulas assume statistical independence and clearly defined failure and repair models. Real systems often violate independence because shared power, firmware, racks, or software can create common-cause failures.

Durability and availability are not identical. A replicated system may remain available while silently returning corrupt data unless it uses integrity verification. Likewise, a device can be durable but unavailable because its controller has failed.

8. Applied Case: Persistent Write-Ahead Logging for a Transaction Service

Background

Consider an illustrative financial transaction service that processes 250,000 small transactions per second. Each transaction updates an account record and must survive a sudden power failure once acknowledged.

Problem

A conventional design writes a log record to an SSD, waits for a flush, updates an in-memory index, and later writes data pages. The system meets durability requirements but experiences high tail latency because each commit incurs software and storage overhead.

Analysis

The service measures average latency of 0.8 ms but a 99.9th-percentile latency of 12 ms. Investigation identifies queue contention, synchronization among logging threads, and SSD garbage-collection pauses. The service also discovers that a device cache is volatile unless a power-loss-protection condition is satisfied.

Approach

The redesigned architecture uses:

  1. Per-core submission queues to reduce lock contention.
  2. Batching of log records while preserving commit order.
  3. A persistent-memory log region for byte-addressable append operations.
  4. Sequence numbers and checksums for recovery.
  5. A commit protocol in which data records are persisted before the commit marker.
  6. A background process that transfers older log segments to encrypted NVMe storage.
  7. Replication to a separate failure domain.

The log record contains a transaction identifier, affected object, new value, sequence number, length, checksum, and commit state. Recovery scans records, validates checksums, discards incomplete records, and replays committed operations in sequence order.

Outcome

The architecture reduces device submissions for small records and lowers tail latency, but it introduces new obligations: persistent-memory capacity is limited, allocator metadata must be recoverable, and replication remains necessary for device or host failure. The system therefore combines persistent memory for low-latency logging with SSDs for capacity and archival retention.

Learning Points

  • Lower latency does not eliminate the need for ordering and recovery.
  • Persistence, replication, and integrity are separate requirements.
  • Queue organization and NUMA placement affect tail latency.
  • Hybrid hierarchies often provide a better cost-performance balance than a single technology.

9. Design Trade-offs and Best Practices

Architects should evaluate an I/O or storage design using the complete workload rather than a peak benchmark. Important questions include:

  • Is the workload sequential or random?
  • What are request sizes and read/write ratios?
  • What latency percentile is required?
  • Is ordering required between operations?
  • What data must survive power loss, host failure, or site failure?
  • How will endurance and write amplification be controlled?
  • Does the device support secure erase, encryption, and audit logging?
  • Are queues, interrupts, and memory placement aligned with the processor topology?
  • Can the software recover from partially completed operations?

Best practices include measuring tail latency, reserving capacity for overprovisioning, aligning I/O to device and file-system units, using asynchronous queues, validating flush and durability semantics, monitoring SMART or equivalent health data, testing power-loss recovery, and documenting assumptions about ordering and failure.

10. Contemporary Developments and Research Directions

Several developments are reshaping I/O architecture:

  • Computational storage: Processing data near or inside the storage device to reduce movement.
  • SmartNICs and DPUs: Offloading networking, security, storage, and virtualization functions.
  • CXL-based memory expansion: Supporting larger or disaggregated memory pools with varying latency and coherence properties.
  • Zoned storage: Requiring software to write data according to device-managed zones, reducing translation overhead and write amplification.
  • Storage-class disaggregation: Pooling storage across servers while managing network latency and failure domains.
  • AI-oriented storage: Designing paths for large sequential datasets, checkpointing, vector databases, and high-concurrency metadata operations.
  • Software-defined reliability: Integrating checksums, erasure coding, telemetry, and predictive maintenance into the storage stack.

These developments create research questions concerning programmability, security isolation, memory consistency, performance predictability, resource scheduling, and sustainable energy use.

Challenges and Limitations

No storage technology dominates all dimensions. DRAM is fast but volatile and relatively expensive. Persistent memory reduces copying but requires complex programming and has limited endurance or capacity in some implementations. NAND SSDs provide excellent random access compared with disks but have write amplification and variable latency. Distributed storage improves capacity and resilience but adds network and coordination costs.

Benchmarks can mislead when they omit warm-up, queue depth, synchronization, garbage collection, power-loss behavior, or failure recovery. Architectural claims must therefore state workload, data size, concurrency, device configuration, measurement interval, and durability mode.

Security is also a continuing limitation. DMA-capable devices can access sensitive memory if IOMMU policies are incorrect. Persistent media may retain confidential data after deallocation. Encryption keys, secure deletion, firmware updates, tenant isolation, and side-channel exposure require governance as well as engineering.

Chapter Summary

I/O and storage architecture determine how efficiently a computer system moves, preserves, and protects data. The I/O path includes software, drivers, queues, interconnects, memory-management hardware, controllers, and devices. Programmed I/O, interrupts, and DMA represent different trade-offs between processor overhead, latency, and concurrency.

Storage hierarchies combine volatile and non-volatile technologies. Performance must be analyzed using latency, bandwidth, IOPS, queue depth, tail latency, and write amplification rather than a single headline number. SSDs depend on flash translation layers, garbage collection, wear leveling, error correction, and overprovisioning. High-performance interfaces such as NVMe exploit parallel queues but do not remove software and media bottlenecks.

Persistent memory introduces byte-addressable durable data, but visibility, ordering, and persistence are distinct properties. Correct systems require failure-atomic updates, logging or copy-on-write, checksums, recovery procedures, and explicit durability semantics. Future architectures increasingly combine coherent interconnects, computational devices, pooled memory, and software-defined resilience.

Key Terms

I/O subsystem: Hardware and software responsible for communication between processors, memory, and external devices.

DMA: Direct memory access performed by a device controller without per-word processor intervention.

IOMMU: Hardware that translates and restricts device memory accesses.

Latency: Time required to complete an operation.

Bandwidth: Data transferred per unit time.

IOPS: Number of completed I/O operations per second.

Queue depth: Number of outstanding requests.

Tail latency: A high-percentile service time.

NUMA: Non-uniform memory access in which access cost depends on processor and memory location.

SSD: Solid-state storage device, usually based on NAND flash.

FTL: Flash translation layer mapping logical addresses to physical flash locations.

Garbage collection: Relocation of valid data followed by erasure of obsolete flash blocks.

Write amplification: Ratio of internal media writes to host-requested writes.

Overprovisioning: Reserved device capacity used for maintenance and endurance management.

Persistent memory: Memory or storage whose contents can survive power loss under defined conditions.

Durability: Ability of acknowledged data to survive the specified failure event.

Failure-atomicity: Property that an update is recovered as complete or absent rather than partially applied.

Write-ahead logging: Recording changes in a durable log before applying or acknowledging them.

Coherent I/O: Device access that participates in defined memory-coherence semantics.

Erasure coding: Redundancy method that reconstructs missing data from coded fragments.

Review Questions

Short Answer Questions

  1. What are the main differences between programmed I/O, interrupt-driven I/O, and DMA?
  2. Define latency, bandwidth, IOPS, and queue depth.
  3. Why does an SSD require a flash translation layer?
  4. Distinguish visibility from persistence.
  5. What is write amplification, and why is it important?

Long Answer Questions

  1. Explain the complete data path from an application request to an SSD and identify possible bottlenecks.
  2. Describe NAND flash organization and explain garbage collection, wear leveling, and overprovisioning.
  3. Compare interrupt-based and polling-based I/O for low-rate and high-rate workloads.
  4. Explain how persistent-memory logging can provide failure-atomic updates.
  5. Discuss reliability, availability, integrity, and durability as separate storage-system goals.

Analytical / Application Questions

  1. A system receives 80,000 requests/s, each of size 32 KiB. Calculate the minimum payload bandwidth and discuss why the practical requirement is higher.
  2. A storage service sustains 150,000 IOPS with an average request residence time of 4 ms. Use Little’s Law to calculate the average number of outstanding requests and interpret the result.
  3. Design a hybrid architecture for a transaction system requiring low-latency commits, large capacity, crash recovery, encryption, and tolerance of a single device failure. Justify the placement of each data structure.

Multiple Choice Questions with Answers

Question 1

Which mechanism allows a device controller to transfer a block directly between the device and main memory?

A. Programmed I/O

B. Direct memory access

C. Interrupt moderation

D. Polling

Correct Answer: B. Direct memory access

Question 2

A system sustains 100,000 requests per second, each of 4 KiB. What payload bandwidth is required?

A. 40.96 MB/s

B. 409.6 MB/s

C. 4.096 GB/s

D. 40.96 GB/s

Correct Answer: B. 409.6 MB/s

Question 3

Which component translates logical block addresses into physical NAND locations?

A. IOMMU

B. File descriptor table

C. Flash translation layer

D. Interrupt controller

Correct Answer: C. Flash translation layer

Question 4

If a storage device completes 200,000 requests/s and average residence time is 2 ms, what is the average number of outstanding requests?

A. 40

B. 100

C. 400

D. 4,000

Correct Answer: C. 400

Question 5

Which statement best distinguishes persistence from visibility?

A. Visibility concerns recovery after power loss, while persistence concerns cache coherence.

B. Persistence means data is recoverable after the specified failure, while visibility concerns what observers can see.

C. They are always identical on every processor.

D. Persistence applies only to volatile registers.

Correct Answer: B. Persistence means data is recoverable after the specified failure, while visibility concerns what observers can see.

Question 6

What is the principal purpose of SSD overprovisioning?

A. To increase processor clock frequency

B. To provide space for garbage collection and wear management

C. To eliminate error-correcting codes

D. To convert random writes into network packets

Correct Answer: B. To provide space for garbage collection and wear management

Question 7

Which operation generally occurs at a larger granularity than NAND flash programming?

A. Reading a byte

B. Issuing an interrupt

C. Erasing a flash block

D. Updating a queue pointer

Correct Answer: C. Erasing a flash block

Question 8

Which technique records intended updates so they can be replayed during recovery?

A. Redo logging

B. Polling

C. Cache indexing

D. Link encoding

Correct Answer: A. Redo logging

Question 9

For two independent redundant components with availability 0.99 each, what is the parallel-system availability?

A. 0.9801

B. 0.99

C. 0.9999

D. 1.98

Correct Answer: C. 0.9999

Question 10

Why are tail-latency measurements important in storage systems?

A. They reveal rare but potentially service-disruptive delays.

B. They replace the need to measure throughput.

C. They measure only storage capacity.

D. They guarantee device endurance.

Correct Answer: A. They reveal rare but potentially service-disruptive delays.

Advanced Computer Architecture
Chapter 9 of 9