- secondary memory devices
- communications equipment
- terminals
CPU much faster than I/O devices
- waiting for I/O operation to finish is inefficient
- not feasible for mouse, keyboard
- I/O module sends an interrupt to CPU to signal completion
- Interrupts normal sequence of execution
- I/O requests can be handled synchronously or asynchronously.
- In a synchronous system, a program makes the appropriate operating system call and, as the CPU is now executing operating system code, the original program's execution is halted i.e. it waits.
- In an asynchronous system, a program makes its request via the operating system call and then its execution resumes. It will most likely not have had its request serviced yet!
- The advantage of having an asynchronous mechanism available is that the programmer is free to organize other CPU activity while the I/O request is handled.
- Software that communicates with controller is called device driver
- Most drivers run in kernel mode
- To put new driver into kernel, system may have to
- be relinked
- be rebooted
- dynamically load new driver
- we must have an event driven I/O system handling all of the pending I/O requests (maybe these are triggered when data arrives, or a peripheral device such as a CD drive indicates it is ready etc.).
- Requests that the operating system has not yet been able to service might mean that the program is currently ``sleeping'' or ``waiting''.
2004-05-25