MGMT 1040 Lecture 5: MGMT 1040 Tutorial 5 Notes
MGMT 1040 Tutorial 5 Notes – Program Segments
Introduction
• All of these suggest that it is necessary to include some means to allow the computer to
take special actions when required.
• Interrupt capabilities are also used to make it possible to time share the CPU between
several different programs or program segments at once.
• Modern computers provide interrupt capability by providing one or more special control
lines to the central processor known as interrupt lines.
• For example, the standard I/O for a modern PC may contain as many as thirty-two
interrupt lines, labeled IRQ0 through IRQ31.
• IRQ stands for Interrupt ReQuest.
• The messages sent to the computer on these lines are known as interrupts.
• The presence of a message on an interrupt line will cause the computer to suspend the
program being executed and jump to a special interrupt processing program.
• Consider, as an example, the situation
• EXAMPLE
• In a large, multiuser system there may be hundreds of keyboards being used with the
computer at any given time.
• Since any of these keyboards could generate input to the computer at any time, it is
necessary that the computer be aware of any key that is struck from any keyboard in
use.
• This process must take place quickly, before another key is struck on the same
keyboard, to prevent data loss from occurring when the second input is generated.
• Theoretically, though impractically, it would be possible for the computer to perform
this task by checking each keyboard for input in rotation, at frequent intervals.
• This technique is known as polling.
• The interval would have to be shorter than the time during which a fast typist could hit
another key.
find more resources at oneclass.com
find more resources at oneclass.com