In: Electrical Engineering
1:Explain what is an interrupt and its process.
2:State any three difference between top-down and bottom-up design strategies
3:What is the difference between Interrupt and polling technique? Which one is preferable
and why?
1)
Interrupt is a special condition which stops the working of the processor, when an interrupt occurs processor suspends it's curtain working task and executes a sub-routine of that interrupt which defines purpose of that interrupt called Interrupt service routine (ISR)
Interrupt generally occurs when an external device wants to interact with processor
When an interrupt occurs:
- when an interrupt is occured, the processor stores the address of current program into stack(by pushing the Program counter (PC) value) as return address
-Then goes to ISR of interrupt and executes the sub-routine
-After that loads the PC with return address from stack(by using POP) and continues from where it is suspended.
2)
3)
When Interrupt occurs it enables some status bits and the processor when it is free goes to excute those interrupts.
Where as polling is a protocol that cpu has to keep on checking whether the external device is ready for data transfer.
In case polling , lot of processor time is wasted which we cannot allow as it is very critical
So definitely interrupt technique is better