Module 2 Ar Reviewer
Module 2 Ar Reviewer
There is a small set of basic logic In general, these actions fall into four categories.
components that can be combined in Processor-Memory
various ways. Processor-I/O
If there is a particular computation to be Data Processing
performed, a configuration of logic Control
components.
Program counter (PC) = Address of instruction The printer will generate an interrupt every
Instruction register (IR) = Instruction being executed
time it completes a print operation.
The communication line controller will
Accumulator (AC) = Temporary storage generate an interrupt every time a unit of
CLASSES OF INTERRUPTS data arrives.
The unit could either be a single character
Program Generated by some condition or a block, depending on the nature of
that occurs as a result of an instruction the communications discipline In any
execution, such as arithmetic overflow, case, it is possible for a communications
division by zero, attempt to execute an interrupt to occur while a printer interrupt
illegal machine instruction, or reference is being processed.
outside a user's allowed memory space.
I/O Function
Timer Generated by a timer within the
processor. This allows the operating An I/O module (e.g., a disk controller)
system to perform certain functions on a can exchange data directly with the
regular basis. processor.
Just as the processor can initiate a read
I/O Generated by an I/O controller, to or write with memory, designating the
signal normal completion of an operation, address of a specific location, the
request service from the processor, or to processor can also read data from or
signal a variety of error conditions. write data to an I/O module.
In this latter case, the processor
Hardware Failure Generated by a failure
identifies a specific device that is
such as power failure or memory parity
controlled by a particular I/O module.
error.
The I/O program consists of three
sections:
A sequence of instructions, labeled 4 in
the figure, to prepare for the actual I/O
operation.
The actual I/O command. Without the use
of interrupts, once this command is
issued, the program must wait for the I/O
device to perform the requested function
(or periodically poll the device).
A sequence of instructions, labeled 5 in
the figure, to complete the operation.
This may include setting a flag indicating
the success or failure of the operation.
MULTIPLE INTERRUPTS
For example, a program may be receiving
data from a communications line and
printing results.