Bird
Raised Fist0
Operating Systemsknowledge~20 mins

Programmed I/O vs interrupt-driven I/O in Operating Systems - Practice Questions

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
I/O Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Difference in CPU usage between Programmed I/O and Interrupt-driven I/O

Which statement correctly describes how the CPU is used in Programmed I/O compared to Interrupt-driven I/O?

AIn Programmed I/O, the CPU performs other tasks and ignores the device, while in Interrupt-driven I/O, the CPU waits actively for the device.
BBoth Programmed I/O and Interrupt-driven I/O require the CPU to wait actively for the device at all times.
CIn Programmed I/O, the CPU waits actively for the device, while in Interrupt-driven I/O, the CPU can perform other tasks until interrupted.
DBoth Programmed I/O and Interrupt-driven I/O allow the CPU to perform other tasks without waiting.
Attempts:
2 left
💡 Hint

Think about whether the CPU is busy checking the device or free to do other work.

📋 Factual
intermediate
2:00remaining
Main disadvantage of Programmed I/O

What is the main disadvantage of using Programmed I/O compared to Interrupt-driven I/O?

AIt requires complex hardware to handle interrupts.
BIt causes inefficient CPU usage due to constant polling of the device.
CIt cannot handle multiple devices simultaneously.
DIt causes data loss because the CPU ignores device signals.
Attempts:
2 left
💡 Hint

Consider what happens when the CPU keeps checking the device repeatedly.

🔍 Analysis
advanced
2:00remaining
Impact on system responsiveness

How does Interrupt-driven I/O improve system responsiveness compared to Programmed I/O?

ABy allowing the CPU to respond immediately to device signals without wasting time polling.
BBy making the CPU poll devices more frequently to detect readiness faster.
CBy using a dedicated CPU core solely for I/O operations.
DBy disabling all other CPU tasks until the I/O operation completes.
Attempts:
2 left
💡 Hint

Think about how the CPU reacts to device readiness in both methods.

❓ Comparison
advanced
2:00remaining
Which I/O method is better for high-speed devices?

Considering device speed and CPU efficiency, which I/O method is generally better for high-speed devices and why?

AInterrupt-driven I/O, because it reduces CPU idle time and handles frequent device signals efficiently.
BProgrammed I/O, because it allows the CPU to poll the device continuously for immediate data transfer.
CProgrammed I/O, because it uses interrupts to notify the CPU only when data is ready.
DInterrupt-driven I/O, because it disables the CPU until the device finishes its operation.
Attempts:
2 left
💡 Hint

Think about how frequent device signals affect CPU workload in each method.

❓ Reasoning
expert
2:00remaining
Effect of Programmed I/O on multitasking systems

In a multitasking operating system, what is a likely effect of using Programmed I/O instead of Interrupt-driven I/O?

AProgrammed I/O enhances multitasking by prioritizing I/O tasks over CPU tasks automatically.
BProgrammed I/O improves multitasking by allowing the CPU to switch tasks only after device polling completes.
CProgrammed I/O has no effect on multitasking because I/O operations run independently of CPU scheduling.
DProgrammed I/O can cause poor multitasking performance because the CPU spends too much time polling devices, delaying other tasks.
Attempts:
2 left
💡 Hint

Consider how CPU time spent polling affects the ability to run multiple tasks smoothly.

Practice

(1/5)
1. Which of the following best describes programmed I/O?
easy
A. CPU ignores the device until a scheduled time
B. Device sends a signal to CPU only when it needs attention
C. CPU and device communicate using direct memory access
D. CPU continuously checks the device status until it is ready

Solution

  1. Step 1: Understand programmed I/O behavior

    Programmed I/O means the CPU actively checks the device repeatedly to see if it is ready.
  2. Step 2: Compare options with definition

    CPU continuously checks the device status until it is ready matches this behavior exactly, while others describe interrupt or other methods.
  3. Final Answer:

    CPU continuously checks the device status until it is ready -> Option D
  4. Quick Check:

    Programmed I/O = CPU polls device [OK]
Hint: Programmed I/O means CPU keeps checking device status [OK]
Common Mistakes:
  • Confusing programmed I/O with interrupt-driven I/O
  • Thinking device signals CPU in programmed I/O
  • Mixing up direct memory access with programmed I/O
2. Which of the following is the correct statement about interrupt-driven I/O?
easy
A. Device interrupts CPU only when it needs service
B. CPU waits in a loop checking device status
C. CPU ignores device signals completely
D. CPU uses programmed polling to check device

Solution

  1. Step 1: Recall interrupt-driven I/O definition

    Interrupt-driven I/O means the device sends a signal (interrupt) to the CPU when it needs attention.
  2. Step 2: Match options to definition

    Device interrupts CPU only when it needs service correctly states that the device interrupts the CPU only when service is needed.
  3. Final Answer:

    Device interrupts CPU only when it needs service -> Option A
  4. Quick Check:

    Interrupt-driven I/O = device signals CPU [OK]
Hint: Interrupt-driven means device signals CPU when ready [OK]
Common Mistakes:
  • Choosing options describing CPU polling
  • Assuming CPU ignores device signals
  • Confusing programmed I/O with interrupt-driven I/O
3. Consider this scenario: A CPU uses programmed I/O to read data from a device. What is the main effect on CPU usage?
medium
A. CPU can perform other tasks while waiting for device
B. CPU is busy checking device status and cannot do other work
C. CPU ignores the device until data is ready
D. CPU receives an interrupt when device is ready

Solution

  1. Step 1: Understand CPU behavior in programmed I/O

    In programmed I/O, CPU repeatedly checks device status, which keeps it busy and unable to do other tasks efficiently.
  2. Step 2: Analyze options for CPU usage

    CPU is busy checking device status and cannot do other work correctly states CPU is busy polling and cannot perform other work effectively.
  3. Final Answer:

    CPU is busy checking device status and cannot do other work -> Option B
  4. Quick Check:

    Programmed I/O = CPU busy polling device [OK]
Hint: Programmed I/O keeps CPU busy waiting, no multitasking [OK]
Common Mistakes:
  • Thinking CPU can multitask during programmed I/O
  • Confusing interrupt-driven I/O effects with programmed I/O
  • Assuming CPU ignores device in programmed I/O
4. A system uses interrupt-driven I/O but the CPU never responds to device interrupts. What is the likely problem?
medium
A. Interrupts are disabled or masked in the CPU
B. CPU is using programmed I/O instead
C. Device is not sending any interrupts
D. CPU is stuck in a loop polling the device

Solution

  1. Step 1: Identify why CPU ignores interrupts

    If CPU never responds to interrupts, a common cause is that interrupts are disabled or masked, preventing CPU from handling them.
  2. Step 2: Evaluate other options

    Interrupts are disabled or masked in the CPU correctly identifies this cause. Other options either contradict the interrupt-driven setup or describe different issues.
  3. Final Answer:

    Interrupts are disabled or masked in the CPU -> Option A
  4. Quick Check:

    CPU ignoring interrupts = interrupts disabled [OK]
Hint: CPU ignoring interrupts usually means interrupts are disabled [OK]
Common Mistakes:
  • Assuming device is not sending interrupts
  • Confusing programmed I/O with interrupt-driven I/O
  • Thinking CPU polls device in interrupt-driven mode
5. A system designer wants to maximize CPU efficiency while handling multiple I/O devices. Which approach is best and why?
hard
A. Use programmed I/O because CPU controls all device checks
B. Use programmed I/O with longer polling intervals to reduce CPU load
C. Use interrupt-driven I/O so CPU works on other tasks until interrupted
D. Use neither; rely on manual device checks by the user

Solution

  1. Step 1: Analyze CPU efficiency needs

    Maximizing CPU efficiency means CPU should not waste time waiting or polling devices unnecessarily.
  2. Step 2: Compare I/O methods for efficiency

    Interrupt-driven I/O allows CPU to do other work and only respond when device signals, improving efficiency.
  3. Step 3: Evaluate other options

    Programmed I/O wastes CPU cycles; manual checks are impractical. Longer polling reduces load but still wastes CPU time.
  4. Final Answer:

    Use interrupt-driven I/O so CPU works on other tasks until interrupted -> Option C
  5. Quick Check:

    Interrupt-driven I/O maximizes CPU efficiency [OK]
Hint: Interrupt-driven I/O lets CPU multitask efficiently [OK]
Common Mistakes:
  • Choosing programmed I/O for efficiency
  • Ignoring CPU multitasking benefits
  • Thinking manual checks improve performance
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard