Unit 3 - Practice Quiz

CSE211 59 Questions
0 Correct 0 Wrong 59 Left
0/59

1 Which of the following is considered an output-only peripheral device?

Peripheral Devices Easy
A. Printer
B. Scanner
C. Mouse
D. Keyboard

2 In which mode of data transfer does the CPU continuously monitor the status of an I/O device until it is ready for transfer?

modes of data transfer Easy
A. Interrupt-initiated I/O
B. I/O Processor (IOP)
C. Direct Memory Access (DMA)
D. Programmed I/O

3 What does DMA stand for in the context of I/O organization?

Direct memory access transfer Easy
A. Dynamic Memory Allocation
B. Direct Memory Access
C. Direct Module Access
D. Distributed Memory Architecture

4 What is the primary purpose of a priority interrupt system?

Priority interrupt Easy
A. To handle all interrupts at the same time
B. To slow down the processor for I/O operations
C. To determine which interrupt to service first when multiple interrupts occur simultaneously
D. To bypass the memory management unit

5 An I/O interface is used to resolve the differences between the CPU and peripheral devices. Which of the following is a key function of an I/O interface?

Input output interface Easy
A. Executing application programs
B. Performing arithmetic calculations
C. Converting data signals and synchronizing speeds
D. Storing the operating system

6 What is another common name for an Input/Output Processor (IOP)?

Input/Output processor Easy
A. CPU
B. GPU
C. Channel
D. ALU

7 What is the primary function of a UART (Universal Asynchronous Receiver/Transmitter)?

UART Easy
A. To render graphics on a display
B. To convert parallel data to serial data for transmission and vice versa for reception
C. To perform complex mathematical calculations
D. To manage the computer's main memory

8 A touch screen monitor is an example of which type of device?

Peripheral Devices Easy
A. Output device only
B. Input device only
C. Storage device
D. Both input and output device

9 Which data transfer mode allows an I/O device to notify the CPU that it is ready for data transfer, freeing the CPU from polling?

modes of data transfer Easy
A. Programmed I/O
B. Memory-mapped I/O
C. Synchronous Transfer
D. Interrupt-initiated I/O

10 During a DMA transfer, which component has control over the memory buses?

Direct memory access transfer Easy
A. The ALU
B. The I/O device
C. The DMA controller
D. The CPU

11 The method of establishing priority by connecting all interrupt sources in a series is called:

Priority interrupt Easy
A. Polling
B. Parallel Priority
C. Vectored Interrupt
D. Daisy Chaining

12 The I/O bus connects the CPU and memory to the:

Input output interface Easy
A. System clock
B. ALU
C. I/O interfaces of peripheral devices
D. Cache memory

13 An Input/Output Processor (IOP) has its own local memory. What is the main purpose of this memory?

Input/Output processor Easy
A. To replace the computer's main memory
B. To store its own program instructions and buffer data for I/O transfers
C. To act as a high-speed cache for the CPU
D. To store the entire operating system

14 Which mode of data transfer offers the highest throughput for large data transfers?

modes of data transfer Easy
A. Asynchronous Transfer
B. Direct Memory Access (DMA)
C. Programmed I/O
D. Interrupt-initiated I/O

15 When the DMA controller takes control of the bus to transfer data, it is commonly referred to as:

Direct memory access transfer Easy
A. Polling
B. Interrupting
C. Cycle stealing
D. Bus arbitration

16 Magnetic disks and magnetic tapes are examples of which type of peripheral device?

Peripheral Devices Easy
A. Secondary storage devices
B. Human-readable devices
C. Communication devices
D. Machine-readable devices

17 In a non-vectored interrupt, what is the responsibility of the CPU after it acknowledges an interrupt?

Priority interrupt Easy
A. To restart the system
B. To immediately execute the interrupting device's code
C. To poll all devices to identify which one sent the interrupt
D. To ignore all other interrupts

18 What is the primary purpose of I/O ports in a computer system?

Input output interface Easy
A. To cool down the CPU
B. To act as a physical connection point for peripheral devices to the computer
C. To provide power to the motherboard
D. To store temporary data for the CPU

19 How does the CPU communicate with the Input/Output Processor (IOP)?

Input/Output processor Easy
A. The CPU physically connects and disconnects from the IOP
B. The IOP continuously polls the CPU for commands
C. The CPU sends I/O commands to the IOP as instructions to be executed
D. The CPU has no communication with the IOP

20 What is a major disadvantage of using Programmed I/O?

modes of data transfer Easy
A. It requires a special processor like an IOP.
B. It wastes a lot of CPU time by keeping it in a busy-wait loop.
C. It is very complex to implement.
D. It cannot be used for simple devices like keyboards.

21 A system needs to transfer a large, continuous block of data from a high-speed disk to memory with minimal CPU intervention to allow the CPU to perform complex computations concurrently. Which I/O data transfer mode is the most suitable for this scenario?

modes of data transfer Medium
A. Direct Memory Access (DMA)
B. Interrupt-driven I/O
C. Asynchronous I/O
D. Programmed I/O

22 In the context of DMA, what does 'cycle stealing' precisely refer to?

Direct memory access transfer Medium
A. The DMA controller seizes the bus from the CPU for the entire duration of a block transfer.
B. The DMA controller waits for the CPU to be idle before using the bus.
C. The DMA controller transparently uses the bus when the CPU is not using it, causing no delay.
D. The DMA controller forces the CPU to pause for one or more bus cycles to transfer a piece of data.

23 A system uses a daisy-chaining hardware priority interrupt scheme. Devices A, B, and C are connected in that physical sequence (A is closest to the CPU). If devices B and C request an interrupt simultaneously, what is the outcome?

Priority interrupt Medium
A. An error condition is raised due to simultaneous requests.
B. Device B is serviced first because its request is intercepted before the signal reaches C.
C. The CPU polls both devices to determine priority.
D. Device C is serviced first as it is last in the chain.

24 A processor uses memory-mapped I/O. Which of the following assembly-like instructions would be valid for reading data from a peripheral device whose data register is at address 0xFFFF0004?

Input output interface Medium
A. MOV R1, [0xFFFF0004]
B. IN R1, 0xFFFF0004
C. IO_READ R1, DEVICE_PORT
D. GET R1, 0xFFFF0004

25 What fundamental capability distinguishes an Input/Output Processor (IOP) from a more basic DMA controller?

Input/Output processor. Medium
A. An IOP can transfer data without CPU intervention.
B. An IOP can fetch and execute its own set of I/O-specific instructions from memory.
C. An IOP has a direct connection to the system's address bus.
D. An IOP can generate interrupts upon completion of a task.

26 In asynchronous serial communication managed by a UART, what is the purpose of the start and stop bits?

UART Medium
A. To provide error detection and correction for the data byte.
B. To indicate the beginning and end of the entire message stream.
C. To allow the receiver to synchronize its clock with the transmitter for the duration of a single character frame.
D. To specify the baud rate for the communication channel.

27 A DMA controller is set up to transfer 1024 bytes from a peripheral to memory in Burst Mode. What is the state of the CPU during this transfer?

Direct memory access transfer Medium
A. The CPU polls a status register in the DMA controller after each byte is transferred.
B. The CPU interleaves its instructions with the DMA byte transfers.
C. The CPU is halted and relinquishes control of the system buses until the entire 1024-byte transfer is complete.
D. The CPU continues to execute instructions but cannot access memory.

28 Comparing vectored interrupts to a software polling scheme for identifying the source of an interrupt, what is the primary advantage of the vectored approach?

Priority interrupt Medium
A. It allows an unlimited number of devices to be connected.
B. It requires fewer interrupt request lines.
C. It is simpler to implement in hardware.
D. It provides a faster response by eliminating the need for the CPU to query each device.

29 A magnetic hard disk drive is best characterized as a device with which of the following properties?

Peripheral Devices Medium
A. Random access and block-addressable
B. Sequential access and character-addressable
C. Random access and volatile
D. Sequential access and block-addressable

30 Which of the following is NOT a primary function of an I/O interface (also known as an I/O module or controller)?

Input output interface Medium
A. Resolving speed differences between the CPU/memory and the peripheral.
B. Executing the application logic that processes the I/O data.
C. Decoding device addresses to determine if it is being addressed by the CPU.
D. Converting data from parallel to serial format for a device.

31 A DMA controller is transferring data from an I/O device to memory at a rate of 4 MB/s. The CPU has a clock speed of 800 MHz. If the DMA uses cycle stealing and each memory access takes 4 clock cycles, what percentage of the CPU's time is consumed by the DMA transfers? ()

Direct memory access transfer Medium
A. 8%
B. 2%
C. 4%
D. 1%

32 Why is interrupt-driven I/O a significant improvement over programmed I/O for handling unpredictable inputs, such as a user typing on a keyboard?

modes of data transfer Medium
A. It uses a separate, dedicated bus for keyboard input, reducing system traffic.
B. It frees the CPU from being stuck in a busy-wait loop while waiting for I/O.
C. It transfers data at a much higher bit rate.
D. It eliminates the need for an I/O interface.

33 How does a CPU typically communicate a complex I/O task, such as 'read 5 blocks from disk drive 2 into memory address X', to an Input/Output Processor (IOP)?

Input/Output processor. Medium
A. The CPU sends a single, highly complex instruction to the IOP.
B. The CPU places the data directly onto the system bus for the IOP to find.
C. The CPU configures the IOP's internal registers one by one for each step of the operation.
D. The CPU writes a series of commands into a command block in main memory and passes the starting address of this block to the IOP.

34 In a parallel priority interrupt scheme using an interrupt controller IC (like the Intel 8259), how is the priority of competing interrupt requests typically resolved?

Priority interrupt Medium
A. The interrupt controller has internal programmable priority logic that determines which interrupt to forward to the CPU.
B. By the physical position of the device on a daisy chain.
C. The device sends its priority level along with the interrupt request.
D. The CPU's software polls all active interrupt lines and selects the highest priority one.

35 A UART is configured for 8 data bits, 1 stop bit, and no parity. It is transmitting data at 9600 baud. Approximately how many characters (bytes) can it transmit per second?

UART Medium
A. 960
B. 1066
C. 9600
D. 1200

36 Consider a system with a keyboard, a high-speed SSD, and a network interface card. Which of these devices is most likely to be a 'block-oriented' device, and which is 'character-oriented'?

Peripheral Devices Medium
A. Both are block-oriented.
B. SSD is block-oriented; Keyboard is character-oriented.
C. Both are character-oriented.
D. SSD is character-oriented; Keyboard is block-oriented.

37 To initialize a DMA controller for a transfer from a peripheral to memory, which set of information must the CPU provide?

Direct memory access transfer Medium
A. The device ID only.
B. A pointer to the interrupt service routine and the priority level.
C. The starting memory address, the number of words to transfer, and the direction of transfer.
D. The peripheral's data rate and the CPU's clock speed.

38 A system uses programmed I/O to read from a device. The polling loop to check the device's status register and read the data if ready takes 200 CPU clock cycles. If the CPU clock is 500 MHz and the device provides new data every 100 microseconds, what percentage of the CPU's time is spent polling, assuming it must poll continuously to not miss data?

modes of data transfer Medium
A. 0.2%
B. 0.4%
C. 2.0%
D. 1.0%

39 In an I/O interface with separate status and data registers, what is the typical sequence of operations for a CPU performing a read using programmed I/O?

Input output interface Medium
A. 1. Write a 'read' command to the data register. 2. Wait for an interrupt.
B. 1. Read the status register repeatedly until the 'ready' bit is set. 2. Read the data register.
C. 1. Read the data register. 2. Check the status register for errors.
D. 1. Read the data register. 2. Write an acknowledgment to the status register.

40 What is the primary benefit of using an I/O Processor (IOP) in a large computer system with many peripherals?

Input/Output processor. Medium
A. It significantly offloads detailed I/O device management from the main CPU, improving overall system throughput.
B. It reduces the manufacturing cost of the main CPU.
C. It replaces the need for main memory (RAM) by using its own local memory.
D. It provides a faster direct data path between any two peripherals.

41 A system uses DMA for data transfer from a hard disk. The disk transfers data at 2 MB/s. The CPU runs at 500 MHz and takes 1000 cycles for the DMA controller initialization and 500 cycles for the interrupt service routine upon completion. The DMA transfer is done in bursts of 4 KB. What percentage of CPU time is spent handling the DMA transfer for a very large file, considering only the setup and completion overhead?

Direct memory access transfer Hard
A. 0.15%
B. 0.075%
C. 5.0%
D. 2.5%

42 In a daisy-chain interrupt system with three devices (D1, D2, D3), the interrupt acknowledge signal takes 20 ns to propagate through each device. The CPU takes 50 ns to generate the acknowledge signal after an interrupt request. All devices raise an interrupt request simultaneously. The interrupt service routine (ISR) for each device takes 1 µs to execute, and device priority is D1 > D2 > D3. What is the total time from the simultaneous interrupt request to the completion of D3's ISR, assuming no further interrupts occur?

Priority interrupt Hard
A. 3.00011 µs
B. 3.0 µs
C. 3.13 µs
D. 3.00013 µs

43 A 16-bit CPU has a 16-bit address bus for memory (byte-addressable) and uses isolated I/O. It needs to interface with 256 8-bit I/O devices, where each device has 4 addressable registers. To minimize the I/O address space used, a designer proposes a two-level decoding scheme. What is the minimum number of address lines required for the I/O address bus?

Input output interface Hard
A. 12 lines
B. 16 lines
C. 8 lines
D. 10 lines

44 Consider a system with a main CPU and an I/O Processor (IOP). The IOP executes a channel program from main memory to transfer 100 blocks of 1KB data each from a disk to a specified memory buffer. The channel program consists of a TEST I/O command, followed by 100 WRITE commands (one for each block), and a HALT I/O command. The CPU initiates the process by issuing a START I/O command. Which of the following statements most accurately describes the interaction and states?

Input/Output processor. Hard
A. The CPU is stalled and enters a wait state from the START I/O until the HALT I/O command is executed by the IOP.
B. The CPU executes START I/O and is free to perform other tasks. The IOP manages the entire transfer independently and will typically generate a single interrupt to the CPU only after the entire channel program (all 100 blocks) is complete.
C. The CPU executes the START I/O command, then continues with its own tasks. It polls a status word in memory to check for completion, which is set by the IOP after executing HALT I/O.
D. The main CPU is interrupted by the IOP exactly 101 times: once for each of the 100 data blocks transferred and once upon completion of the HALT I/O command.

45 A system needs to transfer data from a device with a fixed data rate of 500 KB/s. The CPU's interrupt service routine (ISR) for this device takes 20 µs to execute (including entry and exit overhead). The system uses interrupt-driven I/O, transferring 4 bytes per interrupt. At approximately what percentage of the device's maximum data rate will the CPU become 100% saturated (spend all its time executing the ISR)?

modes of data transfer Hard
A. 100%
B. 50%
C. 80%
D. 40%

46 A UART is configured for a baud rate of 115200 bps using a clock that is 16 times the baud rate (16x oversampling). To correctly sample the incoming bit stream, the UART samples the bit value at the center of each bit time. If the transmitter's and receiver's clocks have a frequency mismatch, what is the maximum tolerable clock drift (as a percentage) between the transmitter and receiver over a standard 10-bit frame (1 start, 8 data, 1 stop) to avoid a framing error?

UART Hard
A. ~2.5%
B. ~0.5%
C. ~5.0%
D. ~1.25%

47 A computer system uses cycle stealing DMA. The CPU runs at 1 GHz. The system bus operates at 250 MHz, and one bus cycle is required to transfer one word (4 bytes). A DMA device needs to transfer data at a rate of 100 MB/s. What is the percentage of slowdown experienced by the CPU due to DMA activity?

Direct memory access transfer Hard
A. 25%
B. 40%
C. 10%
D. 100%

48 A system uses a vectored interrupt scheme with a hardware priority encoder (like the Intel 8259 PIC). Four devices (A, B, C, D) with priorities A > B > C > D are connected. Device B is currently being serviced. While B's ISR is executing, devices A and C simultaneously request an interrupt. What is the sequence of ISR execution from this point forward, assuming the default behavior where interrupts are disabled upon entering an ISR and re-enabled just before returning?

Priority interrupt Hard
A. B is preempted, A is serviced, then C is serviced immediately after A.
B. B finishes, then the processor is deadlocked because C's request is masked by B's service.
C. B is preempted, A is serviced, A finishes, B resumes and finishes, then C is serviced.
D. B finishes, then A is serviced, then C is serviced.

49 An NVMe SSD is connected to a CPU via a PCIe 4.0 x4 interface. The theoretical maximum throughput of a single PCIe 4.0 lane is ~2 GB/s. The SSD's controller has an internal processing latency of 10 µs for any I/O request, and the system's memory bus can sustain 50 GB/s. For a single 4 KB read request, which factor is the most significant contributor to the total service time?

Peripheral Devices Hard
A. The system memory bus bandwidth.
B. The CPU time to issue the I/O command.
C. The internal processing latency of the SSD controller.
D. The data transfer time over the PCIe bus.

50 A system implements scatter-gather DMA. To transfer a file that is fragmented into three non-contiguous memory chunks (Chunk A: 2KB at addr 0x1000, Chunk B: 4KB at addr 0x8000, Chunk C: 1KB at addr 0x3000) to a peripheral, the DMA controller (DMAC) is programmed with a pointer to a descriptor list in memory. Assuming each descriptor is 8 bytes long (4 for address, 4 for length), how does the DMAC handle this transfer?

Direct memory access transfer Hard
A. The CPU must intervene after each chunk is transferred to provide the DMAC with the next address and length.
B. The DMAC reads the first descriptor (A), transfers 2KB from 0x1000, reads the second (B), transfers 4KB from 0x8000, and reads the third (C), transferring 1KB from 0x3000, all without CPU intervention.
C. The DMAC transfers the 8-byte descriptor for Chunk A, then the 2KB data of Chunk A, then the descriptor for B, then the data for B, and so on, to the peripheral.
D. The DMAC first copies all three chunks into a single contiguous buffer in memory and then performs a single block transfer from that buffer.

51 What is the primary architectural feature that distinguishes an Input/Output Processor (IOP) from a multi-channel DMA controller (DMAC), even if both can handle multiple I/O devices concurrently?

Input/Output processor. Hard
A. An IOP is a specialized processor that fetches and executes its own instruction set (channel commands) from main memory, while a DMAC is configured with a set of registers by the CPU.
B. An IOP has its own dedicated local memory for buffering, while a DMAC writes directly to main memory.
C. An IOP uses cycle stealing whereas a DMAC uses burst mode.
D. An IOP can only handle block-based devices like disks, while a DMAC can handle both block and character-based devices.

52 A system uses memory-mapped I/O. A memory-mapped device interface occupies the address range from 0xFF00 to 0xFF0F. A programmer writes code that attempts to cache this address range. What is the most likely consequence of this action?

Input output interface Hard
A. A protection fault will be generated by the CPU upon attempting to cache a non-RAM address.
B. Improved I/O performance due to faster access to device registers.
C. The system will read stale status data from the cache instead of the device, and writes to control registers may not reach the device, leading to incorrect operation.
D. No effect, as the MMU will prevent I/O address ranges from being cached.

53 In an asynchronous handshaking protocol for data transfer from a source (e.g., CPU) to a destination (e.g., peripheral), the source asserts a Data Valid signal after placing data on the bus. The destination, upon seeing Data Valid, reads the data and then asserts a Data Accepted signal. The source then de-asserts Data Valid and the data lines. Finally, the destination de-asserts Data Accepted. This describes a 'full handshake'. What is the primary purpose of the destination de-asserting Data Accepted as the final step?

modes of data transfer Hard
A. To signal to the source that it is ready for the next data item.
B. To reset the bus to a known idle state, preventing a race condition where the source might see the old Data Accepted signal from the previous transfer and mistakenly believe the new data has been accepted.
C. To prevent the source from placing new data on the bus before the destination has released its Data Accepted signal from the previous cycle.
D. To allow other devices on a shared bus to know that the bus is now free.

54 A logic analyzer captures the following serial bitstream on an RxD line (idle state is high): a low start bit, followed by the data bits 11001010, a parity bit, and a high stop bit. The UART is configured for 8 data bits, even parity. What type of error, if any, has occurred?

UART Hard
A. Parity error.
B. No error occurred.
C. Overrun error.
D. Framing error.

55 In a system with multiple interrupt sources, which scenario absolutely requires the use of a non-maskable interrupt (NMI) instead of a regular, maskable interrupt request (IRQ)?

Priority interrupt Hard
A. A high-speed network card signaling the arrival of a new data packet.
B. A user pressing a key on the keyboard.
C. A watchdog timer detecting that the operating system has frozen or crashed.
D. A real-time data acquisition device sampling a signal at a very high frequency.

56 In a system with a snooping cache coherence protocol (e.g., MESI), a DMA controller initiates a write transfer from an I/O device directly to a region of main memory. A copy of this memory region also exists in the CPU's data cache and is in the 'Modified' (M) state. What is the most critical action the hardware must take to ensure data coherency?

Direct memory access transfer Hard
A. The DMA transfer must be stalled until the CPU explicitly flushes the corresponding cache lines to memory.
B. The cache controller must snoop the bus, detect the DMA write, and provide the data from its 'Modified' cache line directly to the I/O device, bypassing memory.
C. The cache controller must snoop the bus, detect the DMA write to its modified line's address, invalidate its own cache line, and discard its changes.
D. The cache controller must snoop the bus, detect the DMA write to its modified line's address, and write back (flush) its modified data to main memory before the DMA write is allowed to complete.

57 An I/O Processor (IOP) and a CPU communicate using a mailbox system in a shared region of main memory. To initiate an I/O operation, the CPU writes a command and a pointer to a channel program into the mailbox and sets a 'command ready' flag. The IOP, which is polling this flag, finds it set. What is the critical next step the IOP must take to ensure synchronized, lock-free communication?

Input/Output processor. Hard
A. The IOP should set a separate 'IOP busy' flag, leaving the 'command ready' flag set until the entire I/O operation is complete.
B. The IOP should immediately interrupt the CPU to acknowledge receipt of the command.
C. The IOP should copy the entire channel program into its local memory before clearing the flag.
D. The IOP should clear the 'command ready' flag to signal to the CPU that the mailbox is now being processed and is free for the next command once the IOP is done.

58 A modern hard disk drive (HDD) contains a large internal DRAM cache (e.g., 256 MB). How does this cache primarily improve the performance of handling a burst of small, random write requests from the operating system?

Peripheral Devices Hard
A. It allows the disk to reorder the writes based on block address to minimize seek time and rotational latency before committing them to the magnetic platter.
B. It converts the random writes into a single large sequential write on the magnetic platter.
C. It acts as a simple FIFO buffer, storing writes until the read/write head is in the correct position.
D. It permanently stores frequently accessed data so the magnetic heads never need to access the platter.

59 In a system with a synchronous bus, a CPU and a memory module are connected. The bus clock is 100 MHz. The memory has an access time of 15 ns. A read operation requires one clock cycle to send the address from the CPU and one clock cycle to receive the data. How many wait states (empty bus cycles) must be inserted between sending the address and the memory being ready to place data on the bus?

Input output interface Hard
A. 2 wait states
B. 1 wait state
C. 0 wait states
D. 3 wait states