Summary of Computer I/O and Storage Systems

Computer I/O & Storage Systems: A Student's Guide

Introduction

Storage and I/O are central to computer systems: they move data between devices, store information persistently, and determine how fast and reliable applications run. This chapter summarizes device behavior, performance metrics, interconnection methods, I/O programming models, and reliability strategies such as RAID.

Definition: I/O device — A hardware component used for input, output, or storage that communicates with the CPU and memory via controllers and buses.

1. I/O System Characteristics

Break complex ideas into smaller parts:

Behaviour and Partners

  • Behaviour: input, output, or storage.
  • Partner: human (e.g., keyboard, display) or machine (e.g., disk, network card).
  • Data rate: measured in bytes/sec or transfers/sec.

Performance and Dependability

  • Latency (response time): time to complete an individual I/O operation.
  • Throughput (bandwidth): amount of data processed per unit time.
  • Desktops/embedded systems prioritize low latency and device diversity. Servers prioritize high throughput and expandability.

Definition: Latency — The elapsed time from when an I/O request is issued until it completes.

Definition: Throughput — The sustained rate at which data or operations are completed, typically in MB/s or ops/sec.

💡 Věděli jste?Fun fact: Modern flash storage can be 100× to 1000× faster than hard disks for some operations, radically changing system designs.

2. Dependability Measures

  • Fault: component failure that may or may not lead to system failure.
  • MTTF (Mean Time To Failure): expected operating time before a failure occurs.
  • MTTR (Mean Time To Repair): expected time to restore service after a failure.
  • MTBF (Mean Time Between Failures): $\text{MTBF} = \text{MTTF} + \text{MTTR}$.
  • Availability: $\text{Availability} = \dfrac{\text{MTTF}}{\text{MTTF} + \text{MTTR}}$.

Improving availability:

  • Increase MTTF: fault avoidance, fault tolerance, fault forecasting.
  • Decrease MTTR: better diagnosis tools, streamlined repair processes.

3. Disk Storage: Organization and Access

Disk sectors and error handling

  • A sector contains: Sector ID, Data (commonly 512 B or proposed 4096 B), Error Correcting Code (ECC), sync fields, and gaps.
  • ECC hides defects and recording errors.

Definition: Sector — The smallest addressable unit on a disk containing data and metadata required for access and integrity.

Components of disk access time

  • Queueing delay: waiting for other pending requests.
  • Seek time: moving the read/write head to the target track.
  • Rotational latency: waiting for the sector to spin under the head.
  • Transfer time: moving data across the interface.
  • Controller overhead: processing time on the disk controller.

Example calculation (illustrative):

  • For 512 B sector, 15,000 rpm, average seek $4,\text{ms}$, controller overhead $0.2,\text{ms}$, transfer rate $100,\text{MB/s}$:
    • Rotational period $=\dfrac{60}{15000},\text{s} = 4,\text{ms}$ so average rotational latency $=2,\text{ms}$.
    • Transfer time $=\dfrac{512,\text{B}}{100\times10^6,\text{B/s}} = 0.005,\text{ms}$.
    • Average read time $=4,\text{ms} + 2,\text{ms} + 0.005,\text{ms} + 0.2,\text{ms} \approx 6.2,\text{ms}$.

Practical notes

  • Manufacturers quote average seek time over all seeks; OS scheduling and locality typically reduce real average seeks.
  • Smart disk controllers do logical-to-physical mapping and use caches to prefetch data.
💡 Věděli jste?Did you know that disk manufacturers often quote a mean time to failure (MTTF) that can be misinterpreted as a guaranteed lifetime; the actual failure distribution means many disks in a large population will fail each year?

4. Flash Storage

  • Nonvolatile semiconductor-based storage, faster and more robust than disks but more expensive per GB.
  • Two main types:
    • NOR flash: random read/write, used for instruction memory in embedded systems.
    • NAND flash: denser, block-at-a-time access, used in USB
Zaregistruj se pro celé shrnutí
FlashcardsKnowledge testSummaryPodcastMindmap
Start for free

Already have an account? Sign in

Storage and I/O Essentials

Klíčové pojmy: I/O characterized by latency (response time) and throughput (bandwidth)., Availability = MTTF / (MTTF + MTTR); improve by increasing MTTF or reducing MTTR., Disk access time = queueing + seek + rotational latency + transfer + controller overhead., Flash: NOR = random access, NAND = block access; use wear leveling for longevity., Buses: processor-memory (short, fast) vs I/O buses (longer, standardized)., I/O models: polling wastes CPU, interrupts are asynchronous, DMA moves data without CPU involvement., Ensure cache coherence for DMA by flushing/invalidation or using non-cacheable memory., RAID levels: RAID 0 (striping), RAID 1 (mirroring), RAID 5 (distributed parity), RAID 6 (dual parity)., Benchmarks (TPC, SPEC SFS, SPEC Web) measure throughput and response under workloads., Design: find weakest link for throughput; use queuing models under load., Modern drives internal remapping and caching can make OS-level disk scheduling less effective., Peak theoretical I/O rates rarely equal sustained system throughput due to other component limits.

## Introduction Storage and I/O are central to computer systems: they move data between devices, store information persistently, and determine how fast and reliable applications run. This chapter summarizes device behavior, performance metrics, interconnection methods, I/O programming models, and reliability strategies such as RAID. > Definition: I/O device — A hardware component used for input, output, or storage that communicates with the CPU and memory via controllers and buses. ## 1. I/O System Characteristics Break complex ideas into smaller parts: ### Behaviour and Partners - **Behaviour**: input, output, or storage. - **Partner**: human (e.g., keyboard, display) or machine (e.g., disk, network card). - **Data rate**: measured in bytes/sec or transfers/sec. ### Performance and Dependability - **Latency (response time)**: time to complete an individual I/O operation. - **Throughput (bandwidth)**: amount of data processed per unit time. - Desktops/embedded systems prioritize low latency and device diversity. Servers prioritize high throughput and expandability. > Definition: Latency — The elapsed time from when an I/O request is issued until it completes. > Definition: Throughput — The sustained rate at which data or operations are completed, typically in MB/s or ops/sec. Fun fact: Modern flash storage can be 100× to 1000× faster than hard disks for some operations, radically changing system designs. ## 2. Dependability Measures - **Fault**: component failure that may or may not lead to system failure. - **MTTF (Mean Time To Failure)**: expected operating time before a failure occurs. - **MTTR (Mean Time To Repair)**: expected time to restore service after a failure. - **MTBF (Mean Time Between Failures)**: $\text{MTBF} = \text{MTTF} + \text{MTTR}$. - **Availability**: $\text{Availability} = \dfrac{\text{MTTF}}{\text{MTTF} + \text{MTTR}}$. Improving availability: - Increase MTTF: fault avoidance, fault tolerance, fault forecasting. - Decrease MTTR: better diagnosis tools, streamlined repair processes. ## 3. Disk Storage: Organization and Access ### Disk sectors and error handling - A sector contains: Sector ID, Data (commonly 512 B or proposed 4096 B), Error Correcting Code (ECC), sync fields, and gaps. - ECC hides defects and recording errors. > Definition: Sector — The smallest addressable unit on a disk containing data and metadata required for access and integrity. ### Components of disk access time - Queueing delay: waiting for other pending requests. - Seek time: moving the read/write head to the target track. - Rotational latency: waiting for the sector to spin under the head. - Transfer time: moving data across the interface. - Controller overhead: processing time on the disk controller. Example calculation (illustrative): - For 512 B sector, 15,000 rpm, average seek $4\,\text{ms}$, controller overhead $0.2\,\text{ms}$, transfer rate $100\,\text{MB/s}$: - Rotational period $=\dfrac{60}{15000}\,\text{s} = 4\,\text{ms}$ so average rotational latency $=2\,\text{ms}$. - Transfer time $=\dfrac{512\,\text{B}}{100\times10^6\,\text{B/s}} = 0.005\,\text{ms}$. - Average read time $=4\,\text{ms} + 2\,\text{ms} + 0.005\,\text{ms} + 0.2\,\text{ms} \approx 6.2\,\text{ms}$. ### Practical notes - Manufacturers quote average seek time over all seeks; OS scheduling and locality typically reduce real average seeks. - Smart disk controllers do logical-to-physical mapping and use caches to prefetch data. Did you know that disk manufacturers often quote a mean time to failure (MTTF) that can be misinterpreted as a guaranteed lifetime; the actual failure distribution means many disks in a large population will fail each year? ## 4. Flash Storage - Nonvolatile semiconductor-based storage, faster and more robust than disks but more expensive per GB. - Two main types: - **NOR flash**: random read/write, used for instruction memory in embedded systems. - **NAND flash**: denser, block-at-a-time access, used in USB