DCE Application Programming Guide

Application Programming With NonStop DCE
Threads
HP NonStop DCE Application Programming Guide429551-003
3-3
Portability of Threads
and the signal is considered handled; otherwise, the default signal action is taken.
For a terminating signal, the default action is to terminate the process.
Portability of Threads
DCE threads follow the POSIX threads draft standard 1003.4a (draft 4). Using threads
API procedures whose names have the suffix _np decreases the portability of a
program because these functions are extensions to the standard.
Threading in DCE Run-Time Code
The DCE run-time code uses special run-time threads to provide RPC protocol
processing within the context of the application process. As a result, even an
apparently single-threaded DCE application is effectively multithreaded.
Also, certain run-time functions are time-critical. When an application thread delays or
prevents the execution of a run-time thread, it can cause significant side effects in
these areas:
The RPC datagram protocol
The client run-time code must be able to periodically communicate with the server
run-time code during the execution of a RPC. Blocking the server run-time code for
longer than 30 seconds during a call can cause the client run-time code to
complete the RPC with a timeout.
The client run-time code might also need to communicate with the server run-time
code, even outside the scope of any remote procedure call. Preventing the run-
time code of either the client or server process from timely execution can result in
the sending of extra packets, increasing the network load. Blocking the client run-
time code for longer than 120 seconds while a context handle is active can cause
the server to initiate context-rundown processing.
Automatic key management
The sec_key_mgmt_manage_key() function, which is used by servers to
automatically generate new keys, executes as a long-running thread. Although this
procedure is invoked by an application thread, the thread remains in the
sec_key_mgmt_manage_key() function indefinitely, performing run-time
processing. Blocking this thread from executing can interfere with its function and
cause the server’s key to expire.
Endpoint-map service maintenance
The DCE demon dced must be able to communicate periodically with the server
run-time code while the server has entries in the endpoint map. Blocking the server
run-time code for longer than 30 seconds can cause the server’s endpoint entries
to be prematurely deleted. As a result, clients with partially bound bindings are not
able to get the servers endpoint.