Hello everybody today I want to explain you about “What is a Computer Interrupt?”.
- What is an Interrupt?
An electrical signal which is informing the process that an another program or an event in computer system has start.
Interrupt handling is a very important concept,
Inside each computer there are several devices like input devices ( Keyboards ), output devices(Monitor, Printer), memory(Disk) sends and receives data to Processor and from processor. This transfer is happen with the help of an Interrupt call. If CPU is busy in some processing and an I/O device wants to send some data to CPU for the current program need then that Device issues an interrupt and accordingly an Interrupt subroutine is executed. And after it CPU starts its normal execution. This approch helps a lot so that maximum utilization of central processing unit(Processor) can happen.
The primary goal of interrupt technique is increase the efficiency of processing.
From the point of view of user program, an interrupt is just an interruption of normal sequence of execution.
If the CPU is idle, interrupt is served.
When interrupt processing is completed, execution resumes accordingly.
The processor and operating system are responsible for suspending the user program and then resuming it at the same point.
– Added to instruction cycle
– Processor checks for interrupt
– Indicated by presence of an interrupt signal
– If no interrupt, fetch next instruction
– If interrupt pending:
– Suspend execution of current program.
– Save context. i.e. save the address of next instruction to be executed (in current program) and any other data relevant to processor’s current activity.
– Set PC to start address of interrupt handler routine
– Process interrupt
– Restore context and continue interrupted program
I hope this explaination will help you in your study. Please add comments so that I can improve my next tutorial.
No related posts.