STREAMS/UX for the HP 9000 Reference Manual

78
STREAMS/UX Multiprocessor Support
Writing MP Scalable Modules and Drivers
Writing MP Scalable Modules and Drivers
Overview of STREAMS/UX MP Support
HP-UX STREAMS supports MP scalable drivers and modules. You can
configure the amount of parallelism for modules and drivers. Pick a level
which is consistent with a module's or driver's use of shared data structures.
STREAMS/UX provides five levels of parallelism which are called queue,
queue pair, module, elsewhere, and global. They are described below. Also,
STREAMS provides extra synchronization for module and driver open and
close functions. This synchronization is also described below. The term
module is used in this discussion to mean both modules and drivers, unless
otherwise stated.
Figure 1 is useful for understanding STREAMS/UX MP support. The
diagram shows four streams, ECHO-A, ECHO-B, DLPI-A and SAD-A.
ECHO-A and ECHO-B both contain the echo driver. DLPI-A contains dlpi,
and SAD-A has sad. Each driver contains a read and a write queue.
echo_rput and echo_rsrv operate on an echo driver's read queue. echo_wput
and echo_wsrv access the write queue. The dlpi and sad driver functions are
similar to the echo driver functions. STREAMS/UX executes echo, dlpi,
and sad driver functions differently depending on the MP synchronization
level configured for the drivers.