Nick Piggin wrote:
No, a spec is something that is written unambiguously, and generally
the wording leads me to believe they attempted to make it so (it
definitely isn't perfect - your mutex unlock example is one that could
be interpreted either way). If they failed to say something that should
be there then the spec needs to be corrected -- however in this case
I don't think you've shown what's missing.
What is missing: sched_yield is a core threads function but it's defined
using language that only has meaning in the presence of an optional
feature (Process Scheduling.) Since the function must exist even in the
absence of these options, the definition must be changed to use language
that has meaning even in the absence of these options.
And actually your reading things into the spec that "they failed to say"
is wrong I believe (in the above sched_yield example).
interpretation would come from saying "hey, this spec is only defined
for realtime behavior, WTF is it supposed to do for the default
non-realtime case?" and getting a clear definition in the spec.
However they do not omit to say that. They quite explicitly say that
SCHED_OTHER is considered a single priority class in relation to its
interactions with other realtime classes, and is otherwise free to
be implemented in any way.
I can't see how you still have a problem with that...
I may be missing the obvious, but I couldn't find this explicit
statement in the SUS docs. Also, it would not address the core
complaint, that sched_yield's definition has no meaning when the Process
Scheduling option doesn't exist.
The current Open Group response to my objection reads:
>>>
Add to APPLICATION USAGE
Since there may not be more than one thread runnable in a process
a call to sched_yield() might not relinquish the processor at all.
In a single threaded application this will always be case.
<<<
The interesting point one can draw from this response is that
sched_yield is only intended to yield to other runnable threads within a
single process. This response is also problematic, because restricting
it to threads within a process makes it useless for Process Scheduling.
E.g., the Process Scheduling language would imply that a single-threaded
app could yield the processor to some other process. As such, I think
this response is also flawed, and the definition still needs more work.
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
OpenLDAP Core Team http://www.openldap.org/project/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]