开发者

system timer implementation

Normally, a computer system only has a timer(hardware), and it trigger the system bu interrupts. But on application layer, we can set multiple tasks based on timer, like cron jobs. I am just wondering how system utilize the timer(hardware) to implement the 开发者_运维百科application tasks(cron jobs, or java scheduled tasks).

Thanks


Single timer, set to go off when the next task is up. Then it's set for the task after that, and so on, and so on.

In most cases, it's not even a timer hooked up to an interrupt, but a thread polling with Sleep delays.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜