Input/Output Management Flashcards
What is the purpose of I/O devices?
I/O devices enable computers to receive or output information to humans or devices.
Give three examples of I/O devices.
- Human interface devices (e.g., monitors)
- Storage devices (e.g., disks)
- Transmission devices (e.g., network cards)
How are I/O devices operated?
I/O devices are operated using controllers (embedded processors).
What is the role of controller registers?
The CPU communicates with the controller by reading and writing to the controller’s registers.
What are the two types of I/O access methods?
- Port-based I/O
- Memory-mapped I/O
Which I/O access method is more common today?
Memory-mapped I/O is today much more common than port-based I/O.
What are the two approaches to control in I/O management?
- Polling
- Interrupts
Describe polling in I/O management.
The CPU repeatedly checks the controller’s status register to see whether the controller is busy. When the controller is ready and the CPU wants to give new instructions, the CPU writes to the data-out register and signals that is has done so through the control register.
What happens when the CPU receives an interrupt signal?
The CPU stops the current process and initiates a response.
Compare polling and interrupts.
With interrupts, the CPU can monitor several devices at the same time; with polling, the CPU checks each device individually in a round robin fashion.
When might polling be more efficient?
- The controller and the device are fast
- The I/O rate is high
- Some I/O data can be ignored
- The CPU has nothing better to do
What is Direct Memory Access (DMA)?
DMA allows a CPU to offload large data transfers to a DMA controller, which can perform multiple transfers via a single command.
What is a system call?
A system call is a request of a kernel service.
What are the types of system calls for I/O devices?
- Character I/O
- Block I/O
- Network I/O
What are examples of character I/O devices?
- Keyboards
- Computer mice
- Microphones
- Speakers
What is the primary characteristic of block I/O devices?
Block devices are used to transfer blocks of data and are typically non-volatile mass storage devices. They are high volume devices and include read and write operations
What is a memory-mapped interface in block I/O?
It provides access to disk storage via a location in main memory, mapping a file on the device into memory.
What operations are included in network I/O?
- Creating and connecting sockets
- Sending and receiving packets
- Checking transfer success
True or False: Network I/O devices are less prone to issues than other I/O devices.
False.
The main difference between network I/O devices and other I/O devices is that with network I/O devices things routinely go wrong (missing packets, etc.).
What is the difference between port-based and memory mapped I/O
port-based separates memory and I/O operations and address space while memory mapped does not.
Where does the CPU get an interrupt signal from
an interrupt request line
How does the DMA let the CPU know when the transfer is complete
the CPU receives an interrupt from the DMA controller
What is user mode used for
application programs; plain instructions
What is kernel mode used for
system functions; privileged instructions