An I/O controller exposes four consecutive registers through memory-mapped I/O. Each register occupies 32 bits, and each address identifies one byte of eight bits. The first register starts at decimal address 12288.
The register stride, the spacing between consecutive register starting addresses, is four bytes. The configuration, status, input-data, and output-data registers have register indices 0, 1, 2, and 3, respectively. There are no gaps or overlapping registers.
Complete the table with each register's starting address and last occupied byte address. Enter exact decimal integers.
Unlock full course notes by signing up
Measure polling overhead
A controller uses polling: software checks its status 2,000 times during a 1.00 s interval. Each check consumes 1.50 μs of CPU time. Exclude all data-copying and other program work. What percentage of the interval is spent performing these checks? Answer as a percentage, to one decimal place.
Compare CPU costs per event and per block
A data-acquisition device delivers exactly 12,000,000 bytes during a 1.00 s observation interval. Compare these two designs:
With interrupt-driven I/O, the controller notifies the CPU after every 3,000 bytes. Each event consumes 5.00 μs of CPU time, including all handling and copying.
With DMA, each block contains 60,000 bytes. Setup and completion together consume 25.0 μs of CPU time per block.
Locate the remaining bottleneck
A designer seeks a bottleneck, a resource that limits a sustained transfer rate. A peripheral requests 20,000,000 bytes/s. Its existing design interrupts once per 1,000 bytes, consuming 60.0 μs of one CPU's time per event, including copying. A proposed DMA design uses 50,000-byte blocks and consumes 100 μs of CPU time per block for setup and completion combined.
The shared interconnect can carry at most 18,000,000 payload bytes/s under either design. Ignore other CPU work. For CPU-cost calculations, evaluate the requested 20,000,000 bytes/s workload even if the interconnect prevents that rate. Which statements are correct? Select all that apply.
Determine when an I/O buffer fills
An I/O controller has a buffer with a usable capacity of 9600 bytes. At time t=0t=0t=0, it already contains 2400 bytes. New input arrives continuously at 64000 bytes/s.
A software reader removes no data during the first 60.0 ms. It then resumes and removes data continuously at 48000 bytes/s while input continues unchanged. No other process adds or removes data. For timing calculations, model both byte flows as continuous at these constant rates.
Find the buffered data immediately before reading resumes, in bytes to the nearest byte; the net rate of buffer growth after reading resumes, in bytes/s to the nearest whole number; and the time measured from t=0t=0t=0 when the buffer first reaches capacity, in ms to one decimal place.