[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: [rtl] Workng with the example
mshsaint wrote:
>
> mshsaint wrote:
> > > Now I am looking at this 2tasks examples and there are some things I
> don't
> > > understand:
> > > And another thing due to the output I have got is:
> > > Does the output really have a nice represntation of the premprtion. It
> > > seemes to me that the lower process priority never gets preempted by
> the
> > > higher one, since the higher is asleep...
> >
> cecil wrote:
> > My understanding of the demo is different: each task runs to completion
> > without interruption, and each task is called on a strict schedule and
> > runs at a precise time.
>
> so what is all the code regarding the preemption about? The code is in
> rt_sched.c...
>
> Assuming we have two tasks
> Task 1, with a high priority
> Task 2, with a lower priority
>
> With the code we have in hand shouldn't task2 be interrupted if the waiting
> time of task1 is over,
> say task1 is supposed to run every 10 seconds and task2 takes two seconds
> to run and it starts running at 9. shouldn't task2 be interrupted by task
> 1( assuming the last time task1 was executed is at 0)?
> Thanx
> M
I've never tried this, since it never occured to me that a task should
be interrupted while running the applications in which I'm interested.
Does someone have a practical example?
I'm most interested in running a single small task from 100 to 10,000
times per second, or possibly two or three tasks of equal priority in
strict rotation up to 1000 times per second each.
The 2tasks demo is ambiguous on this issue, since each task has plenty
of time to complete and then go to sleep. The tasks don't need to
interrupt each other.
There is danger if a task isn't allowed enough time to complete before
it has to start again or yield to another. Again, I've never tried it
intentionally. I did get tired of rebooting my system and waiting for
fsck to finish when I did it out of ignorance.
Cecil Ogg
--- [rtl] ---
For more information on Real-Time Linux see:
http://www.rtlinux.org/