Use of the information contained in this unapproved document is at your own risk
.Last update: 30 March,1998
1003.1c-95 #29
_____________________________________________________________________________
Interpretation Number: XXXX
Topic: Get scheduling parameter limits
Relevant Sections: 13.3.6
Interpretation Request: (Defect Report)
-----------------------
Date: Tue, 27 Aug 1996 15:27:10 -0400
From: Dave Butenhof <butenhof@zko.dec.com>
Standard: 9945-1:1996 (1003.1, 1996 Edition)
3. Section 13.3.6, Get Scheduling Parameter Limits
The standard fails to formalize the dependency of
_POSIX_THREAD_PRIORITY_SCHEDULING on _POSIX_PRIORITY_SCHEDULING. That
is, a conforming implementation could choose to support the latter but
not the former. That was intentional, BUT, there really is a "hidden"
dependency... to use thread priority scheduling one must call
sched_priority_get_min() and/or sched_priority_get_max() to determine
the legal priority range for any policy. And those functions are
required only under _POSIX_PRIORITY_SCHEDULING, and therefore might not
exist. I would suggest one of three solutions:
1) require _POSIX_PRIORITY_SCHEDULING if the implementation supports
_POSIX_THREAD_PRIORITY_SCHEDULING, or,
2) sched_priority_get_min/_max must be required if EITHER option is
supported, or,
3) go back to the wording in one of the earlier drafts, where there was
no separate thread priority scheduling option at all -- the thread
scheduling functions were present IFF the system supported threads
and priority scheduling.
Option 2 is likely to be the least contentious of the three, and it's
certainly sufficient.
REF: pages 53-54, section 2.9.3, lines 1602-1667
page 296, section 13.3.6.1, lines 340-341
Interpretation response
------------------------
The standard is clear in section 13.2 that priorities shall be in the
range defined for the policy and in section 13.3.6 it only requires the
sched_get_priority_max and sched_get_priority_min function if
_POSIX_PRIORITY_SCHEDULING is defined. The standard's conformance
requirement upon these functions when that option is not defined is only
that if the functions are provided, they shall be provided as specified
or they shall fail. The standard is also clear that the
_POSIX_THREAD_PRIORITY_SCHEDULING option does not require that the
sched_get_priority_max and sched_get_priority_min functions be defined.
The interpretations committee believes that not requiring the definition
of these functions may make the _POSIX_THREAD_PRIORITY_SCHEDULING option
less useful and was not the intention of the working and balloting
groups. This is being referred to the sponsor for consideration.
Rationale
-------------
None.
Forwarded to Interpretations group: August 29 1996
Proposed resolution: 29 Jan 97
Finalised: Feb 14 1997