How does Real-time Linux
work?
The general idea of Real-time (RT)
Linux is that a small real-time kernel runs beneath Linux, meaning that the
real-time kernel has a higher priority than the Linux kernel.
Real-time tasks are executed by the real-time kernel, and normal Linux programs are allowed to run when no real-time tasks have to be executed.
Linux can be considered as the idle task of the real-time scheduler. When this idle task runs, it executes its own scheduler and schedules the normal Linux processes.
Since the real-time kernel has a higher priority, a normal Linux process is preempted when a real-time task becomes ready to run and the real-time task is executed immediately.
Real-time tasks are executed by the real-time kernel, and normal Linux programs are allowed to run when no real-time tasks have to be executed.
Linux can be considered as the idle task of the real-time scheduler. When this idle task runs, it executes its own scheduler and schedules the normal Linux processes.
Since the real-time kernel has a higher priority, a normal Linux process is preempted when a real-time task becomes ready to run and the real-time task is executed immediately.
How is the
real-time kernel given higher priority than Linux kernel?
RT Linux uses the flow of interrupts to give the real-time kernel a
higher priority than the Linux kernel:
• When an interrupt arrives, it
is first given to the real-time kernel, and not to the Linux kernel. But
interrupts are stored to give them later to Linux when the real-time kernel has
finished.
• As first in row, the real-time
kernel can run its real-time tasks driven by these interrupts.
• Only when the real-time
kernel is not running anything, the interrupts which were stored are passed on
to the Linux kernel.
• As second in row, Linux can
schedule its own processes driven by these interrupt.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.