|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (6 bit)
|
interrupts
hi there, interrupts are allocated numbers called levels, why are the necessary,
|
|
|
|
|
|
#2 |
|
Telcom Tech
Join Date: Feb 2002
Location: Western, Pa.
Posts: 5,409
|
As far as I understand them, interrupts are how all the other devices call upon the processor and are allocated time by the processor to take care of the specific task that the device is requesting. Hence the name interrupt, cause the device wants to interrupt the processor from whatever it was doing to ask it to give attention to its request.
__________________
If it ain't broke, "TWEAK IT" |
|
|
|
|
|
#3 |
|
Member
Join Date: Apr 2001
Location: Na Pali Haven
Posts: 2,812
|
When receiving data and change in status from I/O Ports, we have two methods available to us. We can Poll the port, which involves reading the status of the port at fixed intervals to determine whether any data has been received or a change of status has occurred. If so, then we can branch to a routine to service the ports requests.
As you could imagine, polling the port would consume quite some time. Time which could be used doing other things such refreshing the screen, displaying the time etc. A better alternative would be to use Interrupts. Here, the processor does your tasks such as refreshing the screen, displaying the time etc, and when a I/O Port/Device needs attention as a byte has been received or status has changed, then it sends a Interrupt Request (IRQ) to the processor. Once the processor receives an Interrupt Request, it finishes its current instruction, places a few things on the stack, and executes the appropriate Interrupt Service Routine (ISR) which can remove the byte from the port and place it in a buffer. Once the ISR has finished, the processor returns to where it left off. Using this method, the processor doesn't have to waste time, looking to see if your I/O Device is in need of attention, but rather the device will interrupt the processor when it needs attention. Read more about it here
__________________
*The command line, an elegant weapon for a more civilized age* |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|