🎓 BookMCQ
← Back to 13. I/O Systems

📝 Performance of I/O Systems (21 MCQs)

Measures of I/O System Performance

I/O system performance describes how efficiently the operating system and hardware complete data transfer requests. Important measures include throughput, response time, latency, bandwidth, and CPU utilisation. Performance depends on device capabilities, request sizes, queueing, caching, buffering, transfer methods, and contention. Evaluating these factors helps determine whether delays arise from hardware limits or inefficient software coordination.

Sources of Delay Across the I/O Path

An I/O request may wait for a device queue, controller availability, mechanical positioning, network transmission, or memory transfer. Software processing and copying also add overhead. A fast device cannot guarantee low response time when requests accumulate in queues, while a high-throughput design may still deliver poor responsiveness to individual requests.

Calculating Throughput, Latency and Transfer Time

Throughput measures completed data per unit time, while latency measures the delay before or during a request's completion. For a transfer of size S over bandwidth B, the ideal transmission time is S divided by B. Actual time also includes setup, queueing, device service, protocol, and completion-handling delays.

Example of a Storage Transfer Calculation

Suppose a device transfers 8 MB at an effective rate of 100 MB per second. The ideal data transfer time is 8 divided by 100 seconds, or 0.08 seconds. If setup and queueing add 0.02 seconds, the approximate total becomes 0.10 seconds, assuming no further delays.

Optimisation Through Caching, DMA and Scheduling

DMA reduces CPU involvement in large transfers, caching avoids repeated device access, and scheduling can improve request order. Buffering coordinates devices and applications operating at different speeds. Each technique addresses a different bottleneck, and gains depend on workload. Excessive caching, large buffers, or aggressive batching can increase memory use or individual request latency.

Misconceptions About I/O Performance

'Higher throughput always means lower response time' is false because requests may wait longer in queues. 'DMA increases the physical bandwidth of a device' is incorrect because it mainly reduces CPU data-movement work. 'A cache hit eliminates every source of delay' overlooks memory access, software processing, synchronisation, and scheduling overhead.

Exam Focus: Performance Metrics and Transfer Calculations

Calculate ideal transfer time using data size divided by bandwidth, then add stated setup or queueing delays. Distinguish throughput, latency, response time, and CPU utilisation. Questions may compare DMA, buffering, caching, and scheduling, asking which bottleneck each mechanism reduces and why one performance measure can improve without another improving.

Key Terms of I/O Performance

  • Throughput - Data completed per unit time.
  • Latency - Delay associated with an operation.
  • Bandwidth - Maximum data transfer capacity.
  • Queueing delay - Time waiting before device service.
  • Transfer time - Time required to move data.
8
Easy
8
Medium
5
Hard

📝 All Performance of I/O Systems MCQs

Q1. A program writes characters to a terminal (character‑stream device) and large blocks to a disk (block device). Which reason best explains why the terminal output appears immediately while disk writes may be delayed?

A.A Both devices buffer data equally, but the terminal flushes faster.
B.B Terminals transfer data byte‑by‑byte with low latency, whereas disks write whole blocks, incurring seek and rotational delay. ✅
C.C Disk writes are synchronous while terminal writes are asynchronous.
D.D The terminal uses a dedicated channel, but the disk is sharable.
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The terminal is a character‑stream device, so each byte is sent directly to the hardware with minimal buffering, giving near‑instant feedback. A disk is a block device that must collect a full block before writing, and it also suffers from seek time and rotational latency, which introduce delays. Option B captures these timing differences; the other choices misstate buffering, synchronization, or sharing characteristics, leading to incorrect explanations.

Q2. When a program needs to read sensor data that arrives irregularly, which type of device access method should it use to avoid wasting CPU cycles?

A.A Block I/O with large buffers. ✅
B.B Memory‑mapped file access.
C.C Asynchronous character‑stream I/O.
D.D Synchronous random‑access I/O.
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Irregular sensor data fits asynchronous character‑stream I/O because the device can deliver bytes whenever they become available without the program polling continuously. This prevents the CPU from busy‑waiting. Block I/O (A) would require waiting for whole blocks, memory‑mapped access (B) is better for files, and synchronous random‑access (D) forces the program to wait for each operation, all of which would waste cycles.

Q3. A database server stores records on a disk that supports both read‑only and read‑write modes. Which access convention most efficiently supports random record retrieval without copying data into user space?

A.A Block I/O with sequential reads. ✅
B.B Character‑stream I/O.
C.C Memory‑mapped file access.
D.D Network sockets.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Memory‑mapped file access maps disk pages directly into the process’s address space, allowing the OS to fetch only the needed pages on demand, which is ideal for random record access. Block I/O with sequential reads (A) forces the program to read data in order, character‑stream I/O (B) works byte‑by‑byte, and network sockets (D) are unrelated to local disk access, making them less suitable.

Q4. A multimedia application streams video from a CD‑ROM to the screen. Which characteristic of the CD‑ROM most influences the smoothness of playback?

A.A Read‑write capability. ✅
B.B Device sharable status.
C.C Transfer rate.
D.D Latency between operations.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The transfer rate determines how quickly the CD‑ROM can supply data to the video buffer; a higher rate reduces the chance of buffer underruns, leading to smoother playback. Read‑write capability (A) is irrelevant because the CD‑ROM is read‑only, sharing status (B) affects concurrency but not smoothness, and operation latency (D) is less critical than sustained throughput for continuous streaming.

Q5. A real‑time system must guarantee that a specific I/O operation completes within 5 ms. Which device attribute should be examined first to verify feasibility?

A.A Device speed (bytes per second).
B.B Device sharing policy. ✅
C.C Asynchronous behavior.
D.D Block size.
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Device speed directly indicates the maximum data transfer capability; knowing the required bytes and the device’s throughput lets you calculate whether the 5 ms deadline can be met. Sharing policy (B) and asynchronous behavior (C) affect concurrency but not the raw timing, while block size (D) influences granularity but not the fundamental speed constraint.

Q6. A file server uses a dedicated disk for write‑intensive workloads. Which statement best explains why a dedicated device is chosen over a sharable one?

A.A Dedicated devices have lower latency because they are not contended.
B.B Sharable devices cannot perform block I/O. ✅
C.C Dedicated devices support asynchronous transfers.
D.D Sharable devices are always character‑stream devices.
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: A dedicated disk eliminates contention from other processes, ensuring that write‑intensive operations experience consistent, low latency and predictable performance. Sharable devices can still perform block I/O (B), may support asynchronous transfers (C), and can be either block or character devices, so options B, C, and D are inaccurate.

Q7. An operating system needs to copy a large file from one location to another on the same disk. Which I/O mode minimizes CPU involvement while maintaining data integrity?

A.A Synchronous character‑stream I/O. ✅
B.B Asynchronous block I/O.
C.C Memory‑mapped file access.
D.D Network socket I/O.
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Memory‑mapped file access lets the OS handle paging and copying of file data without explicit read/write calls, reducing CPU overhead while preserving integrity through page‑fault handling. Synchronous character‑stream I/O (A) would require byte‑wise handling, asynchronous block I/O (B) still needs explicit management, and network sockets (D) are unrelated to local disk copying.

Q8. A video game reads controller input from a device that reports events at unpredictable intervals. Which device type best matches this behavior?

A.A Synchronous block device. ✅
B.B Asynchronous character‑stream device.
C.C Dedicated random‑access device.
D.D Sharable sequential device.
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Controller input arrives irregularly, matching an asynchronous character‑stream device that can deliver bytes whenever the hardware signals an event, without a fixed schedule. Synchronous block devices (A) expect regular block transfers, random‑access devices (C) are for seeking, and sharable sequential devices (D) imply ordered data streams, none of which align with the sporadic nature of controller events.

Q9. A backup utility writes data to a tape drive that only supports sequential access. Which strategy ensures the fastest backup given the device’s constraints?

A.A Write large contiguous blocks.
B.B Write small random chunks. ✅
C.C Interleave reads and writes.
D.D Use memory‑mapped I/O.
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Tape drives excel when data is written in large, contiguous blocks because they avoid frequent start‑stop motions and reduce wear. Small random chunks (B) would cause many tape rewinds, interleaving reads and writes (C) is not applicable for a write‑only backup, and memory‑mapped I/O (D) is unsuitable for sequential tape devices.

Q10. A server processes high‑volume network requests using sockets. Which I/O characteristic of sockets most directly impacts the server’s ability to handle many connections simultaneously?

A.A Character‑stream vs block transfer. ✅
B.B Synchronous vs asynchronous operation.
C.C Read‑only vs write‑only mode.
D.D Dedicated vs sharable status.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Sockets can be configured for asynchronous (non‑blocking) operation, allowing the server to issue I/O calls without waiting for completion and thus manage many connections concurrently. The distinction between character and block (A) is irrelevant for sockets, as is read/write mode (C). While sockets are typically sharable (D), that attribute does not alone determine concurrency handling.

Q11. A multimedia editing suite needs to frequently seek to different parts of a large video file. Which device access method provides the most efficient operation?

A.A Sequential character‑stream I/O.
B.B Random‑access block I/O.
C.C Asynchronous character‑stream I/O. ✅
D.D Memory‑mapped file access.
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Random‑access block I/O lets the application jump directly to any block in the file, minimizing the time spent moving the read head compared to sequential methods. Asynchronous character‑stream I/O (C) does not aid seeking, and memory‑mapped access (D) could be used but still relies on block reads; the clearest efficient method for frequent seeks is random‑access block I/O.

Q12. A printer receives data from a computer via a character‑stream interface. Which property of the printer’s device type most affects the time between sending a line of text and the printer starting to print it?

A.A Device speed (bytes per second). ✅
B.B Device sharing policy.
C.C Synchronous operation.
D.D Block size.
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Synchronous operation means the printer processes each incoming byte in a predictable, coordinated manner, allowing the system to estimate the delay from sending a line to start of printing. While speed (A) influences overall throughput, the key factor for the specific start‑delay is the synchrony of data handling. Sharing policy (B) and block size (D) are unrelated to the timing of a single line.

Q13. A high‑performance computing cluster uses a shared disk array for both read and write workloads. Which device sharing characteristic must the OS consider to avoid performance bottlenecks?

A.A Dedicated vs sharable status. ✅
B.B Character‑stream vs block mode.
C.C Synchronous vs asynchronous timing.
D.D Read‑only vs write‑only capability.
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: When multiple processes access the same disk array, the OS must manage its sharable nature to prevent contention; a sharable device can be accessed concurrently, but without proper scheduling, I/O requests may queue, causing bottlenecks. The other attributes (B, C, D) describe data formatting or timing, not the central issue of concurrent access.

Q14. A system logs events to a file using memory‑mapped I/O. Which advantage does this method provide over traditional read/write system calls in terms of performance?

A.A Eliminates need for device drivers. ✅
B.B Allows asynchronous data transfer.
C.C Reduces context switches and copies.
D.D Guarantees immediate persistence.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Memory‑mapped I/O maps the file directly into the process’s address space, so reads and writes become simple memory accesses, cutting down the number of system calls, context switches, and data copies, thereby improving performance. It does not eliminate device drivers (A), nor does it inherently provide asynchronous transfers (B) or immediate persistence (D).

Q15. A programmer must choose between a character‑stream device and a block device for transferring a large log file. Which factor should guide the decision?

A.A Whether the device supports random access. ✅
B.B The need for low latency per byte.
C.C The total size of the file.
D.D The device’s sharable status.
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: For a large log file, the total amount of data matters most; block devices move data in sizable chunks, making them more efficient for bulk transfers than character‑stream devices, which handle one byte at a time. Random access (A) and latency per byte (B) are secondary concerns, and sharing status (D) does not affect raw transfer efficiency.

Q16. A network interface card (NIC) can operate in either synchronous or asynchronous mode. Which mode is preferable for a time‑critical video conferencing application?

A.A Synchronous mode. ✅
B.B Asynchronous mode.
C.C Both modes are equivalent.
D.D Mode does not affect performance.
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Synchronous mode ensures that data packets are sent and received in a predictable, timed fashion, which aligns with the strict latency requirements of video conferencing. Asynchronous mode can introduce variable delays, making it less suitable. Therefore, option A correctly identifies the preferred mode; the other choices either misstate the effect or claim no difference, which is inaccurate.

Q17. A solid‑state drive (SSD) advertises a transfer rate of 500 MB/s and a latency of 0.1 ms. Which attribute most directly explains why it can serve random read requests faster than a traditional hard disk?

A.A Higher transfer rate. ✅
B.B Lower latency.
C.C Larger block size.
D.D Dedicated device status.
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The SSD’s latency of 0.1 ms indicates the time to access any location, which is far shorter than the mechanical seek time of a hard disk. This low latency is the primary reason random reads are faster, whereas transfer rate (A) affects sustained throughput, not the initial access delay.

Q18. A printer connected via a parallel port can only accept data in block units of 256 bytes. Which I/O mode best matches this hardware requirement?

A.A Character‑stream I/O. ✅
B.B Block I/O.
C.C Memory‑mapped I/O.
D.D Asynchronous I/O.
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Since the printer expects data in fixed‑size blocks, block I/O aligns perfectly with its requirement, allowing the system to send whole 256‑byte chunks at a time. Character‑stream I/O (A) would send one byte at a time, which is inefficient, while memory‑mapped (C) and asynchronous (D) modes do not address the block size constraint.

Q19. Which term describes a device that allows multiple processes to read from it simultaneously but only one process to write at a time?

A.A Sharable read‑only device.
B.B Dedicated write‑only device.
C.C Sharable read‑write device. ✅
D.D Dedicated read‑write device.
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: A sharable read‑write device permits concurrent reads by many processes, yet enforces exclusive access for writes to maintain data consistency. This definition matches option C. Options A and B restrict access direction, and D implies exclusive use for all operations, which does not reflect the described sharing behavior.

Q20. A system administrator configures a tape drive to operate in asynchronous mode. What effect does this have on the timing of I/O operations?

A.A Operations become predictable and coordinated.
B.B Operations may complete at irregular intervals. ✅
C.C The device can only perform read operations.
D.D The device must be dedicated to a single process.
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Asynchronous mode means the device does not synchronize its transfers with the system clock or other events, so I/O completions can occur unpredictably, matching option B. Predictable timing (A) describes synchronous operation, while options C and D mischaracterize the device’s capabilities and sharing status.

Q21. An embedded system uses a character‑stream interface to read sensor data that arrives at a fixed rate of 9600 bps. Which device characteristic ensures that the system can process each byte without loss?

A.A Device speed matching the data rate.
B.B Device sharing policy. ✅
C.C Synchronous operation.
D.D Block size.
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: If the device’s transfer speed equals or exceeds the incoming 9600 bits per second, the system can keep up with the data flow, preventing overflow. Sharing policy (B) and block size (D) do not affect the ability to handle a steady byte stream, and synchronous operation (C) is not required for loss‑free processing in this context.

🔗 Related Topics (MCQs)