Chapter 9 Flashcards

1
Q

Sequence of interrupt handling on the hardware level

A
  1. An I/O device finishes an operation and sends an interrupt request to the interrupt controller
  2. The interrupt controller receives this request and signals an interrupt request to the CPU.
  3. CPU acknowledges this request and confirms the start of interrupt handling
  4. The interrupt controller informs the CPU about the interrupt number which the CPU uses to identify the specific interrupt handler to execute.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

DMA

A

Is used to handle data transfers between mem and other devices independently of the CPU.

  1. CPU initially programs the DMA controller with the details of the transfer such as the memory address, the amount of data… once the setup is done, the DMA controller takes over the transfer process.
  2. The DMA controller sends a request to the disc controller to start transferring data and this request is made over the bus system
  3. The controller transfers the requested data directly to the main memory and this is done without the CPU involvement
  4. Once the data transfer is complete, the disc controller sends an ACK back to the DMA controller signaling that the transfer was successful
  5. DMA controller sends an interrupt request to the CPU signaling that the transfer is complete and then the CPU can process the data and continue with the next task
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Device classes

A
  1. Character oriented devices: handle data one character at a time such as keyboards, sequential process of data
  2. Block oriented devices: handle data in large blocks such as secondary storage, supports random access
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Address space models

A
  1. Separate I/O @ space: 2 distinct @ spaces. One for mem and the other for I/O ports
  2. Shared @ space: combines I/O and mem @ spaces into one. Devices are accessed as if they are mem locations
  3. Hybrid architecture: have multiple types of @ spaces.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Polling (programmed I/O)

A

CPU continuously checks the status of a device to see if its ready for data transfer, CPU keeps waiting

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

Interrupts

A

Device signals to the CPU when it’s ready to transfer data, they introduce asynchrony and the simplest way to avoid race conditions is to disable interrupts

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

I/O calls

A

In unique systems input output operations would block the process until the operation could be completed. This means the process would be idol and enable to perform any other tasks.

Asynchronous I/O calls: these allow process initiate a I/O operation and continue executive other tasks without waiting for the operation to complete.

Solution 1: non blocking I/O calls: the process repeatedly checks if data is available by calling read( ) in a loop. If no data is found, read( ) returns immediately without blocking.

Solution 2: simultaneous blocking: use select system calls, they allow the process to block until one of the monitored file descriptors become ready for the op. This is better than polling.

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

Single I/O buffering

A

Read: used to transfer data from an I/O device to a process of mem buffer. Read specifies the file to read from and the buffer to store the data in. Once the data is in the buffer, the process accesses it. 2 types of reading:
- synchronous which is blocking, processes blocks until the reading op is finished
- asynchronous which is non-blocking: process starts reading and continue executing other tasks without waiting for read data

Since data is in the buffer, the process can be swapped out while waiting for I/O ops to complete.

Write: transfer data from a process or buffer to I/O device. Also has same 2 types as reading

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

Double I/O buffering

A

Read: while data is being transferred from I/O to buffer, the content of the second buffer can be copied to the process @ space, its like one buffer is one step ahead than the other.

Write: while data from one buffer is being transferred to I/O device, the other buffer can already be filled with new data from the process

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

Circular I/O buffering

A

Read: allows data to be buffered even if the reading process is slow and doesn’t make read calls frequently enough. The buffer can store data until the process is ready for it.

Write: process can make multiple write calls without being blocked because data is stored in the buffer.

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

Buffers

A

Buffer separate the I/O operations of processes from the actual device drivers

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