Operating System Fundamentals 66
Managing Interrupts A typical modern computer system has two interrupt controllers that function as one unit. Each controller has eight lines. (This is because in the first personal computers developed
in the late sand early s, the system bus was only eight bits wide) Since every function of the computer needs the system clock in order to manage its timing, the highest priority is given to the system clock (which is given IRQ 0). The keyboard
gets the next highest priority, since it is needed in order to manually override any other processes being carried by the computer. Thus, the keyboard is given IRQ 1. Although we say that the higher the IRQ number is, the lower
priority the device is given, devices using IRQ numbers 8-15 actually get higher priority than devices using IRQ numbers 3-
7. This is because of the use of two controllers acting as one unit. All interrupt requests coming from the second controller are actually sent to IRQ number 2 on the first controller, which then forwards them onto the CPU. Figure 5.2 (below) demonstrates the structure of the interrupt controller system.
CPU
1 2
0 3
4 5
7 6
8 9
11 10 13 12 14 15 System Clock
Keyboard Floppy PS Mouse Interrupt Controller Interrupt Controller Figure 5.2 Structure of the Interrupt Controller System Operating System Fundamentals
67
Preemptable IO Resources Preemptable IO resources are resources that can betaken away from a process that is currently using them. In order to be considered
a preemptable resource, the reallocation of the resource must have no negative effect on the processes involved (other than the overall time needed to complete the process execution. A common example would be memory. When a resource is preempted,
or taken away from a process, the process is often placed into a blocked state, and must wait until the resources is made available again before it can return to a ready state and continue being executed.
Share with your friends: