@ page <no.> line <no.> section <no.> comment
Problem:
In the specification of sched_setparam(), there is the statement:
The target process, whether it is running or not running, shall
be moved to the tail of the thread list for its priority.
However, there is no analogous statement is the specification of
sched_setscheduler(). Is this an oversight -- should there be
such a specification? Or failing this, should there
be a rationale statement about why there is a difference between
sched_setparam() and sched_setscheduler()?
On the one implementation that I have tested (Linux),
sched_setscheduler() does indeed behave like sched_setparam(),
moving the target proces to the tail of the queue, even if its
scheduling priority (and policy) are not actually changed by
the call.
However, I note that the man pages for FreeBSD 5.1, Tru64 5.1,
and Solaris 8 all mirror the SUSv3 specification. For example,
from the Solaris 8 sched_setparam() man page:
The target process, whether it is running or not running,
resumes execution after all other runnable processes of
equal or greater priority have been scheduled to run.
On these systems, the sched_setparam() man page
describes the above behaviour, while the
sched_setscheduler() man page is silent on this point. This
makes me wonder about the behavior on these systems, and whether
I may be incorrect to suggest amending the sched_setscheduler()
specification to say that the target process should be moved to
the tail of the queue. If that is so, perhaps it would be useful
to add text to sched_setscheduler() to explicitly note that this
point is unspecified (and perhaps why).
Action:
Suggested...
@ page 1258
EITHER: add the following statement to the specification of
sched_setscheduler():
The target process, whether it is running or not running, shall
be moved to the tail of the thread list for its priority.
OR: add the following statement to the specification of
sched_setscheduler():
The effect of sched_setscheduler() on the location of the
target thread within the thread list for its priority is
unspecified.
--
Michael Kerrisk
yyyyyyyyy@xxxxxxx
NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler!
GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl
|