I/O And IPC Flashcards
What are the three categories of I/O devices?
Human interface devices, such as screens or keyboards
Storage devices such as disks or tapes
Transmission devices such as network cards or modems
What are the four controller registers?
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
What registers control I/O devices?
Control registers
What is polling?
The processor periodically checks the device to see if it is ready
What are interrupts?
The device signals the processor when it is ready
What do system calls for character I/O do?
They enable an application to get / put a single character from / to a device
What do system calls for block I/O do?
They enable an application to read / write many characters, and to seek on a device.
What do system calls for memory mapped I/O do?
Enable an application to map a device into memory
What do system calls for network I/O do?
Enable an application to write / read many characters to or from a network device socket
What does the process control block contain?
The process number
Process state
Process address space
Process I/O
What is context switching?
Saving the machine state in one process control block and loading the machine state from another
What does a process address space contain?
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
What are the Unix system calls used to spawn a process?
Fork: Copies a process address space
Exec: Overwrites a process address space
Wait: Waits for another process to exit
Exit: Terminates a process
Two types of IPC
Shared memory
Message passing
How does IPC by message passing work?
Two programs sending and receiving info to/from an agreed mailbox