📝 I/O Hardware in I/O Systems (24 MCQs)
Device Controllers and Physical I/O Components
I/O hardware comprises physical devices, device controllers, ports, buses, and registers that enable communication between the processor, memory, and peripherals. A controller manages a device's operation and exposes a hardware interface to the system. The operating system uses device-specific instructions or memory-mapped registers to configure transfers, inspect status, and coordinate completion.
Why Controllers Separate Device Logic from the CPU
Peripheral devices have different electrical characteristics, data formats, and operating speeds, making direct processor control impractical. A controller handles device-specific signalling and timing, while the CPU issues higher-level commands. This separation allows the processor to communicate through a defined interface instead of managing every low-level hardware detail itself.
Registers, Ports and Communication Methods
Controllers commonly expose data, status, and control registers. The CPU writes commands to control registers, reads status information, and exchanges data through an appropriate interface. With memory-mapped I/O, registers occupy part of the physical address space. Port-mapped I/O uses a separate address space and specialised instructions on architectures that support it.
Example of a Disk Controller Request
Suppose the operating system requests a disk read. The driver places the required block address and transfer details into controller registers, then starts the operation. The controller manages communication with the storage device. When the requested data is ready, it may notify the processor through an interrupt or coordinate a DMA transfer.
Hardware Capabilities and Interface Limitations
Controllers reduce CPU involvement and allow devices to operate independently during transfers. Buses and interfaces determine available bandwidth, while register design affects command and status handling. Hardware differences require device-specific drivers, and shared buses can become bottlenecks. Faulty controllers, incompatible interfaces, or limited device capabilities can restrict overall I/O performance.
Misconceptions About I/O Hardware
'A device controller is only a software driver' is incorrect because the controller is hardware. 'Memory-mapped I/O copies every register into ordinary RAM' is false; device registers occupy address ranges but remain hardware interfaces. 'The CPU must manage every signal sent to a peripheral' overlooks the independent control performed by device controllers.
Exam Focus: Registers, Buses and I/O Addressing
Identify the roles of data, status, and control registers, and distinguish a controller from its driver and attached device. Compare memory-mapped and port-mapped I/O. Scenario questions may ask how a driver starts a transfer and how a controller reports completion through status changes, interrupts, or DMA coordination.
Key Terms of I/O Hardware
- Controller - Hardware coordinating device operations.
- Data register - Holds transferred device data.
- Status register - Reports current device condition.
- Control register - Receives commands from the processor.
- Memory-mapped I/O - Device registers use memory addresses.
📝 All I/O Hardware in I/O Systems MCQs
Q1. What is the term for a set of wires that multiple devices share for communication?
📖 Explanation: A bus is a collection of conductors that allows several devices to transmit data over the same physical medium. Unlike a single port, which connects one device, a bus carries signals for many components using a defined protocol. Hubs and switches perform similar functions in networking, but they operate at higher layers and are not the basic wiring concept described here. Understanding a bus helps designers decide how to interconnect peripherals efficiently.
Q2. Which component typically connects the processor‑memory subsystem to fast peripherals such as graphics cards?
📖 Explanation: The PCI (Peripheral Component Interconnect) bus is designed for high‑speed communication between the CPU, memory, and fast devices like graphics adapters and network cards. Expansion buses handle slower peripherals, while USB ports serve external devices and serial ports are for legacy communication. Recognizing the role of PCI helps students identify why certain devices need dedicated high‑bandwidth pathways.
Q3. In a daisy‑chain configuration, which statement is true?
📖 Explanation: A daisy chain links devices sequentially, where each unit receives data and passes it onward, forming a linear topology. The first device does not have exclusive control; any device can start a transmission, and timing is coordinated by the bus protocol, not by a single clock. Termination may be required for signal integrity, but the key characteristic is the forwarding behavior described in option C.
Q4. Why is a bus protocol said to be “rigidly defined”?
📖 Explanation: A bus protocol defines the structure of each message, the sequence of bits, and the timing constraints for transmitting and receiving data. This rigidity ensures that all devices interpret signals consistently, preventing errors. Voltage levels may vary, and protocols can be updated in newer hardware revisions, but the core definition of message format and timing remains essential for reliable communication.
Q5. Which of the following best describes a serial port’s primary advantage over a parallel port?
📖 Explanation: Serial ports send bits one after another, allowing the use of fewer wires, which reduces cost and enables longer cables without significant signal degradation. Parallel ports transmit multiple bits simultaneously, requiring more conductors and limiting cable length. Although serial connections may achieve high speeds today, their main historical benefit was the simplicity and distance capability described in option B.
Q6. A computer needs to add a new high‑speed storage device. Which bus is most appropriate for this addition?
📖 Explanation: PCI Express (PCIe) provides high bandwidth, low latency, and direct connection to the processor, making it ideal for fast storage such as SSDs. USB 2.0 and FireWire are external interfaces with lower throughput, while the ISA bus is an outdated, slow internal bus unsuitable for modern high‑speed devices. Selecting PCIe aligns with the need for rapid data transfer.
Q7. If a joystick sends a signal that is interpreted incorrectly by the flight computer, which layer of the I/O system is most likely at fault?
📖 Explanation: The device driver translates raw electrical signals from the joystick into a format the operating system can understand. An error in this translation often leads to misinterpretation of input. While a faulty connector could cause loss of signal, the driver is responsible for decoding the data. The scheduler and application layers operate above the driver and would not directly cause signal misreading.
Q8. A system designer wants to connect three temperature sensors to a microcontroller using the fewest pins possible. Which topology should they choose?
📖 Explanation: A daisy‑chain bus allows each sensor to attach to the same two wires, passing data along the chain, minimizing pin usage on the microcontroller. Star and mesh topologies require a separate line for each sensor, increasing pin count. Ring topology also needs dedicated connections and can be more complex to manage. Therefore, the daisy‑chain approach best meets the goal of using few pins.
Q9. During troubleshooting, a technician discovers that data on the expansion bus is corrupted only when a USB device is attached. Which cause is most plausible?
📖 Explanation: If the USB device shares physical lines with the expansion bus, simultaneous signaling can cause contention, leading to corrupted data. Power draw or driver issues would affect functionality but not directly corrupt bus data. Different protocols generally coexist via separate controllers, so contention on shared lines is the most likely explanation.
Q10. In an aircraft control system, why might designers prefer a dedicated motor‑control bus over using the general‑purpose PCI bus?
📖 Explanation: Dedicated motor‑control buses are engineered for predictable, low‑latency communication, ensuring that control commands reach actuators within strict time windows. General‑purpose buses like PCI can introduce variable delays due to arbitration and shared traffic, which is unsuitable for safety‑critical real‑time control. The deterministic nature of a specialized bus is essential for reliable aircraft operation.
Q11. A student is designing a simple computer that uses a parallel port for keyboard input. Which limitation must they consider?
📖 Explanation: Parallel ports transmit multiple bits simultaneously, which means they need a larger number of conductors compared to serial interfaces. This increased wiring complexity can be a design constraint, especially in a simple system. Bandwidth is generally sufficient for keyboard data, and parallel ports can be daisy‑chained, so the primary issue is the wiring requirement.
Q12. What is the main reason that USB ports are classified as an expansion bus rather than a system bus?
📖 Explanation: USB (Universal Serial Bus) provides a standardized protocol that allows devices to be added or removed while the system is running (hot‑plugging). This flexibility distinguishes it from internal system buses, which are typically fixed and not intended for dynamic device changes. The classification as an expansion bus reflects its role in extending system capabilities without being part of the core processor‑memory pathway.
Q13. Which of the following best explains why a device driver is essential for a serial port?
📖 Explanation: A device driver interprets operating‑system requests and translates them into the appropriate voltage patterns and timing sequences required by the serial port hardware. Without this translation layer, the OS cannot communicate with the port. Physical connectors, power management, and encryption are handled elsewhere, making option B the correct explanation.
Q14. If an I/O device requires a clock signal that is not supplied by the bus, what must the system provide?
📖 Explanation: When a device needs a timing reference that the bus does not generate, an external oscillator must be added to supply the required clock. Voltage regulators manage power, DMA controllers handle direct memory transfers, and APIs operate at software level. Therefore, the correct solution is to include an oscillator that provides the needed clock signal.
Q15. A developer writes code that polls a keyboard every 10 ms. Which drawback is most likely?
📖 Explanation: Polling at a fixed interval forces the CPU to repeatedly check the device state, consuming processing time that could be used elsewhere. Interrupt‑driven designs allow the CPU to respond only when needed, improving efficiency. Missed key presses or interrupt storms are not typical results of regular polling, and the OS can still schedule tasks, albeit with reduced performance.
Q16. When connecting a high‑resolution camera to a computer, which bus is generally preferred for minimal latency?
📖 Explanation: FireWire (IEEE 1394) was designed for real‑time data streams such as video, offering isochronous transfer modes that guarantee consistent timing and low latency. While PCI Express provides high bandwidth, it is more commonly used for internal devices. USB 2.0 and SATA are not optimized for continuous, time‑sensitive video streams. Therefore, FireWire is the typical choice for low‑latency camera connections.
Q17. A system uses a daisy‑chain of three LED controllers on a single bus. If the middle controller fails, what is the most likely outcome?
📖 Explanation: In a daisy‑chain, each device passes data to the next. If the middle controller fails, it cannot forward the signal, so downstream devices (the LEDs after it) will not receive commands, while upstream devices remain functional. The entire chain does not necessarily shut down, and automatic reboot is unrelated to bus failure.
Q18. Why might an engineer choose a parallel bus over a serial bus for a legacy memory module?
📖 Explanation: Parallel buses can transfer multiple bits simultaneously, yielding higher throughput over short distances, which is advantageous for memory modules that require rapid access. Although serial buses have become dominant due to lower pin counts and longer reach, the speed benefit of parallel communication makes it suitable for legacy memory designs where distance is limited.
Q19. Which scenario illustrates the need for a device’s interrupt line rather than polling?
📖 Explanation: Interrupts allow the CPU to be notified immediately when an event occurs, such as a key press, without constantly checking (polling). While printers and temperature sensors operate on predictable, slow intervals where polling may be acceptable, network traffic can be bursty, but keyboards benefit most from interrupt-driven input to ensure responsiveness. Hence, the keyboard scenario best demonstrates the advantage of interrupts.
Q20. In a system where multiple devices share a common bus, what mechanism prevents data collisions?
📖 Explanation: Bus arbitration is the process by which devices negotiate access to the shared medium, ensuring that only one device transmits at a time and thereby preventing collisions. Error‑correcting codes detect and fix errors after they occur, while amplification and synchronization address signal quality and timing but do not resolve simultaneous transmission conflicts.
Q21. Which statement correctly describes the relationship between a port and a bus?
📖 Explanation: A port serves as the physical interface through which a single device attaches to a bus, allowing communication with the rest of the system. The bus itself is the shared set of wires that interconnects many ports and devices. Therefore, the correct description is that a port connects a single device to a bus.
Q22. A programmer needs to ensure that data from a high‑speed sensor is stored without loss. Which I/O technique is most suitable?
📖 Explanation: DMA allows the sensor to transfer data directly into memory without CPU intervention, minimizing the chance of data loss due to CPU latency. Interrupt‑driven I/O can also be effective but may still involve CPU handling that could miss bursts. Fixed‑interval polling and busy‑wait loops are less reliable for high‑speed streams.
Q23. If a new USB device is added and the system slows down, which underlying cause is most plausible?
📖 Explanation: USB controllers allocate bandwidth among all connected devices. Adding a new device can reduce the available bandwidth for existing devices, leading to perceived system slowdown. Excessive power draw typically triggers protection mechanisms, while protocol incompatibility would prevent operation altogether, and driver issues affect functionality rather than overall system speed. Thus, bandwidth sharing is the most plausible explanation.
Q24. A student argues that because a bus carries electrical signals, its speed is limited only by the voltage level. Which flaw is in this reasoning?
📖 Explanation: While voltage level influences signal strength, the actual data rate is constrained by factors such as signal rise/fall times, noise immunity, encoding schemes, and protocol overhead. Simply increasing voltage does not guarantee higher speed, as timing, synchronization, and error handling also play critical roles. Therefore, the student's reasoning overlooks these essential considerations.