Вы находитесь на странице: 1из 4

Lahore Garrison University

Name: Kashif Ali


Roll No f16-bsse-071
Section BSSE(C)
Semster 5th
Assignment Operting System
Dated:
01-10-2018

Submmitted TO:
MR Awais

Department of Software Engineering


Windows Operating System
Interrupt Service Routine(ISR)
A driver of a physical device that receives interrupts registers one or more interrupt service
routines (ISR) to service the interrupts. The system calls the ISR each time it receives that
interrupt.

Types of Interrupt Service Routine:

Software Interrupts:

Software interrupt can also divided in to two types. They are

 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.

Hardware Interrupts:

If the signal for the processor is from external device or hardware is called hardware
interrupts. Example: from keyboard we will press the key to do some action this
pressing of key in keyboard will generate a signal which is given to the processor to
do action, such interrupts are called hardware interrupts. Hardware interrupts can be
classified into two types they are
 Maskable Interrupt: The hardware interrupts which can be delayed when a
much highest priority interrupt has occurred to the processor.
 Non Maskable Interrupt: The hardware which cannot be delayed and should
process by the processor immediately.
Classification of Interrupts According to Periodicity of Occurrence:

1. Periodic Interrupt: If the interrupts occurred at fixed interval in timeline then that
interrupts are called periodic interrupts
2. Aperiodic Interrupt: If the occurrence of interrupt cannot be predicted then that
interrupt is called aperiodic interrupt.

Classification of Interrupts According to the Temporal Relationship with System Clock:


1. Synchronous Interrupt: The source of interrupt is in phase to the system clock is
called synchronous interrupt. In other words interrupts which are dependent on the
system clock. Example: timer service that uses the system clock.
2. Asynchronous Interrupts: If the interrupts are independent or not in phase to the
system clock is called asynchronous interrupt

Types of Trap Service Routine:

The design of SPARC as a RISC processor means that a lot of thefunctionality that is
normally controlled by complex instructions has to bedone by supervisor (kernel) software.
Examples of these could be memoryexception handling or interrupt handling. When an event
occurs that requiresspecial handling in this way, the processor that detected that event will
raise a trap so that the supervisor software is notified that it has tohandle the event. We'll look
at this mechanism in more detail in thissection.

 Precise Traps
 Deferred Traps
 Disrupt/Interrupt Traps
 Software Traps

Linux Operating System


Types of Interrupt Service Routine:
I/O interrupts:
Some I/O devices require attention; the corresponding interrupt handler must query the
device to determine the proper course of action. We cover this type of interrupt in the later
section
Timer interrupts:

Sme timer, either a local APIC timer or an external timer, has issued an interrupt; this
kind of interrupt tells the kernel that a fixed-time interval has elapsed. These
interrupts are handled mostly as I/O interrupts; we discuss the peculiar characteristics
of timer interrupts in

Inter Processor interrupts:


A CPU issued an interrupt to another CPU of a multiprocessor system. We cover such
interrupts in the later section
Types of Trap Service Routine:
Reported immediately following the execution of the trapping instruction; after the kernel
returns control to the program, it is allowed to continue its execution with no loss of
continuity. The saved value of eip is the address of the instruction that should be executed
after the one that caused the trap. A trap is triggered only when there is no need to re-execute
the instruction that terminated. The main use of traps is for debugging purposes. The role of
the interrupt signal in this case is to notify the debugger that a specific instruction has been
executed (for instance, a breakpoint has been reached within a program). Once the user has
examined the data provided by the debugger, she may ask that execution of the debugged
program resume, starting from the next instruction

Comparison Table

Windows Linux
Types of Interrupt Service Routine
1. Hardware interrupts  I/O interrupts
 Maskable Interrupt:  Timer interrupts
 Non Maskable Interrupt:  Inter processor interrupts
2. Software interrupts
 Normal Interrupts
 Exception:
3. Periodic Interrupt
4. Aperiodic Interrupt
5. Synchronous Interrupt
6. Asynchronous Interrupts
Types of Trap Service Routine
SNMP_GENERICTRAP_COLDSTART X86_Trap_DE=0
SNMP_GENERICTRAP_WARMSTART X86_Trap_DB
SNMP_GENERICTRAP_LINKDOWN X86_Trap_NMI
SNMP_GENERICTRAP_LINKUP X86_Trap_BP
SNMP_GENERICTRAP_AUTHFAILURE X86_Trap_OF
SNMP_GENERICTRAP_EGPNEIGHLOSS X86_Trap_BR

Вам также может понравиться