SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Group Members:
Urwa Khalid(BT16047) Shanza Khalid(BT16046)
Presented To:
Ma’am Raheela Zaib
 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.
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.
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
Generally Interrupts are of Two types.
1) Hardware Interrupts
2) Software Interrupts
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.
• 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.
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.
• 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.
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).
Without Interrupts
 Instruction fetch
 Instruction execute
Start Fetch next
Instruction
Execute
Instruction
Halt
With Interrupt
Instruction Fetch
Instruction Execute
Check the Interrupt
Fetch
Instructio
n
Execute
Instructio
n
Check for
Interrupt
Start
Halt
Execute
interruptInterrupt
Disable
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.
 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.
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.
First Priority:
Hardware
Second Priority:
Program/software
Third Priority:
Timer
Fourth Priority:
Input/output devices

Weitere ähnliche Inhalte

Was ist angesagt?

instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle pptsheetal singh
 
Direct Memory Access(DMA)
Direct Memory Access(DMA)Direct Memory Access(DMA)
Direct Memory Access(DMA)Page Maker
 
Register transfer language
Register transfer languageRegister transfer language
Register transfer languageSanjeev Patel
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating SystemTech_MX
 
COMPUTER INSTRUCTIONS & TIMING & CONTROL.
COMPUTER INSTRUCTIONS & TIMING & CONTROL.COMPUTER INSTRUCTIONS & TIMING & CONTROL.
COMPUTER INSTRUCTIONS & TIMING & CONTROL.ATUL KUMAR YADAV
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output OrganizationKamal Acharya
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)Sandesh Jonchhe
 
Pipeline hazard
Pipeline hazardPipeline hazard
Pipeline hazardAJAL A J
 
Accessing I/O Devices
Accessing I/O DevicesAccessing I/O Devices
Accessing I/O DevicesSlideshare
 
Instruction Cycle in Computer Organization.pptx
Instruction Cycle in Computer Organization.pptxInstruction Cycle in Computer Organization.pptx
Instruction Cycle in Computer Organization.pptxYash346903
 
Direct Memory Access & Interrrupts
Direct Memory Access & InterrruptsDirect Memory Access & Interrrupts
Direct Memory Access & InterrruptsSharmilaChidaravalli
 

Was ist angesagt? (20)

Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle ppt
 
Direct Memory Access(DMA)
Direct Memory Access(DMA)Direct Memory Access(DMA)
Direct Memory Access(DMA)
 
ADDRESSING MODES
ADDRESSING MODESADDRESSING MODES
ADDRESSING MODES
 
Register transfer language
Register transfer languageRegister transfer language
Register transfer language
 
Modes of transfer
Modes of transferModes of transfer
Modes of transfer
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating System
 
COMPUTER INSTRUCTIONS & TIMING & CONTROL.
COMPUTER INSTRUCTIONS & TIMING & CONTROL.COMPUTER INSTRUCTIONS & TIMING & CONTROL.
COMPUTER INSTRUCTIONS & TIMING & CONTROL.
 
Interrupts ppt
Interrupts pptInterrupts ppt
Interrupts ppt
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 
design of accumlator
design of accumlatordesign of accumlator
design of accumlator
 
Interrupts
InterruptsInterrupts
Interrupts
 
Pipeline hazard
Pipeline hazardPipeline hazard
Pipeline hazard
 
DMA and DMA controller
DMA and DMA controllerDMA and DMA controller
DMA and DMA controller
 
Parallel processing
Parallel processingParallel processing
Parallel processing
 
Pentium processor
Pentium processorPentium processor
Pentium processor
 
Accessing I/O Devices
Accessing I/O DevicesAccessing I/O Devices
Accessing I/O Devices
 
Instruction Cycle in Computer Organization.pptx
Instruction Cycle in Computer Organization.pptxInstruction Cycle in Computer Organization.pptx
Instruction Cycle in Computer Organization.pptx
 
Direct Memory Access & Interrrupts
Direct Memory Access & InterrruptsDirect Memory Access & Interrrupts
Direct Memory Access & Interrrupts
 

Ähnlich wie Interrupts

interruptpresentaion-151207165807-lva1-app6892.pptx
interruptpresentaion-151207165807-lva1-app6892.pptxinterruptpresentaion-151207165807-lva1-app6892.pptx
interruptpresentaion-151207165807-lva1-app6892.pptxAmulyagt1
 
Functions of the Operating System
Functions of the Operating SystemFunctions of the Operating System
Functions of the Operating Systemandyr91
 
Exception handling in Pipelining in COA
Exception handling in Pipelining in COAException handling in Pipelining in COA
Exception handling in Pipelining in COARishavChandel1
 
Computer architecture presentation
Computer architecture presentationComputer architecture presentation
Computer architecture presentationMuhammad Hamza
 
Lecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfLecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfTaufeeq8
 
Operatingsystems lecture2
Operatingsystems lecture2Operatingsystems lecture2
Operatingsystems lecture2Gaurav Meena
 
03_Top Level View of Computer Function and Interconnection.ppt
03_Top Level View of Computer Function and Interconnection.ppt03_Top Level View of Computer Function and Interconnection.ppt
03_Top Level View of Computer Function and Interconnection.pptChABiDRazZaQ
 
Central Processing Unit (CPU) – Part 2
Central Processing Unit (CPU) – Part 2Central Processing Unit (CPU) – Part 2
Central Processing Unit (CPU) – Part 2Ajeng Savitri
 
Device drivers and interrupt service mechanism
Device drivers and interrupt service mechanismDevice drivers and interrupt service mechanism
Device drivers and interrupt service mechanismVijay Kumar
 
Interrupt in real time system
Interrupt in real time system Interrupt in real time system
Interrupt in real time system ali jawad
 

Ähnlich wie Interrupts (20)

interruptpresentaion-151207165807-lva1-app6892.pptx
interruptpresentaion-151207165807-lva1-app6892.pptxinterruptpresentaion-151207165807-lva1-app6892.pptx
interruptpresentaion-151207165807-lva1-app6892.pptx
 
Interrupts in CPU
Interrupts in CPUInterrupts in CPU
Interrupts in CPU
 
Functions of the Operating System
Functions of the Operating SystemFunctions of the Operating System
Functions of the Operating System
 
Exception handling in Pipelining in COA
Exception handling in Pipelining in COAException handling in Pipelining in COA
Exception handling in Pipelining in COA
 
Interrupts
InterruptsInterrupts
Interrupts
 
Computer architecture presentation
Computer architecture presentationComputer architecture presentation
Computer architecture presentation
 
Interrupts
InterruptsInterrupts
Interrupts
 
Lecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfLecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdf
 
Program control
Program controlProgram control
Program control
 
Operatingsystems lecture2
Operatingsystems lecture2Operatingsystems lecture2
Operatingsystems lecture2
 
Inerrupt
InerruptInerrupt
Inerrupt
 
03_Top Level View of Computer Function and Interconnection.ppt
03_Top Level View of Computer Function and Interconnection.ppt03_Top Level View of Computer Function and Interconnection.ppt
03_Top Level View of Computer Function and Interconnection.ppt
 
Interrupts in 8085
Interrupts in 8085Interrupts in 8085
Interrupts in 8085
 
Central Processing Unit (CPU) – Part 2
Central Processing Unit (CPU) – Part 2Central Processing Unit (CPU) – Part 2
Central Processing Unit (CPU) – Part 2
 
Device drivers and interrupt service mechanism
Device drivers and interrupt service mechanismDevice drivers and interrupt service mechanism
Device drivers and interrupt service mechanism
 
Vino's 8086 interrupts
Vino's 8086 interruptsVino's 8086 interrupts
Vino's 8086 interrupts
 
Interrupt in real time system
Interrupt in real time system Interrupt in real time system
Interrupt in real time system
 
INTERRUPTS
INTERRUPTS INTERRUPTS
INTERRUPTS
 
Interrupts
Interrupts Interrupts
Interrupts
 
Interrupts
InterruptsInterrupts
Interrupts
 

Mehr von Urwa Shanza

Interesting Personalities of the world
Interesting Personalities of the worldInteresting Personalities of the world
Interesting Personalities of the worldUrwa Shanza
 
Social media and its Impacts on society
Social media and its Impacts on societySocial media and its Impacts on society
Social media and its Impacts on societyUrwa Shanza
 
Process presentation
Process presentationProcess presentation
Process presentationUrwa Shanza
 
1 booting process and software based solution
1 booting process and software based solution 1 booting process and software based solution
1 booting process and software based solution Urwa Shanza
 
Hypnosis(A state of Sub-consciousness)
Hypnosis(A state of Sub-consciousness)Hypnosis(A state of Sub-consciousness)
Hypnosis(A state of Sub-consciousness)Urwa Shanza
 

Mehr von Urwa Shanza (6)

Interesting Personalities of the world
Interesting Personalities of the worldInteresting Personalities of the world
Interesting Personalities of the world
 
Social media and its Impacts on society
Social media and its Impacts on societySocial media and its Impacts on society
Social media and its Impacts on society
 
Process presentation
Process presentationProcess presentation
Process presentation
 
1 booting process and software based solution
1 booting process and software based solution 1 booting process and software based solution
1 booting process and software based solution
 
Hypnosis(A state of Sub-consciousness)
Hypnosis(A state of Sub-consciousness)Hypnosis(A state of Sub-consciousness)
Hypnosis(A state of Sub-consciousness)
 
Hypnosis
HypnosisHypnosis
Hypnosis
 

Kürzlich hochgeladen

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Kürzlich hochgeladen (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

Interrupts

  • 1. Group Members: Urwa Khalid(BT16047) Shanza Khalid(BT16046) Presented To: Ma’am Raheela Zaib
  • 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
  • 5. Generally Interrupts are of Two types. 1) Hardware Interrupts 2) Software Interrupts
  • 6.
  • 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).
  • 12. Without Interrupts  Instruction fetch  Instruction execute Start Fetch next Instruction Execute Instruction Halt
  • 13. With Interrupt Instruction Fetch Instruction Execute Check the Interrupt Fetch Instructio n Execute Instructio n Check for Interrupt Start Halt Execute interruptInterrupt Disable
  • 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.
  • 18.
  • 19.
  • 20. First Priority: Hardware Second Priority: Program/software Third Priority: Timer Fourth Priority: Input/output devices