Problem Statement
How does an operating system manage access to device resources when multiple processes need I/O simultaneously?
Explanation
When multiple processes need I/O or device access simultaneously the OS must coordinate resource sharing. It does so by maintaining queues (ready queue, I/O queue), using device-queues, scheduling I/O requests, applying locking or semaphores to protect device registers, managing priorities, and ensuring fairness and avoidance of starvation. For example, a print spooler may queue all print requests and let the driver service them one by one. The OS might also use priority or time-slicing for devices. In interviews mention trade-offs: fairness vs throughput, device contention, prevention of starvation, and impact on CPU scheduling.
