Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Interrupts
Index -> General Discussion
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
cyberguy




PostPosted: Sun Nov 22, 2009 9:21 pm   Post subject: Interrupts

Can someone explain how does the interrupt mechanism works in steps? and secondly explain interrupt handling with respect to device management?
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: Mon Nov 23, 2009 1:54 am   Post subject: RE:Interrupts

When a hardware interrupt occurs, the CPU's PC register (program counter) is sent to an address specified by the hardware. The Operating System's Kernel has an event handler that lives at that address and determines what to do with the event. Usually, this involves sleeping the existing process and doing something new (this happens on clock interrupts, for example). The OS may also choose to resume the thread in progress, in which case the interrupt handler simply returns.

Devices can communicate with the CPU either by interrupt or by polling (usually defined by their interface). A device controlled by polling waits until the CPU requests information from it, then provides that information or executes an order. A device which uses interrupts will "prompt" the CPU for more orders or information when it's ready, using interrupts.

For more detail, see Wikipedia or a university-level CS class on operating systems.
Display posts from previous:   
   Index -> General Discussion
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: