HomeSubjectsUniversityBlogAbout

I/O Systems

Topic in Operating Systems

210 total MCQsShowing 30 with explanations10 Easy10 Medium10 Hard

About This Topic

An I/O system is the combination of hardware controllers, device drivers and kernel services that moves data between the CPU, memory and peripheral devices. Expect questions comparing polling, interrupt-driven I/O and direct memory access (DMA), and memory-mapped I/O versus port-mapped I/O. You should classify devices as block, character or network devices and understand blocking, non-blocking and asynchronous calls. The kernel I/O subsystem is another focus: buffering (including double buffering), caching, spooling, device reservation and error handling. Advanced items touch on interrupt vectors and priority, I/O scheduling, zero-copy transfers, and message-signalled interrupts on PCIe.

Below are 30 practice questions from a pool of 210 I/O Systems MCQs, one of 12 topics in Operating Systems. Each shows the correct answer with an explanation; when you are ready, take a timed quiz to test recall under exam conditions.

Practice Questions

Each question below shows the correct answer with a full explanation. Use these to build conceptual understanding before attempting a timed quiz.

I/O SystemsEasy

Q1. I/O devices communicate with the CPU through:

  1. A.The file system interface
  2. B.Direct wiring to CPU
  3. C.Shared memory regions only
  4. D.Device controllers and buses✓ Correct

Explanation

I/O devices communicate with the CPU through device controllers (hardware interfaces) connected via buses (data pathways). The controller manages the device and interfaces with the system bus.

Report an error in this question

I/O SystemsEasy

Q2. DMA (Direct Memory Access) allows:

  1. A.Direct access to the motherboard components
  2. B.Devices to transfer data to memory without CPU✓ Correct
  3. C.The CPU to access main memory much faster
  4. D.Memory to access the CPU directly for data

Explanation

DMA enables I/O devices to transfer blocks of data directly between the device and main memory without the CPU being involved in each individual data transfer, freeing the CPU for other tasks.

Report an error in this question

I/O SystemsEasy

Q3. Polling in I/O means:

  1. A.CPU repeatedly checks device status register✓ Correct
  2. B.Voting on which device to use for the task
  3. C.Automatically detecting new devices on the bus
  4. D.Prioritizing I/O requests based on their urgency

Explanation

Polling (busy waiting for I/O) involves the CPU repeatedly checking the status register of a device controller to determine if the device is ready. It is simple but wastes CPU cycles.

Report an error in this question

I/O SystemsEasy

Q4. Interrupt-driven I/O means:

  1. A.I/O operations are interrupted frequently
  2. B.The CPU is constantly being interrupted
  3. C.The CPU stops all I/O until processing done
  4. D.The device signals CPU when I/O is complete✓ Correct

Explanation

In interrupt-driven I/O, the CPU initiates an I/O operation and then continues other work. When the I/O is complete, the device controller sends an interrupt to notify the CPU.

Report an error in this question

I/O SystemsEasy

Q5. A device driver is:

  1. A.Software providing OS-to-hardware interface✓ Correct
  2. B.A type of cable connecting to the bus
  3. C.A person who physically operates devices
  4. D.A diagnostic tool for testing hardware

Explanation

A device driver is OS software that knows the details of a specific device and provides a uniform interface to the OS kernel, translating OS commands into device-specific operations.

Report an error in this question

I/O SystemsEasy

Q6. Spooling is commonly used for:

  1. A.CPU scheduling for processes
  2. B.Network routing of data packets
  3. C.Memory management of processes
  4. D.Managing print jobs via spooling✓ Correct

Explanation

Spooling (Simultaneous Peripheral Operations On-Line) is commonly used for printers. Print jobs are stored on disk in a spool and printed in order, allowing multiple processes to send print jobs without waiting.

Report an error in this question

I/O SystemsEasy

Q7. Block devices transfer data in:

  1. A.Variable packets
  2. B.Single characters
  3. C.Continuous streams
  4. D.Fixed-size blocks✓ Correct

Explanation

Block devices (like hard drives and SSDs) transfer data in fixed-size blocks (typically 512 bytes or 4KB). They support random access and are addressable by block number.

Report an error in this question

I/O SystemsEasy

Q8. Character devices transfer data:

  1. A.One byte at a time in a stream✓ Correct
  2. B.In fixed-size data blocks
  3. C.In variable-size network packets
  4. D.In fixed-size memory page frames

Explanation

Character devices (like keyboards, mice, serial ports) transfer data one character (byte) at a time. They do not support random access and are accessed as a stream of bytes.

Report an error in this question

I/O SystemsEasy

Q9. A bus in computer architecture is:

  1. A.A type of vehicle for transport use
  2. B.A type of volatile memory used in computers
  3. C.A processing unit that executes instructions
  4. D.A shared pathway transferring data between parts✓ Correct

Explanation

A bus is a set of wires (or traces) that serves as a shared communication pathway connecting the CPU, memory, and I/O devices, allowing them to transfer data and signals.

Report an error in this question

I/O SystemsMedium

Q10. What is memory-mapped I/O?

  1. A.Storing I/O data into a temporary buffer
  2. B.Mapping device registers to memory addresses✓ Correct
  3. C.A type of virtual memory for page tables
  4. D.Mapping files from disk into virtual memory

Explanation

In memory-mapped I/O, device controller registers are mapped to memory addresses. The CPU accesses devices using standard load/store instructions to those addresses, simplifying I/O programming.

Report an error in this question

I/O SystemsEasy

Q11. Buffering in I/O systems means:

  1. A.Encrypting I/O data for security purposes
  2. B.Compressing I/O data for disk storage
  3. C.Temporarily storing data during transfer✓ Correct
  4. D.Slowing down I/O operations intentionally

Explanation

Buffering temporarily holds data in memory during transfer between two devices or between a device and an application, handling speed mismatches and allowing data to be transferred in larger chunks.

Report an error in this question

I/O SystemsMedium

Q12. What is the difference between programmed I/O, interrupt-driven I/O, and DMA?

  1. A.Programmed polls; interrupt frees CPU; DMA bypasses CPU✓ Correct
  2. B.They only work with specific hardware device types
  3. C.They only differ in speed of the data transfer
  4. D.They are all identical in behavior and speed

Explanation

Programmed I/O: CPU polls status. Interrupt-driven: CPU starts I/O, does other work, gets interrupted on completion. DMA: dedicated controller transfers data blocks directly to memory, interrupting CPU only when the whole transfer is done.

Report an error in this question

I/O SystemsMedium

Q13. Double buffering uses:

  1. A.No buffers needed at all ever
  2. B.Three buffers in a rotation cycle
  3. C.One buffer for all data transfers
  4. D.Two buffers: fill one, process other✓ Correct

Explanation

Double buffering uses two buffers: while one buffer is being processed (consumed), the other is being filled (produced). This overlaps I/O with processing, improving throughput.

Report an error in this question

I/O SystemsMedium

Q14. Caching in the I/O system differs from buffering in that:

  1. A.They are identical in purpose and behavior
  2. B.Buffering stores during transfer; cache keeps copies✓ Correct
  3. C.Caching is always slower than buffering in practice
  4. D.Buffering is used only for output data operations

Explanation

Buffering temporarily holds data being transferred between entities. Caching retains a copy of data for faster future access. A buffer holds the only copy; a cache holds a duplicate of data stored elsewhere.

Report an error in this question

I/O SystemsMedium

Q15. What is a device controller's role?

  1. A.To manage hardware and translate OS commands✓ Correct
  2. B.To manage virtual memory paging and swapping
  3. C.To compile device driver source code files
  4. D.To schedule processes for CPU execution time

Explanation

A device controller is the hardware interface between the device and the computer bus. It accepts commands from the OS (via driver), translates them into device operations, and manages data transfer through its registers.

Report an error in this question

I/O SystemsMedium

Q16. What is the purpose of an interrupt controller?

  1. A.To block all incoming interrupt signals
  2. B.To generate interrupt signals to CPU
  3. C.To manage, prioritize, route interrupts✓ Correct
  4. D.To count total number of interrupts

Explanation

The interrupt controller (e.g., APIC) manages multiple interrupt lines from devices, handles priority among simultaneous interrupts, and routes them to the appropriate CPU for handling.

Report an error in this question

I/O SystemsMedium

Q17. What is the purpose of the I/O subsystem in the OS kernel?

  1. A.To manage user accounts and authentication
  2. B.To compile programs into executable binaries
  3. C.To provide games and multimedia for users
  4. D.Uniform interfaces for buffering and scheduling✓ Correct

Explanation

The I/O subsystem provides a uniform interface to diverse I/O hardware through device drivers, and manages common I/O functions like buffering, caching, spooling, device reservation, and error handling.

Report an error in this question

I/O SystemsMedium

Q18. What is the difference between blocking and non-blocking I/O?

  1. A.Blocking is always faster than non-blocking I/O
  2. B.They are identical in every way and behavior
  3. C.Non-blocking prevents all I/O from starting
  4. D.Blocking suspends until done; non-blocking returns✓ Correct

Explanation

Blocking (synchronous) I/O suspends the calling process until the operation completes. Non-blocking (asynchronous) I/O returns immediately, allowing the process to continue while I/O proceeds in the background.

Report an error in this question

I/O SystemsHard

Q19. What is the purpose of I/O scheduling at the OS level?

  1. A.To encrypt I/O data for security and privacy
  2. B.To slow down all I/O operations for safety
  3. C.To prevent all I/O operations from executing
  4. D.To order and optimize I/O for throughput and fairness✓ Correct

Explanation

I/O scheduling reorders and batches I/O requests to minimize seek time (for HDDs), improve throughput, reduce average latency, and ensure fair access to I/O resources among competing processes.

Report an error in this question

I/O SystemsHard

Q20. What is asynchronous I/O and how does it differ from non-blocking I/O?

  1. A.Non-blocking uses interrupts while async does not
  2. B.They are the same thing in every single way
  3. C.Asynchronous I/O is actually a blocking I/O form
  4. D.Non-blocking returns available; async notifies on completion✓ Correct

Explanation

Non-blocking I/O returns immediately with available data (or an indication that no data is ready). Asynchronous I/O initiates the full operation in the background and later notifies the caller when the entire operation is complete.

Report an error in this question

I/O SystemsHard

Q21. What is the kernel I/O subsystem's role in device reservation?

  1. A.Updating device firmware and driver software
  2. B.Reserving devices for future hardware purchase
  3. C.Backing up all device data to secondary storage
  4. D.Granting exclusive device access to prevent conflicts✓ Correct

Explanation

Device reservation allows the kernel to grant exclusive access to a device to a process (e.g., a tape drive), preventing other processes from interfering. System calls like allocate() and deallocate() manage this.

Report an error in this question

I/O SystemsMedium

Q22. What is the unified buffer cache?

  1. A.A cache located inside the CPU for all instructions
  2. B.Single cache for files and mapped memory, no duplication✓ Correct
  3. C.A cache shared by all system users equally
  4. D.A universal cache for every device in the system

Explanation

A unified buffer cache uses the same page cache for both file system I/O and memory-mapped files. This avoids double caching (storing the same data in both a file system buffer and page cache).

Report an error in this question

I/O SystemsHard

Q23. What is the life cycle of an I/O request from a user application to hardware?

  1. A.Application goes through network stack then to hardware
  2. B.Application directly accesses hardware with no intermediary
  3. C.App calls kernel, driver, controller, then hardware device✓ Correct
  4. D.Application goes through file system then to the hardware

Explanation

An I/O request flows: application system call -> kernel I/O subsystem (scheduling, buffering) -> device driver (translates to device commands) -> device controller (executes commands) -> hardware device. Results return along the same path.

Report an error in this question

I/O SystemsMedium

Q24. Error handling in I/O systems typically involves:

  1. A.Shutting down the entire system on any error
  2. B.Deleting the faulty device from the system table
  3. C.Returning codes, retrying, logging, informing users✓ Correct
  4. D.Ignoring all errors that occur during I/O

Explanation

I/O error handling involves detecting errors (via status registers or error interrupts), retrying transient errors, returning appropriate error codes to applications, and logging persistent errors for diagnosis.

Report an error in this question

I/O SystemsHard

Q25. What is vectored I/O (scatter-gather I/O)?

  1. A.I/O operations on vector graphics rendering
  2. B.Broadcasting I/O to multiple devices at once
  3. C.Single I/O on multiple non-contiguous buffers✓ Correct
  4. D.Parallel I/O on vector processors for tasks

Explanation

Scatter-gather I/O allows a single system call to read data into multiple non-contiguous buffers (scatter) or write data from multiple buffers to a device (gather), reducing system call overhead.

Report an error in this question

I/O SystemsHard

Q26. What is IOCTL (I/O Control) used for?

  1. A.A syscall for device-specific operations beyond read/write✓ Correct
  2. B.Input and output data formatting utility
  3. C.I/O error correction and data recovery mechanism
  4. D.I/O traffic control and bandwidth management tool

Explanation

IOCTL is a system call that provides a catch-all mechanism for device-specific operations that do not fit into the standard read/write/open/close interface, like setting serial port baud rate or ejecting a CD.

Report an error in this question

I/O SystemsHard

Q27. What is zero-copy I/O and why is it important for performance?

  1. A.I/O that produces no output at all ever
  2. B.Eliminating unnecessary copies between kernel and user✓ Correct
  3. C.I/O that uses no disk space for data storage
  4. D.I/O with zero errors during the transfer process

Explanation

Zero-copy I/O avoids copying data between kernel and user buffers by using techniques like memory mapping or sendfile(). This reduces CPU overhead and memory bandwidth usage, especially important for high-throughput network servers.

Report an error in this question

I/O SystemsHard

Q28. What is the role of the select()/poll()/epoll() system calls?

  1. A.To monitor multiple file descriptors for I/O readiness✓ Correct
  2. B.To select which CPU scheduling algorithm to apply
  3. C.To select files to delete from the disk drive
  4. D.To poll system users for their preference settings

Explanation

select()/poll()/epoll() enable I/O multiplexing, allowing a single process/thread to efficiently monitor and handle I/O on many file descriptors simultaneously. epoll() is Linux-specific and scales better than select() for many descriptors.

Report an error in this question

I/O SystemsHard

Q29. What is the difference between port-mapped I/O and memory-mapped I/O?

  1. A.Port-mapped I/O is always faster than memory-mapped I/O
  2. B.Port-mapped uses separate space; memory-mapped uses memory✓ Correct
  3. C.Memory-mapped requires special hardware not in modern CPUs
  4. D.They are identical in every respect and behavior

Explanation

Port-mapped I/O uses a separate I/O address space accessed via special instructions (IN/OUT). Memory-mapped I/O maps device registers to the regular memory address space, using normal load/store instructions.

Report an error in this question

I/O SystemsHard

Q30. What is the transformer model in I/O subsystem layering?

  1. A.A machine learning model for I/O prediction
  2. B.A power supply model for device power management
  3. C.A database model for storing I/O request metadata
  4. D.Layered approach where each layer transforms requests✓ Correct

Explanation

The transformer model in I/O describes how each layer (application, I/O subsystem, device driver, controller) transforms I/O requests. Each layer adds its processing and passes a transformed request to the next, providing clean abstraction.

Report an error in this question

Ready to test yourself on I/O Systems?

Take a timed quiz drawn from 210+ questions on this topic. No signup required — your progress saves in your browser.

Start I/O Systems Quiz