P. 1


|Views: 55|Likes:
Published by Ankit Daftery

More info:

Published by: Ankit Daftery on Jul 26, 2009
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less





Interrupts do exactly what they mean : they interrupt the normal flow of execution.

Normally, you would expect a program to keep on executing sequentially in the way you have defined. However, in real time situations, there might occur events which affect the program flow but the processor doesn't have any way of knowing it. One solution is to keep checking whether a condition has occured, but that is an inefficient way of doing it, since we are wasting a lot of processing time when we would rather be doing something else. Interrupts basically happen automatically whenever a defined condition occurs, and no, the processor does not have to keep on checking for the condition at the same time.The interrupts execute whatever they are supposed to when they are triggered and then the program resumes execution exactly where it left off when the interrupt was triggered.This makes life a lot more easier. Interrupts are of two types : Software and Hardware. Software interrupts are those which are triggered by the software which is running, for example, an interrupt to execute some code when you run out of memory or face an error.These are internally generated.Hardware interrupts are provided to the controller externally, by harware, hence the name.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->