Input/Output Flashcards

1
Q

What is the difference between block I/O and memory-mapped I/O?

A

Block I/O is when the I/O device has its own “blocks” of memory, that can be read/written to by the controller. One example of this is in external hard drives.

Memory-mapped I/O is when the I/O device shares memory space with the processor, so that data can be accessed much faster, as the system does not need to make a context switch to communicate with the I/O device.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is character I/O?

A

Character I/O is when an I/O device transfers data one byte at a time. They will be processed in order by the operating system. One example of this is in keyboards and related peripherals such as mice.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is network I/O?

A

Network I/O refers to the input and output of data over a network. One example of this is a NIC, or Network Identifier Card.

An NIC, for example, has system calls for creating and connecting sockets, sending and recieving packets, and determining the status of one or more sockets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the difference between polling and interrupt control?

A

Polling is where the CPU periodically checks the controller’s status register to see whether the controller is busy or not. When the controller is ready, the CPU writes to the data-out register and signals that it has done so via the control register.
e.g. A bus driver going to each stop and asking if this is your stop

Interrupt control is when the CPU regularly senses an interrupt-request line. When the CPU gets an interrupt signal through this line, it stops the current process and initiates a response.
e.g. A bus driver stopping at the next stop once you press the STOP button

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a Direct Memory Access controller?

A

A DMA controller is a special-purpose processor used to offload the work of a large data transfer.

When a large data transfer starts, the CPU first writes a command block into memory, containing the source and destination of the transfer.

The DMA then can perform multiple transfers via a single command.

The CPU then goes to spend resources on other more important tasks. An interrupt is sent from the DMA to end the transfer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a Direct Memory Access controller?

A

A DMA controller is a special-purpose processor used to offload the work of a large data transfer.

When a large data transfer starts, the CPU first writes a command block into memory, containing the source and destination of the transfer.

The DMA then can perform multiple transfers via a single command.

The CPU then goes to spend resources on other more important tasks. An interrupt is sent from the DMA to end the transfer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a device driver?

A

If a controller is a processor built into the device itself, a driver is a software built into the computer itself, defining an interface of communication between the OS and the I/O device for a specific class of device (e.g. keyboards, mice, etc.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a system call in the context of a device driver?

A

A system call is a request to the kernel to carry out a specific task.

Keyboards use calls such as GET or PUT to retrieve information from its data stream, while storage block devices use calls like READ, WRITE and memory mapping.

Could be called akin to how a program may use functions like WriteLine() to communicate with the terminal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly