Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

3.4 HP-UX DCE Thread Attribute Support

3.4.1 Scheduling Attributes

This section describes the HP DCE specific support, behavior, and restrictions for thread scheduling attributes.

3.4.1.1 Start Policy

The start policy attribute is fully supported by the HP DCE implementation of Threads.h++ and defaults to RW_THR_START_RUNNING.

3.4.1.2 Contention Scope

OSF/DCE (POSIX 1003.1c Draft 4) compliant systems, such as HP DCE, do not support the concept of contention scope. Most of these systems have an implicit contention scope that is fixed by the underlying implementation. Threads.h++ allows you to query this attribute only in those environments where underlying contention scope is known.

In HP DCE, threads are scheduled by the underlying threads library and so have a fixed contention scope of RW_THR_PROCESS_SCOPE.

You may query the contention scope, and may set the contention scope to RW_THR_PROCESS_SCOPE, but any attempt to change the scope to RW_THR_SYSTEM_SCOPE will produce an exception.

3.4.1.3 Scheduling Inheritance Policy

The scheduling inheritance policy attribute is fully supported by the HP DCE implementation of Threads.h++ and defaults to RW_THR_INHERIT.

3.4.1.4 Concurrency Policy

The concurrency policy attribute is not supported in the HP-UX implementation of Threads.h++. Attempts to get or set this attribute value will result in exceptions.

3.4.1.5 Scheduling Policy

The OSF/DCE (POSIX 1003.1c Draft 4) threads API defines the following scheduling policies:

The following table shows how Threads.h++ RWSchedulingPolicy values and priority values map to the underlying threads API policies:

Table 4 -- HP/UX DCE: Mapping of RWSchedulingPolicy values and priorities to HP DCE scheduling policies

 
Threads.h++
RWSchedulingPolicy
Values
Threads.h++
Priority Values
HP DCE
Scheduling Policy
RW_THR_PREEMPTIVE
16-31
SCHED_FIFO
RW_THR_TIME_SLICED_FIXED
16-31
SCHED_RR
RW_THR_TIME_SLICED_DYNAMIC
8-15
SCHED_OTHER
same as:
SCHED_FG_NP
1-7*
SCHED_BG_NP*

* Although documented by HP, all attempts to use this underlying scheduling policy and priority range were unsuccessful, so we have dropped support for this policy and its associated priority range.

Note that Threads.h++ has mapped RW_THR_TIME_SLICED_DYNAMIC onto the HP DCE scheduling policy SCHED_OTHER.

Any attempt to set a scheduling policy value not shown on this list will result in an RWTHROperationNotAvailable exception.

A new thread's scheduling policy is inherited from the creating thread by default, unless the scheduling policy attribute has been explicitly set or the inheritance policy has been changed from its default value of RW_THR_INHERIT to RW_THR_EXPLICIT. If the inheritance policy is RW_THR_INHERIT, and you query for the default policy, Threads.h++ will return the scheduling policy used by the calling thread. If the inheritance policy is RW_THR_EXPLICIT, Threads.h++ defines the default scheduling policy to be RW_THR_TIME_SLICED_DYNAMIC.

3.4.1.6 Scheduling Priority

Threads.h++ uses the following HP DCE macro definitions to determine the legal range of priority values for each scheduling policy:

Table 5 -- HP/UX DCE: Use of HP/UX macros to determine scheduling policy priority values

Scheduling PolicyMinimum
Priority
Maximum
Priority
RW_THR_PREEMPTIVE
PRI_FIFO_MIN
PRI_FIFO_MAX
RW_THR_TIME_SLICED_FIXED
PRI_RR_MIN
PRI_RR_MAX
RW_THR_TIME_SLICED_DYNAMIC
PRI_BG_MIN_NP
PRI_OTHER_MAX

This translates to the following priority ranges and default values:

Table 6 -- HP/UX DCE: Actual Threads.h++ scheduling priority values

Scheduling PolicyMinimum
Priority
Maximum
Priority
Default
Priority
RW_THR_PREEMPTIVE
16
31
24
RW_THR_TIME_SLICED_FIXED
16
31
24
RW_THR_TIME_SLICED_DYNAMIC
1
15
12

A new thread's priority value is inherited from the creating thread by default, unless the priority attribute has been explicitly set or the inheritance policy has been changed from its default value of RW_THR_INHERIT to RW_THR_EXPLICIT. If the inheritance policy is RW_THR_INHERIT, and you query for the default priority, Threads.h++ will return the priority of the calling thread. If the inheritance policy is RW_THR_EXPLICIT, Threads.h++ defines a default priority based on the current scheduling policy value, as listed in the last column of the previous table.

3.4.1.7 Scheduling Time-Slice Quantum

The time-slice quantum attribute is not supported in the HP DCE implementation of Threads.h++. Attempts to get or set this attribute value will result in exceptions.

3.4.2 Stack Attributes

In HP DCE (POSIX 1003.1c Draft 4), support for user specification of stack attributes is limited to controlling the size of the system-managed stack; HP DCE does not support user-managed stacks.

3.4.2.1 System-Managed Stack Attributes

HP DCE provides support for controlling the reserve size of a system-managed thread stack, but provides no support for controlling the commitment of physical memory and page-file space to the stack.

3.4.2.2 User-Managed Stack Attributes

HP DCE does not support user-defined stacks. Consequently, the HP DCE implementation of Threads.h++, does not support user-defined stacks; any attempts to get or set the user stack address and size attributes will result in exceptions.



Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.