How the tasklets are scheduled on linux?
The linux has queues for scheduled tasklets.When a cpu returns from an interrupt or from a system call, it checks for scheduled tasklets, and executes them. What if there are too many tasklets to be processed How are they scheduled?.
Tejas,
That's a really great question.
The tl;dl answer to this question is:
first-come-first-serve within the softirq-tasklet thread.
(This is expected as Tasklets are built on top of softirqs, but have a simpler interface and relaxed locking rules.)
The article, "I'll Do It Later: Softirqs, Tasklets, Bottom Halves, Task Queues, Work Queues and Timers," talks about how you shouldn't do too much work in the interrupt handler lest new interrupts be lost and other devices starved of the opportunity to proceed (which is the main gotcha to watch out for).
I would highly recommend reading the article, "Tasklets," which goes in-depth about it's scheduling algorithms and internals about tasklets.
On a more general-level, "The Linux Process Scheduler," article does a great job of describing the scheduling policy that is implemented in linux.
Please let me know if you have any questions!
链接地址: http://www.djcxy.com/p/84800.html下一篇: 如何在linux上调度tasklet?