All mock tests are FREE till 31 December — register to save your progress

Given below are an Assertion (A) and a Reason (R):
Assertion (A): I/O protection is ensured by a hardware trap.
Reason (R): I/O interrupts are caused by conditions such as I/O completion and device malfunction occurring within I/O devices.
In light of the above, choose the correct answer.

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. Both A and R are true but R is NOT the correct explanation of A

Explanation

Standard OS theory (e.g. Silberschatz, 'Operating System Concepts') makes all I/O instructions privileged: a user program cannot execute them directly, and any attempt to do so causes a hardware trap that transfers control to the operating system — this is exactly how I/O protection is enforced, so Assertion A is true, not false. Reason R is also a true, independent fact: I/O interrupts genuinely are raised by conditions like transfer completion or a device error. However, R describes why I/O interrupts occur, which is a different mechanism from why illegal I/O instructions are trapped for protection — so R, though true, does not explain A.

More System Software and Operating System questions