I think that RTLinux is better thought of as hierarchical, where the
RTLinux scheduler is at the top
of the hierarchy, and regular Linux runs as a one process (but of lowest
priority) at the next
level of the hierarchy.  Other processes of higher priority can be added at
that level using the RTLinux call pthread_create.  The third level of the
hierarchy depends on the parent. In the case of Linux, it has
its own schedulers in the kernel and of course in user space.  It is
possible that other RT or non-RT programs have their own subschedulers too.

The use of insmod to create RT Tasks is just a convenience.  From a memory
allocation perspective, RT Tasks are kernel resident so insmod is a great
way of loading them into memory.  But one of the first
things that pthread_create does is go into RTLinux mode (i.e. disables all
interrupts) and adds itself to the RTLinux thread list.

Here is a picture:

                         RTLinux
           --------------------------------------
           |                    |                |
      Linux Kernel            RT Task1        RT Task2 (with sub-scheduler)

    ---------------                            ---------------------
    |              |                          |                    |
    Linux Tasks    User Tasks            Sub Task                Sub Task



Robert Kavaler


Mark wrote:

> Hi,
>
>         I'm just trying to figure out how to visualise what going on
> when RT-Linux is running. I'm a bit confused trying to figure out how an
> RT Linux system fits together.
>
> For me, with a normal Linux kernel, I think of is running a number of
> individual processes. When threads turn up in Linux (VMS or Windoze for
> that matter) I think of it as being a separate execution sequence (It
> own memory etc.) BUT it is with in a process. That is it can only get a
> chance to run when the process is switched into the CPU AND that thread
> within the particular process is chosen to execute.
>
> With RT-Linux is there only ONE process on the system. Is then has a
> number of threads inside it (One of which is the Linux Kernel). Then to
> start a RTL program off you have to insmod it into the single process?
>
> I would have a problem if RTL just ran normal processes, where the idle
> process was the Linux Kernel. Indeed this is what I though happened,
> judging by some of the documents. But the thread stuff seems to
> contradict this. Has it been updated in some way.
>
> Maybe there is a diagram around showing this. As yet I haven't seen on.
> On my webpage I've put, what I think is going on. If someone could take
> a look and tell me if I way off (Most likely:) of what ever. I'd really
> appreciate it.
>
> http://www.mxnet.demon.co.uk/RT-Linux/RTLinux.html
>
> Many Thanks
>
> Mark
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> ---
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to