2. INTERRUPT meaning to break the sequence of
operations.
While the processor is executing a program an
‘interrupt’ breaks the sequence of execution of that
program and start execution of another program.
3. Interrupt is a signal from a device attached to a
computer or from a program within the computer that
requires the operating system to figure out what to do
next.
4. Devices and programs occasionally need CPU
service but we can’ t predict when.
So for the interaction with CPU each device or a
program is allowed to give interrupt so that it can
be used as a signal to the processor.
Need a way for CPU to find out devices/programs
need attention
7. If the signal for the processor is from external
device or hardware it is called hardware interrupts.
Example:
Keystroke(pressing of key on keyboard)
and mouse movements cause hardware interrupts.
8. • Mask-able Interrupt:
The hardware interrupts which can be delayed when
a much highest priority interrupt has occurred to
the processor.
• Non Mask-able Interrupt:
The hardware which cannot be delayed and should
process by the processor immediately.
9. A software interrupt is a type of interrupt that is
caused either by a special instruction in the
instruction set or by an exceptional condition in the
processor itself.
Example:
It is generated when divide a number by
zero, accessing unavailable memory.
10. • Normal Interrupts:
The interrupts which are caused by the software
instructions are called software instructions.
• Exception:
Unplanned interrupts while executing a program is
called Exception. For example: while executing a
program if we got a value which should be divided by
zero is called a exception.
11. An instruction cycle includes
Fetch
Decode
Execute
It is the basic operation cycle of a computer. It is
the process by which a computer retrieves a
program instruction from its memory,
determines what actions the instruction
requires, and carries out those actions. This
cycle is repeated continuously by the central
processing unit (CPU).
14. Program
Generated by some condition that occurs as a result of an instruction execution, such
as arithmetic overflow, division by zero, attempt to execute an illegal machine
instruction, and reference outside a user's allowed memory space
Timer
Generated by a timer within the processor. This allows the operating system to
perform certain functions on a regular basis.
I/O
Generated by an I/O controller, to signal normal completion of an operation or to
signal a variety of error conditions.
Hardware Failure
Generated by a failure, such as power failure or memory parity error.
15. If there is an interrupt in instruction cycle then
• It will trigger the interrupt handler.
• The handler will stop the present instruction which is processing and
save its state in a PC register and load the state of the interrupt
program .
• OS serves the interrupt from Interrupt Vector Table through Interrupt
Service Routine(Interrupt handler).
• After processing the interrupt, interrupt handler will load the
instruction of previous saved process from the register, process will
start its processing where it’s left. This saving the old instruction
processing configuration and loading the new interrupt configuration
is also called as context switching.
16.
17. An interrupt event that can occur while the processor
is handling a previous interrupt.
Disable Interrupt:
Processor Will ignore further interrupts while handling one interrupt
(Sequential Interrupt)
Define Priorities:
Low priority interrupt interrupted by higher priority interrupts.