0% found this document useful (0 votes)
2 views

imp question

The document explains the concept of interrupts in computer systems, detailing the process by which the CPU temporarily halts its current task to address an interrupt request. It categorizes interrupts into three types: external interrupts, internal interrupts, and software interrupts, each with distinct characteristics and triggers. The document also highlights the inefficiencies of asynchronous data transfer and advocates for interrupt-driven data transfer to optimize processor time.

Uploaded by

shiwanibwn1999
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

imp question

The document explains the concept of interrupts in computer systems, detailing the process by which the CPU temporarily halts its current task to address an interrupt request. It categorizes interrupts into three types: external interrupts, internal interrupts, and software interrupts, each with distinct characteristics and triggers. The document also highlights the inefficiencies of asynchronous data transfer and advocates for interrupt-driven data transfer to optimize processor time.

Uploaded by

shiwanibwn1999
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Request the device to become ready

Device
ready No

Yes
Issue data transfer instruction

FIGURE 12.8

It is clear from figure 12.8 that asynchoronous data transfer uses a delay loop to
resolve timing difference between the CPU and the /O device, causes alot of
processor time to be wasted. To avoid this wastage of time, interrupt driven data
tr¡nsfer scheme is used.

9Interrupts and its types


Interrupt is a mechanism that causes CPU (or microprocessor) to transfer its control
temporarily from current executing program to another service program due to an
external or internal request. Steps of interrupt process are:
1 In a computer, on the occurrence of an interrupt,an interrupt request is issued
to the CPUinthe form of a signal.
2. The CPU completes the instruction it was executing when interrupt signal is
received.

The CPUstores the current status of the executing program in a separate


register called program status word (PSW) or / and program counter
or / and memory stack. The PSW contains the status information that
characterized the state of the CPU.
4 CPUnow begins the execution of Interrupt service subroutine.
5. As soon as the service program is executed, the control is transferred back to
the orginal program.
[ 284]
While transferring back to the main program, it is must that the CPU resumes exactly
to its initial state when the program was interrupted. The CPU determines its initial
state from :

Ta) The content of the Program Counter (PC) or/and


(b) The content of all processor registers or/and
The content of PSW.
(c)
There are three types of Interrupts:
1. External Interrupts
2. Internal Interrupts
3 Software Interrupts
1. External Interrupts :( Haboleea)
External Interrupts arise form Input/output (/O) devices, from a timing device,
from a circuit monitoring the power supply or from any other external source.
For example, /O devices connected to PU request for some services like
transter of data. The timing deviçe may interrupt the CPU to indicate the
Alapsed time of an event. A power supply monitoring circuit may interrupt the
CPUto indicate a power failure.
2. Internal Interrupts :
Internal interrupts also known as traps, come from illegal or errouneous use
of an instruction or data. For example, divide by zero, stack overflow, register
overflow and protection overflow.
The difference between External and Internal interrupts are shown in following
table.

Internal Interrupts External Interrupts


1. initiated by some exceptional1. initiated by the external
condition caused by the program conditions which are indepdent
itself of the progräm being executed
at the time.
h
2. Synchronous in nature. 2. Asynchronous is nature.
3. If program is run (or executed)3. independent of the program
again without changes, the internal being executed.
interrupts will occur exactly in the
same place each time.

3. Software Interrupts :
External and internal interrupts are initiated from signals that occur in the
hardware of the CPU. A software interrupt, onthe other hand, is beinginitiated
by the execution of an lnstruction. Software interrupt is a special call instruction
that behaves like aninterrupt rather than a Subroutine call. It can be used by
the programmer to inittíate an interrupt procedure at any desired point in the
program. For example, the error routines, executed by program. There is a
provisiòn in all programming languages to write error routines.
[285 ]
RST to RSTA

You might also like