I/O And IPC Flashcards

1
Q

What are the three categories of I/O devices?

A

Human interface devices, such as screens or keyboards

Storage devices such as disks or tapes

Transmission devices such as network cards or modems

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

What are the four controller registers?

A

Data in register - Data coming from device
Data out register- Data going to device
Status register- Bits indicating status of device
Control register- Bits giving commands to device

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

What registers control I/O devices?

A

Control registers

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

What is polling?

A

The processor periodically checks the device to see if it is ready

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

What are interrupts?

A

The device signals the processor when it is ready

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

What do system calls for character I/O do?

A

They enable an application to get / put a single character from / to a device

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

What do system calls for block I/O do?

A

They enable an application to read / write many characters, and to seek on a device.

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

What do system calls for memory mapped I/O do?

A

Enable an application to map a device into memory

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

What do system calls for network I/O do?

A

Enable an application to write / read many characters to or from a network device socket

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

What does the process control block contain?

A

The process number
Process state
Process address space
Process I/O

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

What is context switching?

A

Saving the machine state in one process control block and loading the machine state from another

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

What does a process address space contain?

A

A stack section for temporary data
A heap section for dynamically allocated data
A data section for global data
A text section for program code

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

What are the Unix system calls used to spawn a process?

A

Fork: Copies a process address space
Exec: Overwrites a process address space
Wait: Waits for another process to exit
Exit: Terminates a process

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

Two types of IPC

A

Shared memory

Message passing

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

How does IPC by message passing work?

A

Two programs sending and receiving info to/from an agreed mailbox

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

Pros of shared memory

A

Faster

17
Q

Pros of message passing

A

Good for small amounts of data

Easier to implement in a distributed system