CSC 415 Operating System Principles Unit 09
In UNIX, part of a path name includes a device name. Select one: a. False b. True
a. False
I/O subsystem is integrated into process manager, memory manager and file system. Select one: True False
False
On a read operation, the device driver first checks if the data already available in the buffer cache. Select one: True False
False
Although caching and buffering are distinct functions, sometimes a region of memory can be used for both purposes. Select one: True False
True
CSTREAMS is the preferred method for writing protocols and device drivers in UNIX variants. Select one: True False
True
STREAMS I/O is asynchronous except when the user process communicates with the stream head. Select one: True False
True
Buffering in I/O is used to Select one: a. All of the other options. b. support copy semantics for application I/O. c. cope with a speed mismatch between the producer and consumer of a data stream. d. provide adaptations for devices that have different data-transfer sizes.
a. All of the other options.
An interrupt priority scheme can be used to ____. Select one: a. All the other answers b.allow the most urgent work to be finished first c.defer the handling of low-priority interrupt without masking off all interrupts d.make it possible for high-priority interrupts to preempt the execution of a low priority interrupt
a. All the other answers
An expansion bus is used to connect relatively high speed devices to the main bus. Select one: a. False b. True
a. False
____ I/O accesses a block device as a simple array of blocks. Select one: a. Raw b. Cooked c. Stream d. Indirect
a. Raw
A dedicated device cannot be used concurrently by several processes or threads. Select one: a. True b. False
a. True
An I/O system call returns a one-bit information about the status of the call. Select one: a. True b. False
a. True
Technique used to improve I/O efficiency by temporarily storing copies of data is called Select one: a. caching. b. spooling. c. buffering. d. memory mapping.
a. caching.
In DMA-based I/O, Select one: a. cycle stealing can slow down the CPU computation, but off-loading the data-transfer work to a DMA controller generally improves the total system performance. b. data is transferred to/from a single block of memory, but not to/from multiple blocks. c. interrupt mechanism is not used. d. CPU is relieved from data transfer and is interrupted after every word has been transferred to initiate the next word transfer.
a. cycle stealing can slow down the CPU computation, but off-loading the data-transfer work to a DMA controller generally improves the total system performance.
Interrupt chaining Select one: a. is a compromise between the overhead of a huge interrupt table and the inefficiency of dispatching to a single interrupt handler. b. allows CPU to defer processing of low-priority interrupts without masking all interrupts. c. is used to handle interrupts but not exceptions. d. splits interrupt management between first level and second level interrupt handlers.
a. is a compromise between the overhead of a huge interrupt table and the inefficiency of dispatching to a single interrupt handler.
In polling I/O, the main inefficiency comes from Select one: a. polling when it is attempted repeatedly yet rarely finds a device ready for service. b. the hardware controller when it notifies the CPU that the device is ready for service. c. the slow data transfer rate between a device and the host. d. the basic polling operation that may be comprised of several CPU instructions.
a. polling when it is attempted repeatedly yet rarely finds a device ready for service.
Component that measures elapsed time and to trigger operations is called a Select one: a. programmable interval timer. b. socket. c. high performance event timer. d. network time protocol.
a. programmable interval timer.
Which of the following principles is used to improve the efficiency of I/O? Select one: a. Move processing primitives into hardware, to allow their operation in device controllers to be concurrent with CPU and bus operation. b. All of the other options. c. Reduce the number of times that data must be copied in memory while passing between device and application. d. Increase concurrency by using DMA-knowledgeable controllers or channels to offload simple data copying from the CPU.
b. All of the other options.
A maskable interrupt can never be disabled. Select one: a. True b. False
b. False
Vectored IO allows one system call to perform multiple IO operations involving a single location. Select one: a. True b. False
b. False
A(n) ____ is a buffer that holds output for a device that cannot accept interleaved data streams. Select one: a. cache b. spool c. escape d. block device
b. spool
A current trend in I/O device technology and I/O subsystem is Select one: a. to encapsulate the oddities of different I/O devices, the device drivers present device-specific interface for each device to the I/O subsystem. b. there is an increasingly broad variety of I/O devices. c. All of the other options. d. new devices are similar to the previous I/O devices that makes it easier to incorporate them in operating systems.
b. there is an increasingly broad variety of I/O devices.
Escape (or back door) in application I/O interface Select one: a. allows a user to interrupt a device at any time. b. transparently passes arbitrary commands from an application to a device driver. c. allows access to a few additional devices, such as a time-of-day clock and a timer. d. enables managing of devices with widely varying speeds ranging from a few bytes per second to gigabytes per second.
b. transparently passes arbitrary commands from an application to a device driver.
Which of the following is a principle that can improve the efficiency of I/O? Select one: a.Use small data transfers b.Move processing primitives into hardware c.Decrease concurrency using DMA controllers d.Increase the number of context switches.
b.Move processing primitives into hardware
In FAT used in MS-DOS, Select one: a. None of the other choices b.a string preceding the colon that identifies the storage device. c.the storage device is identified in the path name with no clear separation of the device portion. d.the mount table stores the identities of all storage devices.
b.a string preceding the colon that identifies the storage device.
DMA controllers ____. Select one: a.are a nonstandard component in PCs of today b.can steal memory access cycles from the main CPU c.do not utilize an additional, special purpose, processor d.can access main memory at the same time as the main CPU
b.can steal memory access cycles from the main CPU
Benefit(s) of using STREAMS is (are) Select one: a. All the other choices b.number of modules in STREAMS is constant. c.a module can be used by more than one device. d.STREAMS I/O is synchronous.
c.a module can be used by more than one device.
A sense key reports on the failure of a SCSI device by ____. Select one: a.giving detailed information about the exact cause of failure b.stating the general category of failure c.stating the general nature of the failure d.maintaining internal pages of error-log information
c.stating the general nature of the failure
A(n) ____ is a front-end processor that multiplexes the traffic from hundreds of remote terminals into one port on a large computer. Select one: a.network daemon b. I/O channel c.terminal concentrator d.context switch coordinator
c.terminal concentrator
A character-stream device ____. Select one: a. is a device such as a disk drive b.transfers data in blocks of bytes c.transfers data a byte at a time d. is similar to a random access device
c.transfers data a byte at a time
In modern operating systems, dynamic loading and unloading allows Select one: a.adding new I/O devices without recompiling the kernel. b.updating existing devices drivers without recompiling the kernel. c.adding new I/O devices after the system has already been booted. d. All the other choices
d. All the other choices
Which of the following is FALSE about streams? Select one: a. A stream is a full-duplex connection between a device driver and a user-level process. b. Messages may be dropped in a stream even if flow control is implemented. c. Each stream module contains a pair of queues. d. The number of modules in a stream is fixed by the operating system.
d. The number of modules in a stream is fixed by the operating system.
Which of the following is NOT a technique used for managing power consumption in mobile devices? Select one: a. Wakelocks. b. Power collapse. c. Component level power management. d. chilling with natural sources such as lake water, and solar panels.
d. chilling with natural sources such as lake water, and solar panels.
The ____ register of an I/O port can be written by the host to start a command or to change the mode of a device. Select one: a. status b. transfer c. data-in d. control
d. control
Device drivers Select one: a. manage only the basic I/O hardware elements b. manage only the newly emerging I/O devices that are unlike previous devices c. All the other answers d. present a uniform device- access interface to the I/O subsystem
d. present a uniform device- access interface to the I/O subsystem
Which of the following is true about I/O implementation? Select one: a.A specialized implementation in hardware is highly flexible. b.Implementation at the application level provides the highest performance benefits. c.An in-kernel implementation avoids the need to reboot or reload device drivers after every change to the code. d.An in-kernel implementation can cause data corruption and system crashes.
d.An in-kernel implementation can cause data corruption and system crashes.
Which of the following is true of a blocking system call? Select one: a.The application continues to execute its code when the call is issued. b.Blocking application code is harder to understand than nonblocking application code c.The call returns immediately without waiting for the I/O to complete. d.The execution of the application is suspended when the call is issued.
d.The execution of the application is suspended when the call is issued.
In a blocking system call, the execution of a process is suspended Select one: a. the kernel raises the priority of that process. b. until a fixed amount of time has elapsed. c. until the process is woken up by some other process. d. the I/O has completed.
not c
Which of the following is TRUE about a serial port controller and a fibre channel (FC) bus controller? Select one: a. Both FC bus controller and serial port controller are used in PCs. b. Both FC bus controller and serial port controller are often implemented as separate circuit boards. c. All of the other options. d. A serial-port controller is a simple device controller, while an FC bus controller is complex.
not c not b
A control register in an I/O device control Select one: a. contains status bits that can be read by the host. b. is read by the host to get input. c. is written by the host to choose half-duplex communication. d. is written by the host to send output.
not c not d
In memory-mapped I/O Select one: a. address space of the computing device is used for communicating with the I/O devices using the standard I/O instructions. b. main memory of the computing device is used for communicating with the I/O devices using the special I/O instructions. c. main memory of the computing device is used for communicating with the I/O devices using the standard I/O instructions. d. address space of the computing device is used for communicating with the I/O devices using the special I/O instructions.
not d