1. Computer Science
Cape Unit 2 - Module 3: Operating Systems & Computer
Networks
Specific objective: Describe the functions of operating systems
2. Objectives
• At the end of the lesson you will be able to:
• Differentiate between the types of Interrupt
• Understand the concept of the interrupt cycle.
3. What is an Interrupt?
• Interrupts make modifications to a program’s flow of control. It allows for
the seamless resolution of unplanned and unanticipated activities.
• This interruption hands control to an Interrupt Service Routine.
• At the end of the Interrupt service routine, the original activities resume.
4. Types of Interrupt
• Interrupt generated by the running process
• Input/Output Interrupt
• External Interrupt
• Restart Interrupt
5. Interrupt generated by running process
• These interrupts are managed by the scheduler that monitors the queues and
processes. When a process moves from a ‘blocked’ state to ‘ready’, the
resulting action from the request replaces the currently running process in
queue with the new process ‘ready to run’. After the process action is
completed, the previous process is restored to the state it was in.
6. Input/Output Interrupt
• This type of interrupt normally occurs very quickly where the status of
processes in queue is altered by requests made by peripheral devices to enter
or display content.
7. External Interrupt
• These interrupts occur as a result of outside interference. Outside
interference extends to include users, peripheral devices, related hardware or
the network on which the device is currently operating.
8. Restart Interrupt
• The restart interrupt occurs in the operating system when process states are
altered by either a hardware or software change the requires a system reboot.
9. Examples of interrupts
• Mouse moved
• Key depressed on keyboard
• Application wants access to device hardware
• Print job stuck in spooler
10. Classes of Interrupts
• Program – The result of an attempt to execute an illegal machine instruction
and reference outside a user’s allowed memory space.
• Timer – Caused by a timer within the processor that allows the operating
system to perform certain functions on a regular basis.
• Input/Output – Stems from the Input/Output controller to indicate the
completion of an operation or signal an error condition.
• Hardware failure – Generated by a failure (example – power failure) or a
memory parity error.
11. Interrupt Handler
• Program to service a particular Input/Output device.
• Serves to suspend the normal sequence of execution.
12. Interrupt Cycle explained
• Processor checks for interrupts
• If there are no interrupts, the next instruction is retrieved for the current
program.
• If an interrupt is pending, suspend the current program and activate the
interrupt handler routine.