[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rtl] Threads or Tasks?
Thanks Philip.
Then it isnīt possible that a high priority task interrupt the work is doing a
low priority task.??? I mean, without hardware interrupts.
So, the designer of the system must know at any moment what he want to do. There
is not any posibility of having an error in the design. If you miss something
your system may never recover.
Iīm correct??
worm
Philip N Daly escribió:
> >
> > I unsdestood, reading docs and mailing list, that the scheduler in
> > rtlinux is a priority one. Letīs say, that if i run the three threads in
> > a periodic form, the one with priority executes first, then the one with
> > priority 2 and so on. If, during the execution of thread 2, thread 1
> > need the cpu because of its period, the scheduler should interrupt the
> > execution of thread 2 and start executes thread 1, because it priority.
> > The same things happen if itīs running thread 3 and thread 2 need to
> > run.
> > Is it true? I donīt know if iīm wrong. I did a code with three threads
> > that is not working as iīve just described.
>
> No, it's a fixed priority scheduler that is pre-emptive on the Linux kernel.
> The real-time executive is *not* pre-emptive ... once a task has the CPU
> (no matter what it's priority), it retains it until it suspends itself. At
> that point, the higher priority task will get the CPU and so on.
>
> Regards,
>
> +==================================================================+
> Phil Daly, NOAO/AURA, 950 N. Cherry Avenue, Tucson AZ 85719, U S A
> E-mail: pdaly@noao.edu V-mail: (520) 318 8438 Fax: (520) 318 8360