Transcription and Subtitles
- 62Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
Why must an operating system support different types of input/output devices?
Why must an operating system support different types of input/output devices?
62 questions
- 1
Why must an operating system support different types of input/output devices?
- A
Devices all use identical hardware but require different user interface colors
- B
Devices differ in connection methods, speeds, directions, and interaction requirements
- C
Devices differ mainly because each one requires a separate operating system
- D
Devices can communicate only when they are produced by the same manufacturer
Correct answer
BDevices differ in connection methods, speeds, directions, and interaction requirements
Explanation
Input/output devices can use different connections, operate at different speeds, support one-way or two-way communication, and require different forms of interaction. The operating system must accommodate these differences.
- A
- 2
Which device is an example of a relatively slow input/output device?
- A
A tape drive or printer
- B
An electronic processor cache
- C
An internal CPU register
- D
A high-speed system bus
Correct answer
AA tape drive or printer
Explanation
The content contrasts fast devices such as SSDs with slow devices such as tape drives and printers.
- A
- 3
Which statement correctly describes one-way and two-way input/output devices?
- A
A two-way device can both send and receive data, whereas a one-way device performs only one of those operations
- B
A two-way device must use two separate operating systems, whereas a one-way device uses one
- C
A two-way device is always faster than a one-way device
- D
A two-way device always transfers blocks, whereas a one-way device always transfers characters
Correct answer
AA two-way device can both send and receive data, whereas a one-way device performs only one of those operations
Explanation
Some devices both send and receive data, while others only send data or only provide input. Direction of communication is independent of transfer size and speed.
- A
- 4
What are ports, buses, and device controllers used for in an input/output system?
- A
They ensure that every device operates at the same transfer speed
- B
They convert every device into a storage device with identical behavior
- C
They replace the operating system whenever an application accesses a device
- D
They provide connection paths, data-transfer routes, and device-control functions
Correct answer
DThey provide connection paths, data-transfer routes, and device-control functions
Explanation
The system needs hardware for connecting devices, transferring data, and controlling different device types. Ports, buses, and controllers provide these functions.
- A
- 5
What is the primary purpose of a device driver?
- A
To provide software that understands and controls a particular type of hardware
- B
To replace the device controller with a general-purpose processor
- C
To increase the physical storage capacity of every connected device
- D
To allow applications to bypass the operating system
Correct answer
ATo provide software that understands and controls a particular type of hardware
Explanation
A device driver is specific software that communicates with a particular device while accounting for its setup and functions.
- A
- 6
Why might installing a new mouse require installing a device driver?
- A
The mouse cannot receive electrical power without a file-system driver
- B
The driver ensures that the mouse uses the same controller as the keyboard
- C
The driver changes the mouse into a storage device before it can be used
- D
The operating system needs software that knows how to communicate with that mouse
Correct answer
DThe operating system needs software that knows how to communicate with that mouse
Explanation
New hardware may require a driver so the operating system can communicate with its specific controller and functions.
- A
- 7
What is the relationship between a device controller and the device it manages?
- A
The controller is a user application that interprets the device's output
- B
The controller is the same component as the operating system kernel
- C
The controller is a network connection that exists only for remote devices
- D
The controller contains electronics that manage the device and may include control logic, memory, or buffering
Correct answer
DThe controller contains electronics that manage the device and may include control logic, memory, or buffering
Explanation
Device controllers are hardware electronics associated with devices. They can include control circuitry and may contain memory used for caching or buffering.
- A
- 8
Why can multiple USB devices use the same type of connector while behaving differently?
- A
USB automatically converts every device into a keyboard-like character device
- B
The USB connection is shared, but each device has its own controller and device-specific behavior
- C
The operating system assigns each USB device a completely separate physical bus
- D
All USB devices perform exactly the same operations once they are connected
Correct answer
BThe USB connection is shared, but each device has its own controller and device-specific behavior
Explanation
A keyboard, mouse, phone, webcam, and storage device may all use USB, but their controllers and functions differ. They share the connection standard without being identical devices.
- A
- 9
What is the role of a data bus in an input/output system?
- A
It stores a permanent copy of every device driver
- B
It carries data between devices, controllers, memory, and the processor
- C
It determines whether a device is physically connected to a monitor
- D
It translates all device data into one fixed file format
Correct answer
BIt carries data between devices, controllers, memory, and the processor
Explanation
The data bus provides a shared path along which data moves between connected components of the computer system.
- A
- 10
What is a key advantage of using common input/output instructions?
- A
Applications no longer need device drivers or operating-system support
- B
Every device can then use the same internal controller circuitry
- C
The operating system can issue general operations such as reading data without reinventing instructions for every device
- D
All devices are forced to transfer the same amount of data
Correct answer
CThe operating system can issue general operations such as reading data without reinventing instructions for every device
Explanation
General operations such as reading data can be presented consistently, while device-specific hardware handles how the operation is implemented.
- A
- 11
What is the purpose of registers in an input/output controller?
- A
They replace the bus by connecting every device directly to the CPU
- B
They ensure that the device never needs an interrupt
- C
They can hold transferred data and store status or control information
- D
They permanently archive all data ever sent to the device
Correct answer
CThey can hold transferred data and store status or control information
Explanation
Controllers use registers to receive or provide data and to represent information such as whether a device is busy or available.
- A
- 12
Why is a device-busy status important when managing input/output?
- A
It allows a process to bypass the device driver during a transfer
- B
It guarantees that every device completes its operation at the same speed
- C
It helps prevent multiple processes from using an exclusive device simultaneously
- D
It converts a one-way device into a two-way device
Correct answer
CIt helps prevent multiple processes from using an exclusive device simultaneously
Explanation
A status register can indicate whether a device is already in use. This is important for exclusive devices such as printers, where simultaneous access could produce mixed output.
- A
- 13
What is memory-mapped input/output?
- A
It represents device locations as memory addresses so ordinary memory instructions can access them
- B
It allows only storage devices to communicate with the processor
- C
It prevents device controllers from using address buses
- D
It copies all device data permanently into the computer's main memory
Correct answer
AIt represents device locations as memory addresses so ordinary memory instructions can access them
Explanation
With memory-mapped input/output, a device is assigned an address that behaves like a memory location. Reading or writing that address performs an input/output operation.
- A
- 14
In a memory-mapped graphics example, what happens when software writes data representing blue to a graphics adapter's mapped address?
- A
The operating system changes the computer's entire display palette to blue
- B
The graphics hardware uses the value to make the corresponding screen pixel blue
- C
The value is stored only as ordinary data and cannot affect the display
- D
The graphics adapter interprets the value as a request to print a blue page
Correct answer
BThe graphics hardware uses the value to make the corresponding screen pixel blue
Explanation
The example describes writing a value representing blue to a mapped address associated with a pixel. The graphics adapter then sends the appropriate information to the monitor.
- A
- 15
How does direct input/output instruction access differ from memory-mapped input/output?
- A
Direct input/output eliminates the need for device controllers
- B
Direct input/output stores device data only in CPU registers and never uses buses
- C
Direct input/output uses instructions identified specifically as input/output operations rather than ordinary memory instructions
- D
Direct input/output can be used only for monitors and graphics adapters
Correct answer
CDirect input/output uses instructions identified specifically as input/output operations rather than ordinary memory instructions
Explanation
The content distinguishes memory-mapped access from using separate instructions that explicitly identify an input/output operation.
- A
- 16
What does it mean for a device or controller to have a well-known input/output address?
- A
The address identifies the device's physical location in the computer room
- B
The device can be accessed only by applications that know its manufacturer's name
- C
The device automatically receives the same address as every other device
- D
The system uses a predefined address associated with that device or control function
Correct answer
DThe system uses a predefined address associated with that device or control function
Explanation
Well-known input/output addresses are predefined locations used to access particular devices or functions, such as an interrupt controller.
- A
- 17
What is polling in an input/output system?
- A
The operating system transfers an entire file without checking device status
- B
The CPU repeatedly checks devices to determine whether any requires attention
- C
A controller randomly selects a device whenever the bus becomes available
- D
A device sends one interrupt that permanently stops the current process
Correct answer
BThe CPU repeatedly checks devices to determine whether any requires attention
Explanation
Polling involves checking devices one after another to ask whether they have data or need service.
- A
- 18
What is a major disadvantage of polling many input/output devices?
- A
Polling prevents devices from ever sending data to the CPU
- B
Checking devices can take substantial time, causing delayed service or lost time-sensitive data
- C
Polling requires every device to have a separate processor
- D
Polling works only when all devices operate at identical speeds
Correct answer
BChecking devices can take substantial time, causing delayed service or lost time-sensitive data
Explanation
If the CPU spends too long checking devices, it may reach a device too late or waste processing time waiting on slow devices. This can be especially problematic for data that cannot be replaced.
- A
- 19
How do interrupts improve on polling for input/output devices?
- A
The device stores data indefinitely so that no service is ever required
- B
The CPU permanently assigns the bus to the first device that requests it
- C
The device performs all operating-system processing without involving the CPU
- D
A device can notify the CPU when it needs service instead of requiring the CPU to check every device repeatedly
Correct answer
DA device can notify the CPU when it needs service instead of requiring the CPU to check every device repeatedly
Explanation
With interrupts, a device raises an interrupt request when it has data or needs attention. The CPU can then service it rather than continually polling every device.
- A
- 20
What does a keyboard interrupt handler typically do when a key is pressed?
- A
It shuts down the keyboard until the application requests another character
- B
It immediately interprets the character and completes the user's entire task
- C
It obtains the character and places it in a buffer for the eventual user process
- D
It sends the character directly to every process currently running
Correct answer
CIt obtains the character and places it in a buffer for the eventual user process
Explanation
The interrupt handler should act quickly: it retrieves the character and stores it in a buffer. The process using the keyboard can later process the character.
- A
- 21
Why should an interrupt handler be small, compact, and fast?
- A
The CPU is interrupted while performing other work, so it should return to that work quickly
- B
Small handlers are required because interrupt hardware cannot store any instructions
- C
Fast handlers ensure that all input/output devices use the same protocol
- D
Compact handlers eliminate the need for buffers and device drivers
Correct answer
AThe CPU is interrupted while performing other work, so it should return to that work quickly
Explanation
An interrupt handler temporarily receives CPU control. Keeping it short minimizes disruption to the process that was interrupted.
- A
- 22
What happens after a device raises an interrupt request line?
- A
The device immediately becomes the computer's permanent processor
- B
The operating system erases the device's buffer before running any handler
- C
The CPU suspends or redirects its current work, runs the appropriate handler, and then resumes the interrupted work
- D
The CPU ignores the request until all other processes have terminated
Correct answer
CThe CPU suspends or redirects its current work, runs the appropriate handler, and then resumes the interrupted work
Explanation
The CPU detects the raised interrupt line, transfers control to an interrupt handler, and resumes the previous activity after the handler returns.
- A
- 23
What is the distinction between maskable and non-maskable interrupts?
- A
Maskable interrupts come only from storage devices, whereas non-maskable interrupts come only from keyboards
- B
Maskable interrupts are always hardware errors, whereas non-maskable interrupts are always user requests
- C
Maskable interrupts can be temporarily ignored or disabled, whereas non-maskable interrupts must be serviced
- D
Maskable interrupts run without handlers, whereas non-maskable interrupts require no CPU involvement
Correct answer
CMaskable interrupts can be temporarily ignored or disabled, whereas non-maskable interrupts must be serviced
Explanation
A maskable interrupt may be ignored or deferred, while a non-maskable interrupt is designed to receive service regardless of normal masking.
- A
- 24
Why might an operating system assign priorities to interrupts?
- A
Some events are more urgent or important and should be serviced before lower-priority events
- B
Priorities guarantee that polling is faster than interrupt-driven input/output
- C
Priorities ensure that every interrupt takes exactly the same amount of time
- D
Priorities allow the operating system to remove all device drivers
Correct answer
ASome events are more urgent or important and should be serviced before lower-priority events
Explanation
Interrupt prioritization allows urgent events to receive attention before less important ones. Interrupt systems may also distinguish between maskable and non-maskable events.
- A
- 25
Which of the following can be handled through an interrupt mechanism in addition to ordinary device requests?
- A
Exceptions such as divide errors, breakpoints, and page faults
- B
Only network messages that arrive from outside the computer
- C
Only user actions that occur through a graphical interface
- D
Only successful printer operations and completed keyboard entries
Correct answer
AExceptions such as divide errors, breakpoints, and page faults
Explanation
The content notes that interrupt mechanisms also cover exceptions, including divide errors, debugging breakpoints, and page faults, as well as system calls and device events.
- A
- 26
What problem does direct memory access address?
- A
It makes all input/output devices operate at the CPU's clock speed
- B
It allows applications to access hardware without operating-system control
- C
It prevents the CPU from having to manage every individual word in a large data transfer
- D
It prevents devices from using memory as a temporary storage location
Correct answer
CIt prevents the CPU from having to manage every individual word in a large data transfer
Explanation
Without DMA, the CPU may need to manage each word transferred. DMA allows a controller to move a larger chunk directly to or from memory.
- A
- 27
Which transfer request best illustrates the use of DMA?
- A
Requesting that a process check each device one at a time for new data
- B
Requesting that a controller transfer 4KB from a specified device location into a specified memory location
- C
Requesting that the CPU read one keyboard character and immediately interpret it
- D
Requesting that a monitor display one pixel using a memory-mapped address
Correct answer
BRequesting that a controller transfer 4KB from a specified device location into a specified memory location
Explanation
DMA is suited to larger transfers. The CPU specifies the amount, source, and destination, then allows the DMA controller to perform the transfer.
- A
- 28
How does a CPU typically learn that a DMA transfer has finished?
- A
The DMA controller raises an interrupt when the transfer completes
- B
The device changes its connector type after the transfer completes
- C
The CPU must continually read every transferred word from the device
- D
The user manually confirms completion through the operating-system interface
Correct answer
AThe DMA controller raises an interrupt when the transfer completes
Explanation
DMA allows the CPU to continue other work and receive an interrupt when the hardware transfer is complete.
- A
- 29
What is an important cost of using DMA?
- A
DMA removes the need for memory and therefore limits transfer size
- B
DMA can be used only with character devices
- C
The CPU must process every byte twice instead of once
- D
The system requires additional hardware in the form of a DMA controller
Correct answer
DThe system requires additional hardware in the form of a DMA controller
Explanation
DMA improves transfer efficiency but requires additional hardware, making it more costly than a purely CPU-managed transfer.
- A
- 30
How does a character device differ from a block device?
- A
A character device supports random access, whereas a block device supports only sequential access
- B
A character device requires DMA, whereas a block device cannot use DMA
- C
A character device transfers individual characters or small units, whereas a block device transfers groups of data
- D
A character device can only output data, whereas a block device can only input data
Correct answer
CA character device transfers individual characters or small units, whereas a block device transfers groups of data
Explanation
Keyboards are described as character-stream devices, while hard disks are block devices that transfer blocks such as 2KB or 4KB.
- A
- 31
Which device is best classified as a character-stream device?
- A
A memory controller that transfers a page-sized region
- B
A keyboard that supplies one character at a time
- C
A disk array that retrieves several sectors together
- D
A hard disk that transfers a fixed-size block
Correct answer
BA keyboard that supplies one character at a time
Explanation
A keyboard supplies input as a sequence of individual characters rather than as large blocks.
- A
- 32
What is the difference between sequential and random access?
- A
Sequential access proceeds through data in order, whereas random access can reach a selected location directly
- B
Sequential access always uses characters, whereas random access always uses blocks
- C
Sequential access is always asynchronous, whereas random access is always synchronous
- D
Sequential access is limited to networks, whereas random access is limited to printers
Correct answer
ASequential access proceeds through data in order, whereas random access can reach a selected location directly
Explanation
A tape drive or keyboard is described as sequential, while a hard disk or display can access or update selected locations without processing every preceding location.
- A
- 33
Which example demonstrates random access?
- A
Printing every page in a queue in the order received
- B
Reading a tape from its beginning until reaching the required record
- C
Reading every character from a keyboard in the order typed
- D
Changing one selected pixel in the middle of a screen without redrawing the entire screen
Correct answer
DChanging one selected pixel in the middle of a screen without redrawing the entire screen
Explanation
Random access allows a selected location to be reached directly. Updating one screen pixel without redrawing the whole display illustrates this property.
- A
- 34
What does it mean for an input/output device to be shareable?
- A
Multiple processes can use the device without requiring exclusive ownership at all times
- B
The device automatically creates a separate copy for every process
- C
The device can transfer data only when no process is running
- D
The device must be connected through several physical connectors simultaneously
Correct answer
AMultiple processes can use the device without requiring exclusive ownership at all times
Explanation
A shareable device, such as a hard disk, can support requests from multiple processes, typically under operating-system control.
- A
- 35
Why is a printer generally treated as a dedicated device during an individual print operation?
- A
Printers cannot receive data from an operating system device driver
- B
Printers always transfer data randomly rather than sequentially
- C
A printer can process only one byte during its entire operating lifetime
- D
Concurrent processes writing directly to it could interleave their output and produce a jumbled result
Correct answer
DConcurrent processes writing directly to it could interleave their output and produce a jumbled result
Explanation
Multiple processes should not write to a printer simultaneously because their output could become mixed. Scheduling or spooling can coordinate access.
- A
- 36
Which classification describes a hard disk most accurately?
- A
A character-oriented, random-access, write-only device
- B
A block-oriented, random-access, read/write device
- C
A character-oriented, sequential, read-only device
- D
A block-oriented, output-only, non-shareable device
Correct answer
BA block-oriented, random-access, read/write device
Explanation
Hard disks transfer blocks, permit access to selected locations, and support both reading and writing.
- A
- 37
What is the role of the input/output subsystem within the operating-system kernel?
- A
It replaces all hardware controllers with application-level code
- B
It coordinates device drivers, controllers, buffering, scheduling, and communication with applications
- C
It provides only a graphical display and does not manage data transfers
- D
It allows each application to control hardware independently of the kernel
Correct answer
BIt coordinates device drivers, controllers, buffering, scheduling, and communication with applications
Explanation
The kernel's input/output subsystem organizes the mechanisms needed to manage diverse devices, including drivers, controllers, buffers, scheduling, and protection.
- A
- 38
How do a device driver and a device controller work together?
- A
The driver stores physical data while the controller displays it to the user
- B
The driver provides software-level control while the controller provides hardware-level control for the device
- C
The driver handles only networks while the controller handles only storage
- D
The driver and controller are independent alternatives that cannot operate together
Correct answer
BThe driver provides software-level control while the controller provides hardware-level control for the device
Explanation
A device driver understands the hardware from the operating-system side, while the device controller implements control on the hardware side. They work in tandem.
- A
- 39
Why is a device driver alone insufficient to use a mouse?
- A
A driver can function only after the mouse has been converted into a printer
- B
A driver is used only to manage disconnected devices
- C
The physical mouse and its controller must also be connected and available
- D
The operating system requires two different drivers for every mouse operation
Correct answer
CThe physical mouse and its controller must also be connected and available
Explanation
The driver may exist in the operating system, but the physical device and its controller must also be present for communication to occur.
- A
- 40
What is the purpose of buffering between a slow device and the rest of the system?
- A
It permanently replaces the device's storage medium
- B
It prevents the operating system from knowing when data is ready
- C
It forces the slow device to operate at the same physical speed as memory
- D
It temporarily stores data so the CPU or bus does not have to wait for the slower device at every step
Correct answer
DIt temporarily stores data so the CPU or bus does not have to wait for the slower device at every step
Explanation
A buffer is memory placed between components with different speeds. It accepts data from a slow device and allows later transfer at the speed of the bus or system.
- A
- 41
How can buffering help with keyboard input?
- A
It converts all typed characters into disk blocks before the keyboard sends them
- B
It stores typed characters until the process using the keyboard is ready to handle them
- C
It ensures that every process receives every character typed
- D
It prevents the keyboard interrupt handler from receiving any input
Correct answer
BIt stores typed characters until the process using the keyboard is ready to handle them
Explanation
The keyboard interrupt handler can place characters in a buffer, allowing the user process to retrieve and process them later.
- A
- 42
What issue does copy semantics raise when data exists in multiple buffers or locations?
- A
The system must ensure that all devices use the same connector
- B
The system must determine which copy is authoritative, especially if one copy has changed
- C
The system must prevent any data from being stored in memory
- D
The system must convert copied data into a character stream
Correct answer
BThe system must determine which copy is authoritative, especially if one copy has changed
Explanation
When data exists in multiple places, such as a user buffer and a system buffer, the system must know which version is current and which changes need to be saved.
- A
- 43
What information might be stored in a device-status table?
- A
The complete source code of every application using the device
- B
Only the physical dimensions and colors of each device
- C
The connected devices, their pending requests, and the processes using them
- D
Only the names of users who have logged into the computer
Correct answer
CThe connected devices, their pending requests, and the processes using them
Explanation
Device-status tables track devices connected to the system, requests for those devices, and relevant ownership or usage information.
- A
- 44
Why might an input/output subsystem schedule device requests?
- A
To ensure that only the fastest process receives device access
- B
To make every device process requests in alphabetical order
- C
To coordinate access, prevent conflicts, and provide fair or efficient use of a device
- D
To prevent all devices from using buffers or caches
Correct answer
CTo coordinate access, prevent conflicts, and provide fair or efficient use of a device
Explanation
Scheduling can prevent conflicting access, organize requests efficiently, and ensure that processes receive fair opportunities to use shared resources.
- A
- 45
What does quality of service mean in the context of input/output management?
- A
A rule that gives all requests to the process that arrived first
- B
A technique for allowing processes to ignore device status
- C
A method for making every input/output device physically identical
- D
A guarantee that each process receives a defined or fair amount of access to a resource
Correct answer
DA guarantee that each process receives a defined or fair amount of access to a resource
Explanation
Quality of service can be implemented to ensure fairness by guaranteeing each process a certain amount of access to a shared resource.
- A
- 46
What is caching used for in input/output systems?
- A
It keeps frequently or predictively useful data in faster memory to reduce repeated access to a slow device
- B
It makes a device dedicated to one process permanently
- C
It replaces interrupts with continuous polling
- D
It ensures that data is never copied between system components
Correct answer
AIt keeps frequently or predictively useful data in faster memory to reduce repeated access to a slow device
Explanation
A cache stores data in faster memory so subsequent accesses can avoid returning to a slower device. Systems may use buffers and caches together.
- A
- 47
What is spooling designed to accomplish for a slow printer?
- A
It prevents the printer from storing pending requests
- B
It lets a process create a print file and continue while the printer later processes files from a queue
- C
It makes the printer transfer data directly into CPU registers without buffering
- D
It allows many processes to write directly to the printer at the same instant
Correct answer
BIt lets a process create a print file and continue while the printer later processes files from a queue
Explanation
Spooling stores output as files in a queue. The printer later processes those files, allowing the requesting process to continue without waiting for printing to finish.
- A
- 48
Why can reserving a device for one process lead to deadlock?
- A
Processes may hold resources while waiting for resources held by one another, creating a cycle of indefinite waiting
- B
Deadlock occurs because dedicated devices cannot use interrupts
- C
Reserved devices automatically erase the data of every other process
- D
A process can reserve a device only if it has no input/output requests
Correct answer
AProcesses may hold resources while waiting for resources held by one another, creating a cycle of indefinite waiting
Explanation
Deadlock can occur when processes wait for resources held by other processes, while those processes in turn wait for resources held by the first process. This creates circular waiting.
- A
- 49
Which situation is an example of input/output deadlock?
- A
Process A holds a device while waiting for data from Process B, while Process B waits for the device held by Process A
- B
A keyboard places a character in a buffer while the CPU performs other work
- C
Process A completes its device request before Process B begins its request
- D
A DMA controller interrupts the CPU after completing a transfer
Correct answer
AProcess A holds a device while waiting for data from Process B, while Process B waits for the device held by Process A
Explanation
The first situation forms a cycle: each process waits for something that the other process controls. Neither can proceed, so the system is deadlocked.
- A
- 50
What is one appropriate response to repeated input/output errors on a storage device?
- A
The device driver should delete every other block on the device
- B
The system should treat the failing block as permanently faster than other blocks
- C
The operating system must continue retrying the block forever without recording the problem
- D
The controller may mark a repeatedly failing block as bad and prevent its future use
Correct answer
DThe controller may mark a repeatedly failing block as bad and prevent its future use
Explanation
Storage controllers may stop using blocks after repeated access failures. The system can then record or report the issue rather than repeatedly relying on the bad block.
- A
- 51
Why must input/output access be protected by the operating system?
- A
Protection prevents the kernel from communicating with device controllers
- B
Without protection, every device would automatically become a network device
- C
An uncontrolled process might issue hardware commands directly and interfere with other processes or devices
- D
Protection is needed only to make devices operate at a higher clock frequency
Correct answer
CAn uncontrolled process might issue hardware commands directly and interfere with other processes or devices
Explanation
Processes should use controlled system calls rather than bypassing the operating system. Otherwise, a process could access devices improperly or disrupt other processes.
- A
- 52
What should happen if a process attempts to bypass operating-system control and access an input/output device directly?
- A
The unauthorized access should be blocked
- B
The operating system should disable all interrupt handling
- C
The process should receive exclusive ownership of every device
- D
The device should automatically accept the command without validation
Correct answer
AThe unauthorized access should be blocked
Explanation
The kernel must control input/output access and prevent processes from bypassing its protection mechanisms.
- A
- 53
What does blocking input/output mean?
- A
The device rejects every request made by the operating system
- B
The requesting process stops and waits until the input/output operation finishes
- C
The operation proceeds while the process continues executing normally
- D
The CPU transfers the request to another process without waiting
Correct answer
BThe requesting process stops and waits until the input/output operation finishes
Explanation
In blocking input/output, the process waits while the requested operation is performed. After completion, it resumes execution.
- A
- 54
What is a major disadvantage of blocking input/output?
- A
The device cannot report errors after completing the operation
- B
The CPU must transfer every byte using a separate physical connector
- C
The operating system cannot schedule any other process
- D
The requesting process cannot perform other useful work while waiting for a slow device
Correct answer
DThe requesting process cannot perform other useful work while waiting for a slow device
Explanation
Blocking input/output is simple to implement but inefficient when devices are slow because the requesting process waits for the entire operation.
- A
- 55
How does non-blocking input/output differ from blocking input/output?
- A
The operation permanently prevents the device from raising interrupts
- B
The operation requires the CPU to remain idle until all data arrives
- C
The operation can be used only with printers and other output devices
- D
The operation can transfer what is currently available and return control rather than waiting for completion
Correct answer
DThe operation can transfer what is currently available and return control rather than waiting for completion
Explanation
Non-blocking input/output does not require the process to wait until the entire request is complete. It may perform a partial transfer and report how much was transferred.
- A
- 56
Why must a process track the amount transferred during non-blocking input/output?
- A
Non-blocking input/output always transfers more data than requested
- B
The operating system discards all data unless the process requests it twice
- C
The amount transferred determines which connector the device must use next
- D
The operation may transfer only part of the requested data, so the process must know what remains
Correct answer
DThe operation may transfer only part of the requested data, so the process must know what remains
Explanation
A non-blocking operation may make partial progress. Reporting the amount transferred lets the process determine whether another request is needed.
- A
- 57
What characterizes synchronous input/output?
- A
The CPU must poll every device until the operation completes
- B
The request is abandoned immediately after being issued
- C
The process continues without any later indication that the operation finished
- D
The request eventually completes through the device and handler, and the requester is notified when the result is available
Correct answer
DThe request eventually completes through the device and handler, and the requester is notified when the result is available
Explanation
In synchronous input/output, the request follows the device-driver and interrupt-handling path, and completion is communicated back to the requester.
- A
- 58
What characterizes asynchronous input/output?
- A
The operation can never use interrupts or DMA
- B
The request is initiated, the process continues doing other work, and completion is reported later
- C
The requesting process must remain stopped until the device finishes
- D
The CPU handles every word continuously without using a buffer
Correct answer
BThe request is initiated, the process continues doing other work, and completion is reported later
Explanation
Asynchronous input/output allows the initiating process to continue while the device performs the transfer. The system later reports completion or makes the data available.
- A
- 59
Why is asynchronous input/output generally more difficult to implement than blocking input/output?
- A
It requires the device to stop using all hardware controllers
- B
It eliminates the need to determine whether a device has finished
- C
It can operate only when the CPU has no other processes to run
- D
The system must track outstanding requests, buffers, completion events, and data ownership while other work continues
Correct answer
DThe system must track outstanding requests, buffers, completion events, and data ownership while other work continues
Explanation
Asynchronous operation allows greater overlap between computation and input/output, but the system must manage completion notifications, buffering, and multiple active operations.
- A
- 60
Why does network-based storage often add extra input/output delay?
- A
Network storage never uses device drivers or operating-system subsystems
- B
Remote storage is always slower because it cannot use caching
- C
Network connections transfer data only through CPU registers
- D
The request must cross a network in addition to passing through the local input/output layers and remote storage system
Correct answer
DThe request must cross a network in addition to passing through the local input/output layers and remote storage system
Explanation
Accessing cloud or network storage involves the local input/output path plus network communication and processing on the remote system, adding delay.
- A
- 61
Why might a cloud-storage service keep a local copy of frequently used files?
- A
A local copy changes network storage into a character device
- B
A local copy prevents the remote system from storing any version of the file
- C
Local copies eliminate the need for synchronization between versions
- D
Local access can be faster than retrieving the same data over the network every time
Correct answer
DLocal access can be faster than retrieving the same data over the network every time
Explanation
Keeping frequently used data locally reduces repeated network access and improves responsiveness, although synchronization between local and remote copies must still be managed.
- A
- 62
Why can input/output performance be difficult to improve?
- A
The operating system cannot use buffers, caches, interrupts, or DMA
- B
All input/output operations are already performed entirely inside CPU registers
- C
Requests may have to pass through multiple layers and ultimately wait for devices that are much slower than the CPU
- D
Input/output devices always operate faster than processors
Correct answer
CRequests may have to pass through multiple layers and ultimately wait for devices that are much slower than the CPU
Explanation
Input/output involves multiple layers, including applications, the kernel, drivers, handlers, controllers, and devices. Physical device speed, especially for storage and networks, can dominate performance.
- A

Ask anything
We've read this whole study set, so questions about it get the best answers.