Interrupt Processing


0

An interrupt is a signal that causes the computer to alter its normal flow of instruction execution.

Advertisement

eg. divide by zero, time out, I/O operation

 

The interrupt automatically transfers control to an interrupt processing routine which takes some action in response to the condition that caused the interrupt, and then control is returned to the program at which its execution was interrupted.

 

 

Some interrupt types:

 

– I/O interrupt: Generated by an I/O channel or device.

 

– Program interrupt: Generated by some condition that occurs during program execution (eg. divide by zero, illegal machine instruction, etc.)

 

– Timer interrupt: Generated by an internal timer within the CPU

 

– Supervisor call interrupt (SVC): A SVC instruction generates an interrupt that transfers control to an OS service routine. The CPU switches from user mode to supervisor mode.

 

 

When an interrupt occurs, the status of the CPU is saved (registers, program counter etc.) and the interrupt service routine is executed. After the interrupt is processed, they are restored by the interrupt routine and control is transferred to the program. Saving and restoring the processor status is called context switching.

 

Interrupt priority: During the processing of an interrupt, all interrupts of equal or lower priority are inhibited, higher priority interrupts are allowed. At the end of an interrupt, if there are more than one interrupt pending, one with the highest priority is executed.

 

Interrupt masking, is used to prevent certain interrupts from occurring while the first one is being processed.

Advertisement
The following two tabs change content below.
We, at BMS.co.in, believe in sharing knowledge and giving quality information to our BMS students. We are here to provide and update you with every details required by you BMSites! If you want to join us, please mail to contact@bms.co.in.

Like it? Share with your friends!

0
BMS Team

We, at BMS.co.in, believe in sharing knowledge and giving quality information to our BMS students. We are here to provide and update you with every details required by you BMSites! If you want to join us, please mail to contact@bms.co.in.

8 Comments

Ask Us On WhatsApp
Choose A Format
Personality quiz
Series of questions that intends to reveal something about the personality
Trivia quiz
Series of questions with right and wrong answers that intends to check knowledge
Poll
Voting to make decisions or determine opinions
Story
Formatted Text with Embeds and Visuals
List
The Classic Internet Listicles
Countdown
The Classic Internet Countdowns
Open List
Submit your own item and vote up for the best submission
Ranked List
Upvote or downvote to decide the best list item
Meme
Upload your own images to make custom memes
Video
Youtube, Vimeo or Vine Embeds
Audio
Soundcloud or Mixcloud Embeds
Image
Photo or GIF
Gif
GIF format