SlideShare a Scribd company logo
1 of 16
Presenters:
Awais Hammed
Pir Syed M
Ayaz Farid
Interrupts and Exceptions
Outline:
 What Are Interrupts?
 Why Interrupts?
 Instruction Cycle And Interrupts
 Classes Of Interrupts
 Types Of Interrupts
Difference b/w Interrupts and Exceptions
 How They Are Handled?
Interrupts:
An interrupt is usually defined as an event
that alters the sequence of instructions
executed by a processor.
 A Suspension of a process such as the
execution of a computer program, caused by
an event external to that process, and
performed in such a way that the process can
be resumed.
Need For Interrupts?
 The OS is a reactive program
 When you give some input
 It will perform computations
 Produces output BUT
 Meanwhile you can interact with the system by
interrupting the running process or
 You can stop and start another process.
 This reactive ness is due to interrupts
 Modern Operating Systems Are Interrupt
driven
Instruction Cycle And Interrupts
 Without Interrupts
 Two steps ( cycles)
 Instruction Fetch
 Instruction Execute
Start
Fetch
Instruction
Execute
Instruction
Halt
Instruction Cycle And Interrupts
 With Interrupts
 Three steps ( cycles)
 Instruction Fetch
 Instruction Execute
 Check Interrupt
Start Fetch
Instruction
Execute
Instruction
Check For
Interrupt
Halt
Classes Of Interrupts
 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 etc.
 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.
Types Of Interrupts
 Synchronous interrupts
 Asynchronous interrupts
• are produced by the CPU control unit while executing
instructions and are called synchronous because the
control unit issues them only after terminating the
execution of an instruction.
Synchronous interrupts
Asynchronous interrupts
• are generated by other hardware devices at arbitrary
times with respect to the CPU clock signals.
Differenceb/w Interruptsand Exceptions
 Exceptions are caused by software executing
instructions
 a page fault, or an attempted write to a read- only page
 an expected exception is a “trap”, unexpected is a “fault”
Interrupts are caused by hardware devices
 device finishes I/O
 timer fires
How Interrupts Are Handled?
Different routines handle different interrupts – called
Interrupt Service Routines (ISR).
When CPU is interrupted
 It stops what it was doing, and context is saved.
 A generic routine called Interrupt Handling Routine (IHR) is
run which
 Examines the nature of interrupt
 Calls the corresponding Interrupt Service Routine (ISR) -- stored in
lower part of memory.
After servicing the interrupt, the saved address is loaded
again to PC to resume the process again.
Any questions ???
Interrupts ppt

More Related Content

What's hot

What's hot (20)

Interrupt
InterruptInterrupt
Interrupt
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 
Registers and-common-bus
Registers and-common-busRegisters and-common-bus
Registers and-common-bus
 
8085 interrupts
8085 interrupts8085 interrupts
8085 interrupts
 
Pipeline hazard
Pipeline hazardPipeline hazard
Pipeline hazard
 
Accessing I/O Devices
Accessing I/O DevicesAccessing I/O Devices
Accessing I/O Devices
 
Interrupts of 8086
Interrupts of 8086Interrupts of 8086
Interrupts of 8086
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and Architecture
 
Input output interface
Input output interfaceInput output interface
Input output interface
 
Direct Memory Access & Interrrupts
Direct Memory Access & InterrruptsDirect Memory Access & Interrrupts
Direct Memory Access & Interrrupts
 
RISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set ComputingRISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set Computing
 
Interrupts
InterruptsInterrupts
Interrupts
 
System bus timing 8086
System bus timing 8086System bus timing 8086
System bus timing 8086
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycle
 
Interrupts
Interrupts Interrupts
Interrupts
 
Interrupt presentaion
Interrupt presentaionInterrupt presentaion
Interrupt presentaion
 
Memory mapping
Memory mappingMemory mapping
Memory mapping
 
INTERRUPTS
INTERRUPTS INTERRUPTS
INTERRUPTS
 
Data transfer and manipulation
Data transfer and manipulationData transfer and manipulation
Data transfer and manipulation
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 

Similar to Interrupts ppt

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
 
Lecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfLecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfTaufeeq8
 
Computer architecture presentation
Computer architecture presentationComputer architecture presentation
Computer architecture presentationMuhammad Hamza
 
Central Processing Unit (CPU) – Part 2
Central Processing Unit (CPU) – Part 2Central Processing Unit (CPU) – Part 2
Central Processing Unit (CPU) – Part 2Ajeng Savitri
 
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
 
Operatingsystems lecture2
Operatingsystems lecture2Operatingsystems lecture2
Operatingsystems lecture2Gaurav Meena
 
operatingsystem03handlingofinterrupts-210603182850.pdf
operatingsystem03handlingofinterrupts-210603182850.pdfoperatingsystem03handlingofinterrupts-210603182850.pdf
operatingsystem03handlingofinterrupts-210603182850.pdfChetanRaut43
 
operatingsystem03handlingofinterrupts-210603182850.pptx
operatingsystem03handlingofinterrupts-210603182850.pptxoperatingsystem03handlingofinterrupts-210603182850.pptx
operatingsystem03handlingofinterrupts-210603182850.pptxChetanRaut43
 
Operating system 03 handling of interrupts
Operating system 03 handling of interruptsOperating system 03 handling of interrupts
Operating system 03 handling of interruptsVaibhav Khanna
 
Device drivers and interrupt service mechanism
Device drivers and interrupt service mechanismDevice drivers and interrupt service mechanism
Device drivers and interrupt service mechanismVijay Kumar
 

Similar to Interrupts ppt (20)

Interrupts
InterruptsInterrupts
Interrupts
 
Interrupts in CPU
Interrupts in CPUInterrupts in CPU
Interrupts in CPU
 
interruptpresentaion-151207165807-lva1-app6892.pptx
interruptpresentaion-151207165807-lva1-app6892.pptxinterruptpresentaion-151207165807-lva1-app6892.pptx
interruptpresentaion-151207165807-lva1-app6892.pptx
 
Interrupts
InterruptsInterrupts
Interrupts
 
Interrupts in 8085
Interrupts in 8085Interrupts in 8085
Interrupts in 8085
 
Functions of the Operating System
Functions of the Operating SystemFunctions of the Operating System
Functions of the Operating System
 
Program control
Program controlProgram control
Program control
 
Exception handling in Pipelining in COA
Exception handling in Pipelining in COAException handling in Pipelining in COA
Exception handling in Pipelining in COA
 
Lecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfLecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdf
 
Inerrupt
InerruptInerrupt
Inerrupt
 
Computer architecture presentation
Computer architecture presentationComputer architecture presentation
Computer architecture presentation
 
interrupts.pptx
interrupts.pptxinterrupts.pptx
interrupts.pptx
 
Central Processing Unit (CPU) – Part 2
Central Processing Unit (CPU) – Part 2Central Processing Unit (CPU) – Part 2
Central Processing Unit (CPU) – Part 2
 
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
 
Operatingsystems lecture2
Operatingsystems lecture2Operatingsystems lecture2
Operatingsystems lecture2
 
operatingsystem03handlingofinterrupts-210603182850.pdf
operatingsystem03handlingofinterrupts-210603182850.pdfoperatingsystem03handlingofinterrupts-210603182850.pdf
operatingsystem03handlingofinterrupts-210603182850.pdf
 
operatingsystem03handlingofinterrupts-210603182850.pptx
operatingsystem03handlingofinterrupts-210603182850.pptxoperatingsystem03handlingofinterrupts-210603182850.pptx
operatingsystem03handlingofinterrupts-210603182850.pptx
 
Operating system 03 handling of interrupts
Operating system 03 handling of interruptsOperating system 03 handling of interrupts
Operating system 03 handling of interrupts
 
Device drivers and interrupt service mechanism
Device drivers and interrupt service mechanismDevice drivers and interrupt service mechanism
Device drivers and interrupt service mechanism
 
Io pro
Io proIo pro
Io pro
 

Recently uploaded

IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

Recently uploaded (20)

IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

Interrupts ppt

  • 1.
  • 4. Outline:  What Are Interrupts?  Why Interrupts?  Instruction Cycle And Interrupts  Classes Of Interrupts  Types Of Interrupts Difference b/w Interrupts and Exceptions  How They Are Handled?
  • 5. Interrupts: An interrupt is usually defined as an event that alters the sequence of instructions executed by a processor.  A Suspension of a process such as the execution of a computer program, caused by an event external to that process, and performed in such a way that the process can be resumed.
  • 6. Need For Interrupts?  The OS is a reactive program  When you give some input  It will perform computations  Produces output BUT  Meanwhile you can interact with the system by interrupting the running process or  You can stop and start another process.  This reactive ness is due to interrupts  Modern Operating Systems Are Interrupt driven
  • 7. Instruction Cycle And Interrupts  Without Interrupts  Two steps ( cycles)  Instruction Fetch  Instruction Execute Start Fetch Instruction Execute Instruction Halt
  • 8. Instruction Cycle And Interrupts  With Interrupts  Three steps ( cycles)  Instruction Fetch  Instruction Execute  Check Interrupt Start Fetch Instruction Execute Instruction Check For Interrupt Halt
  • 9. Classes Of Interrupts  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 etc.  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.
  • 10. Types Of Interrupts  Synchronous interrupts  Asynchronous interrupts
  • 11. • are produced by the CPU control unit while executing instructions and are called synchronous because the control unit issues them only after terminating the execution of an instruction. Synchronous interrupts
  • 12. Asynchronous interrupts • are generated by other hardware devices at arbitrary times with respect to the CPU clock signals.
  • 13. Differenceb/w Interruptsand Exceptions  Exceptions are caused by software executing instructions  a page fault, or an attempted write to a read- only page  an expected exception is a “trap”, unexpected is a “fault” Interrupts are caused by hardware devices  device finishes I/O  timer fires
  • 14. How Interrupts Are Handled? Different routines handle different interrupts – called Interrupt Service Routines (ISR). When CPU is interrupted  It stops what it was doing, and context is saved.  A generic routine called Interrupt Handling Routine (IHR) is run which  Examines the nature of interrupt  Calls the corresponding Interrupt Service Routine (ISR) -- stored in lower part of memory. After servicing the interrupt, the saved address is loaded again to PC to resume the process again.