Professional Documents
Culture Documents
3.2 Computer Function: Reads (Fetches) Instructions
3.2 Computer Function: Reads (Fetches) Instructions
3 System Buses
Instruction Cycle
Two steps: Fetch & Execute
3
Computer Organization and Architecture William Stalling Chp.3 System Buses
4
Computer Organization and Architecture William Stalling Chp.3 System Buses
Interrupts
• Virtually all computers provide a mechanism by which
other modules (I/O, memory) may interrupt the normal
processing of the processor.
• Interrupts are provided primarily as a way to improve
processing efficiency.
• most external devices are much slower than the
processor. Suppose that the processor is transferring data
to a printer using the instruction cycle scheme. After each
write operation, the processor must pause and remain idle
until the printer catches up. The length of this pause may
be on the order of many hundreds or even thousands of
instruction cycles that do not involve memory. Clearly, this
is a very wasteful use of the processor.
• Table 3.1 lists the most common classes of interrupts.
9
Computer Organization and Architecture William Stalling Chp.3 System Buses
10
Computer Organization and Architecture William Stalling Chp.3 System Buses
11
Computer Organization and Architecture William Stalling Chp.3 System Buses
12
Computer Organization and Architecture William Stalling Chp.3 System Buses
• Figure 3.11 shows the timing for this situation with and without
the use of interrupts.
13
Computer Organization and Architecture William Stalling Chp.3 System Buses
14
Computer Organization and Architecture William Stalling Chp.3 System Buses
15
Computer Organization and Architecture William Stalling Chp.3 System Buses
16
Computer Organization and Architecture William Stalling Chp.3 System Buses
17
Computer Organization and Architecture William Stalling Chp.3 System Buses
Multiple Interrupts
Disable interrupts
• Processor will ignore further interrupts
whilst processing one interrupt
• Interrupts remain pending and are checked
after first interrupt has been processed
• Interrupts handled in sequence as they
occur
Define priorities
• Low priority interrupts can be interrupted
by higher priority interrupts
• When higher priority interrupt has been
processed, processor returns to previous
interrupt
18
Computer Organization and Architecture William Stalling Chp.3 System Buses
Define priorities
for interrupts and to allow an interrupt of higher
priority to cause a lower-priority interrupt handler
to be itself interrupted (Figure 3.13b).
19
Computer Organization and Architecture William Stalling Chp.3 System Buses
20