STREAMS/UX for the HP 9000 Reference Manual
80
STREAMS/UX Multiprocessor Support
Writing MP Scalable Modules and Drivers
different queue pairs run in parallel. (A queue pair is also known as a
module instance.) For example, assume that the echo driver in Figure 1 is
configured for queue pair synchronization. STREAMS/UX runs ECHO-A's
echo_rput, echo_rsrv, echo_wput, and echo_wsrv one at a time. In other
words, STREAMS/UX does not execute any of ECHO-A's echo driver
functions concurrently, nor will STREAMS/UX run any of ECHO-B's echo
driver functions in parallel. However, STREAMS/UX can run an ECHO-A
function at the same time as an ECHO-B function. Also, any of ECHO-A's
functions can run in parallel with DLPI-A or SAD-A routines. If a module
uses queue pair synchronization, a queue pair's functions run one at a time
and can share data.
The module synchronization level serializes access to all of a module's
queue pairs or instances. STREAMS/UX runs only one function at a time for
all of a module's queue pairs. However, STREAMS/UX runs functions for
different modules in parallel. Modules are different if they have different
master file entries. For example, timod and tirdwr are different modules.
Assume that the echo driver in Figure 1 is configured for module
synchronization. STREAMS/UX does not run echo driver functions in
ECHO-A and ECHO-B in parallel.
However, STREAMS/UX can run an echo driver function at the same time
as dlpi or a sad driver function. Because STREAMS/UX allows only one
function for all of a module's queue pairs to run at a time, the module's queue
pairs can share data.
The elsewhere synchronization level serializes a group of different modules.
STREAMS/UX runs only one function at a time for the group of modules.
STREAMS/UX runs functions in different groups concurrently. Suppose the
echo and dlpi drivers in Figure 1 are configured to be members of an
elsewhere synchronization group. Also, assume the sad driver is configured
to be in a different elsewhere group. Only one driver function in ECHO-A,
ECHO-B and DLPI-A can run at a time. However, a function in ECHO-A,
ECHO-B or DLPI-A can run in parallel with a function in SAD-A. Also, a
function in ECHO-A, ECHO-B or DLPI-A can run at the same time as a
function in a module which uses a different synchronization level than
elsewhere. The modules in a group can share data.
The global synchronization level does not provide parallelism within
STREAMS/UX. Only one module out of those configured for global
synchronization can run at a time. Suppose that in Figure 1, the echo, dlpi