Installation guide
5.3.3 Scheduling Behavior (Contention Scope)
In releases prior to Version 4.0, thread scheduling attributes were
systemwide. In other words, threads had a system contention scope. Since
Version 4.0, thread policies and priorities are, by default, local to the process.
No artificial limit exists for thread priorities of these process contention scope
threads, the full priority range is accessible by every thread.
Previously, there was no way to control the contention scope of a thread.
Starting with Version 4.0D, applications coded to the POSIX 1003.1c
pthreads interface can set the desired contention scope upon thread creation.
For more information on setting and determining thread contention scope, see
the descriptions of the following routines in the Guide to DECthreads:
pthread_attr_setscope()
pthread_attr_getscope()
The guide also describes a problem with inheritance of the contention scope
scheduling attribute in Versions 4.0D and higher.
Process contention scope threads provide faster context switches between
threads in the same process, and reduce the demand on system resources
without reducing execution concurrency. The Tru64 UNIX "two level
scheduling" implementation (the code that supports process contention scope
scheduling) automatically replaces kernel execution entities when a process
contention scope thread blocks in the kernel for any reason, and it provides
time-slicing of compute-bound threads. Therefore, there is no need to worry
that using process contention scope will reduce parallelism or allow the
execution of some threads to prevent other threads from executing.
The only code that should require system contention scope is code that must
run on a specific processor via binding and code that must be directly
scheduled by the operating system kernel against threads in other processes,
particularly threads running inside the kernel. While the scheduling policy
and priority of process contention scope threads is virtual and affects
scheduling only against other threads within the process, the scheduling
policy and priority of system contention scope threads (when the process runs
with root access) can allow the thread to preempt threads within the kernel.
While this can sometimes be valuable and even essential, extreme care must
be used in such programs to avoid locking up the system. It might be
impossible to interrupt such a thread.
5.3.4 Problems Using of the stackaddr Thread Creation Attribute
Compaq does not recommend using the stackaddr thread creation
attribute which allows you to allocate your own stack for a thread. The
semantics of this attribute are poorly defined by POSIX and the Single UNIX
Specification, Version 2. As a result, code using the attribute is unlikely to be
portable between implementations. The attribute is difficult to use reliably,
5–4 Development Environment Notes