OS9 Flashcards

(32 cards)

1
Q

State the properties that may differ between IO devices.

A

Data rate, Control complexity, Transfer unit (blocks vs characters) and direction, Data representation, Error handling.

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

State the commonalities between IO devices.

A

A device has at least one port (connection point). Devices interconnected via a bus. Each device has an integrated or separate controller.

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

What registers does an IO device have?

A

Data-in register, Data-out register, Status register, Control register.

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

Describe the two ways IO devices are accessed.

A

Direct IO instructions (privileged). Memory-managed IO where device registers are mapped into processor address space.

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

Describe an IO device running in polled mode operation.

A

Host repeatedly reads the device-busy register until it is clear. Host sets read/write bit in command register, puts data into data register. Host sets command-ready bit in status register. Device sees command-ready and sets device-busy. After operation, device clears command-ready and device-busy.

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

Describe the operation of an IO device based on interrupts.

A

Device triggers interrupt-request line, which is checked by the CPU after each instruction. Interrupt handler reads the data from the device register.

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

Compare the advantages of interrupts and polling-based IO devices.

A

Interrupts are more efficient than polling when device is relatively infrequently accessed.

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

In what scenario is direct memory access effective?

A

When the IO devices are able to transmit information close to memory speeds.

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

Describe the operation of a direct memory access IO device.

A

The device controller transfers blocks of data directly to main memory without CPU intervention. Generating one interrupt per block rather than one byte.

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

State the hardware requirement for direct memory access IO devices.

A

Requires the ability for devices to become a bus master - taking the bus away from the CPU.

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

What is scatter/gather DMA (direct memory access)?

A

Chaining multiple DMA requests as one request.

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

State the properties of block devices.

A

Commands include read/write/seek. Can have raw access, via file system or memory mapped.

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

Give examples of block devices.

A

Disk drives, CDs.

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

State the properties of character devices.

A

Commands include get, put.

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

Give examples of character devices.

A

Keyboards, Mice, Serial.

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

Describe blocking IO.

A

Process suspended until IO completed.

17
Q

Describe non-blocking IO.

A

IO call returns a handle to the incomplete data immediately. The process is responsible for checking what has been returned so far.

18
Q

Describe how synchronous IO works.

A

After IO starts, control returns to user program only upon IO completion. CPU idles until next interrupt. At most one IO request is outstanding at a time.

19
Q

Describe how asynchronous IO works.

A

After IO starts, control returns to user process without waiting for completion. System call allows process to request wait for IO completion.

20
Q

What data does the OS have to store to allow asynchronous IO?

A

The device-status table contains an entry for each IO device indicating type, address, and state.

21
Q

Describe the lifecycle of an IO request.

A

Determine device holding the file. Translate file name to device representation. Physically read data into buffer. Make data available to requesting process. Return control to process.

22
Q

State the kernel data structures for IO components.

A

Open file tables, Network connections, Character device states.

23
Q

What is vector IO?

A

It allows one system call to perform multiple IO operations.

24
Q

What is vector IO also called?

A

The scatter/gather method.

25
State the advantages of using vectored IO.
Faster: decreases context switches and system calls needed. Some versions provide atomicity.
26
Define buffering.
Buffering are strategies that can be used to deal with mismatch between devices, such as speed/transfer size.
27
State and explain the 3 types of buffering.
Single buffering: OS assigns a system buffer to user request. Double buffering: process consumes one buffer while system fills the next. Circular buffering: with a circular buffer, what could I say.
28
State what buffering can and cannot solve.
Can smooth out peaks in data rate, but can't help if the average rates are different.
29
Define cache in IO.
Fast memory holding copy of data for both reads and writes.
30
Define scheduling in IO.
Order IO requests in per-device queues.
31
Define spooling.
Queuing output for a device, so the process can do something else.
32
Describe how error handling is done in IO devices.
Error is returned as an error number/code, which is logged to system error log.