quiz Informatica · 5 questions

I/O Subsystem Fundamentals

help_outline 5 questions
timer ~3 min
auto_awesome AI-generated
0 / 5
Score : 0%
1

A device that transfers data one byte at a time without addressing individual blocks is classified as:

2

When scheduling disk requests with the SSTF algorithm, which factor primarily determines the next request to service?

3

In a RAID 5 array, why is a separate parity disk not a performance bottleneck?

4

A CPU reading a word from an address that may belong to either memory or an I/O port must first indicate which space is being accessed. Which signal is used for this purpose?

5

When an SSD writes new data to a page, which preliminary operation must be performed on the entire block containing that page?

menu_book

I/O Subsystem Fundamentals

Review key concepts before taking the quiz

I/O Subsystem Fundamentals

The I/O subsystem is the bridge between the central processing unit (CPU) and the myriad of peripheral devices that a computer system uses. Understanding its core concepts—such as device classification, disk scheduling, RAID architectures, and flash‑memory operations—is essential for anyone studying operating systems or computer architecture. This course explains each concept in depth, provides practical examples, and ties the material back to the quiz questions that motivated the lesson.

Character and Block Devices

What is a character device?

A character device transfers data one byte (or a small group of bytes) at a time, without any notion of addressing larger logical blocks. Typical examples include keyboards, serial ports, and mouse devices. Because the operating system cannot seek to a specific block, the driver simply streams bytes as they arrive, making the device ideal for real‑time or sequential data flows.

What is a block device?

In contrast, a block device presents storage as a collection of fixed‑size blocks (usually 512 bytes or 4 KB). The OS can read or write any block directly, allowing random access and efficient caching. Hard‑disk drives (HDDs), solid‑state drives (SSDs), and many network storage systems fall into this category.

  • Character devices are accessed via /dev/tty, /dev/console, etc., and use the character‑oriented I/O system calls.
  • Block devices are accessed via /dev/sda, /dev/nvme0n1, and support operations such as seek() and fsync().
  • Hybrid devices (e.g., CD‑ROMs with both block and character interfaces) exist but are less common in modern systems.

Understanding this distinction helps answer the quiz question: a device that transfers data one byte at a time without addressing individual blocks is a character device.

Disk Scheduling and the SSTF Algorithm

Understanding Shortest Seek Time First (SSTF)

The SSTF (Shortest Seek Time First) algorithm selects the pending I/O request whose target cylinder is closest to the current head position. By minimizing the distance the read/write head must travel, SSTF often reduces average seek time compared with simple FIFO scheduling.

  • Primary factor: the shortest distance between the current head location and the requested cylinder.
  • Requests with the same distance are typically broken ties by arrival order.
  • While SSTF improves performance, it can cause starvation for requests far from the current head.

Therefore, the quiz answer highlights that the next request is chosen based on the shortest distance of the head from the current cylinder.

RAID 5 and Parity Distribution

Why RAID 5 does not need a dedicated parity disk

RAID 5 achieves fault tolerance by storing parity information alongside data, but it does so in a rotating fashion across all disks in the array. Each stripe (a set of blocks written simultaneously) contains data blocks on n‑1 disks and a parity block on the remaining disk. On the next stripe, the parity block moves to a different disk, ensuring that no single disk becomes a performance bottleneck.

  • Parity is calculated as the XOR of all data blocks in the stripe.
  • During a write, the controller reads the old data and old parity, computes the new parity, and writes both the new data and new parity to their respective disks.
  • Because parity I/O is spread evenly, write performance scales with the number of disks, and no single “parity disk” becomes a hotspot.

This design directly answers the quiz statement: parity is stored on the same disks as data, rotating among them, which eliminates a dedicated parity bottleneck.

I/O Space Select Signal

Distinguishing memory and I/O accesses

Modern CPUs share a common address bus for both main memory and I/O ports, but they must indicate which address space is being accessed. This is done with the I/O‑space select line (often called IO/M or IOREQ on x86 architectures). When the line is asserted, the address is interpreted as an I/O port; when de‑asserted, it refers to regular memory.

  • The read control line (RD) and write control line (WR) control data transfer direction but do not specify the address space.
  • The address bus carries the location, while the data bus carries the payload.

Thus, the correct answer to the quiz is the I/O‑space select line.

SSD Write Process: Erasing Whole Blocks

Why an erase is required before a write

Flash‑based solid‑state drives (SSDs) store data in pages (typically 4 KB to 16 KB) that belong to larger erase blocks (often 256 KB to several MB). NAND flash cells can only transition from a programmed (1) state to an erased (0) state; they cannot change a bit from 0 back to 1 without an erase operation.

Consequently, when the controller needs to update a single page, it must:

  1. Read the entire block into a RAM buffer.
  2. Modify the target page in the buffer.
  3. Erase the whole block on the NAND chip.
  4. Program the updated block back to the flash.

This erase‑before‑write requirement is the reason the quiz answer is an erase of the whole block. It also explains why SSDs employ wear‑leveling and garbage‑collection algorithms to spread erase cycles evenly across the device.

Review Quiz and Key Takeaways

Quiz Questions Recap

  • Question 1: A device that transfers data one byte at a time without addressing individual blocks is a character device.
  • Question 2: SSTF selects the request with the shortest distance of the head from the current cylinder.
  • Question 3: In RAID 5, parity is stored on the same disks as data, rotating among them, so there is no dedicated parity bottleneck.
  • Question 4: The CPU uses the I/O‑space select line to indicate whether an address refers to memory or an I/O port.
  • Question 5: Before writing new data to a page on an SSD, the controller must erase the whole block containing that page.

Reviewing these points reinforces the core concepts of the I/O subsystem, from low‑level device classification to high‑level storage strategies.

Conclusion

Mastering the fundamentals of the I/O subsystem equips you to design, troubleshoot, and optimize modern computer systems. Whether you are configuring RAID arrays for data resilience, tuning disk‑scheduling policies for performance, or developing drivers that correctly toggle the I/O‑space select line, the principles covered here form the backbone of reliable operating‑system behavior. Continue exploring each topic—experiment with different scheduling algorithms, build a small RAID 5 prototype, or examine SSD firmware logs—to deepen your practical understanding and stay ahead in the fast‑evolving field of computer systems.

Stop highlighting.
Start learning.

Join students who have already generated over 50,000 quizzes on Quizly. It's free to get started.