Wednesday, January 12, 2011

What is Timer / What do you mean by Timer interrupt

Timer / Timer Interrupt

To prevent a user program from getting stuck in an infinite loop or not calling system services and never returning control to the OS, a timer is used. A timer can be set to interrupt the computer after a specified period.

Transition from User to Kernel Mode
Transition from User to Kernel ModeThe OS sets the counter and this counter is decremented every time the clock ticks. When the counter reaches 0, an interrupt occurs which transfers control automatically to the OS.

No comments:

Post a Comment