RE: [Linux-hls-devel] Processes freezing up
Status: Pre-Alpha
Brought to you by:
lucabe
|
From: Luca A. <luc...@em...> - 2003-09-04 10:09:20
|
Hi Paul,
just a quick mail (I am a little bit in hurry, right now); I'll send a
longer reply this evening.
[...]
> I noted in one of John's HLS papers a scheduler hierarchy that looked
> like this:
>
> ROOT---|
> | |
> RES--JOIN
> |
> PS
>
> Does this hierarchy give stronger guarantees to a RES task than the
> standard hierarchy in HLS? I assume the answer is "no" iff there are no
> rr1 tasks with priority >= 20?
Don't know about this (I'll need to re-read that paper)...
[...]
> I'm trying to understand whether or not the standard hierarchy will
> suffice for our application, or whether we need to compose a (more)
> appropriate hierarchy. We want to guarantee our application meets its
> real time constraints (no missed deadlines). More below...
I think that the standard hierarchy should be enough... You eventually
will have to change some tasks' priorities.
If I remember well, the standard hierarchy is:
root
|
|
-----rr1-----
| | |
| | |
res1 rr2 ps1
P=20 P=10 P=9 (rr2 is the default scheduler)
I assume you are not using the proportional share scheduler ps1. Anyway,
you have a lot of freedom in scheduling your tasks:
1) you can leave a task under the rr2 scheduler, changing its priority
to make it more or less important
2) you can move a task to the rr1 scheduler, giving it priority < 10, so
that it is scheduled in background respect to all the rr2 tasks
3) you can move a task to the rr1 scheduler, giving it priority 20 > P >
10, so that it is scheduled in foreground respect to all the rr2 tasks,
but in background respect to all the reserved tasks (res1)
3) you can move a task to the rr1 scheduler, giving it priority > 20, so
that it is scheduled in foreground respect to all the rr2 and res1 tasks
> I thought that all tasks were converted to HLS tasks (under rr2) when
> the scheduler is first loaded into the kernel?
Yes, this is correct: when the module is inserted all the tasks are
moved to the default scheduler (rr2), and when a task is created, it is
scheduled by the default scheduler.
But if you explicitly call sched_setscheduler() choosing the SCHED_RR,
SCHED_FIFO, or SCHED_OTHER policy, then the task returns to be a
"regular linux task", and is scheduled in background respect to all the
HLS tasks.
> When you say "background", do you mean rr2?
No, I was meaning that when a task decides to return to be a linux task
(by selecting the SCHED_RR, SCHED_FIFO, or SCHED_OTHER policy), it is
not scheduled anymore unless all the HLS tasks are idle.
> I assumed that the HLS rr2 scheduler is basically playing the role
> SCHED_OTHER did before HLS was loaded?
Yes, this is almost correct. The only problem is that if a task
explicitly selects SCHED_OTHER, it currently returns to be a non HLS
task. Setting SCHED_OTHER ---> default scheduler is a good idea, and I
will do it.
> The
> rr1 scheduler in the hierarchy is confusing me a little bit
> (apologies!).
Well, let's see if I remember well (John, please correct me...). If I am
not wrong, a root scheduler can have only a single scheduler as a child.
rr1 is the child of the root scheduler, and it is used to "schedule the
other schedulers" in a prioritized way. I hope this clarifies things a
little bit...
> > Yes... You can for example set "rt scheduler = rr1" (for the
> > standard hierarchy), so that changing a task to SCHED_FIFO or
> > SCHED_RR will really increase its priority.
>
> What happens to res1 tasks in this case?
If you set task priorities < 20, it is not affected.
> Will the sched_setscheduler()
> call for a res1 task then fail if there are "demanding" SCHED_FIFO/RR
> tasks or vice versa?
No, we do not implement hierarchical guarantees. If some time-demanding
task is scheduled on rr1 with priority > 20, then the res1 tasks can
fail to get their reserved time even if sched_setscheduler() did not
fail.
Luca
--
_____________________________________________________________________________
Copy this in your signature, if you think it is important:
N O W A R ! ! !
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f
Sponsor:
Difendi la tua casella di posta dai virus e dallo spam, prendi Email.it Pro15, Pro50 o Pro100 la casella professionale e sicura.
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1048&d=4-9
|