Next: simple tasklet example
Up: embedded_resources
Previous: Resource Linux Provides
Tasklets [5] are the replacement of the bottom half concept that was in use up to kernel 2.2.X (in 2.4.X BH are still supported - but are implemented via tasklets).
The main properties of tasklets:
- tasklets can be scheduled with different priorities in Linux
- tasklets don't need to be reentrant
- the same tasklet will never run in parallel on SMP
- scheduling a tasklet multiple times before it actually runs does not cause it to run multiple times.
- different tasklets may run on different CPU's at the same time.
- tasklets run in interrupt context - thus with all limitations of an interrupt handler.
These properties make it fairly simple to write tasklets. The concept behind them is the same as with the former BH handlers, keep the interrupt or rt-thread small and put all processing steps that may be delayed into a tasklet.
Important for RTLinux is that tasklets are run at every context switch to Linux, they are not delayed until the next hardware interrupt. Tasklets will run before any user-space application will get a chance to run, thus they are a high priority non-rt task that can be easily scheduled from within a rt-thread by calling schedule_tasklet() or schedule_hi_tasklet, whereby the later has higher priority than the first.
Subsections
Next: simple tasklet example
Up: embedded_resources
Previous: Resource Linux Provides
Der Herr Hofrat
2003-01-06