WorksheetsI/O Systems Quiz
Total questions: 14
Worksheet time: 5mins
When does interrupt chaining occur?
Controller busy
Busy-wait cycle wait for I/O device
More than one device at same interrupt number
Ignore or delay some interrupt
Which instruction cycle will cause interrupt?
Read status
Status register = 0
Driver place command
Controller clears busy bit
Fibre channel (FC) is complex controller, usually separate circuit board plugging into bus
True
False
Which of the following best explains why DMA is more efficient than programmed I/O for large data transfers?
DMA transfers data one byte at a time
DMA allows the CPU to control every transfer
DMA moves data directly between device and memory without CPU involvement
DMA eliminates the need for device drivers
How does the operating system hide hardware differences from applications?
By allowing applications to access hardware directly
By using device drivers to encapsulate controller-specific details
By requiring different system calls for each device
By disabling unsupported devices
Why do operating systems provide a separate socket interface for network devices?
Network devices only support synchronous I/O
Network I/O behavior differs significantly from disk I/O
Network devices do not use interrupts
Network devices cannot be abstracted by drivers
What is a key feature of asynchronous I/O?
It’s easy to use
It suspends the process
It signals the process when I/O is done
It uses only one thread
What system call in UNIX can be used for clocks and timers?
fork()
exec()
ioctl()
sleep()
What is the main purpose of spooling in the kernel I/O subsystem?
To speed up data access by storing copies
To allow a device to handle multiple requests at once
To hold output for a device that can handle only one request at a time
To prevent deadlocks during device access
Which of the following is an example of advanced error handling?
Always terminating a process when an I/O error occurs
Solaris FMA stopping the use of devices with increasing retry-able errors
Ignoring all disk read errors
Returning no error code when I/O fails
Which of the following is a reason the kernel uses complex data structures for I/O?
To simplify user interface design
To track buffers, memory allocation, and dirty blocks
To reduce CPU usage
To allow direct access to device drivers
Which of the following best describes caching in the Kernel I/O Subsystem?
Holding output until a device is free
Providing exclusive access to a device
Storing a faster copy of data to improve I/O performance
Allocating and de-allocating devices to avoid deadlock
When an I/O request fails, most operating systems return an error code or error number to indicate the failure.
True
False
What is the correct sequence of events when a user program performs I/O using a system call?
Perform I/O → Trap to kernel → Return to calling thread
Trap to kernel → System call dispatch → Perform I/O → Return to calling thread
System call dispatch → Return to calling thread → Perform I/O
Trap to kernel → Return to calling thread → Perform I/O
