The STREAMS environment guarantees that only one open, close, or service procedure from the subsystem-parallel stack is executing at any given time. It also ensures that the service procedure completes before another service procedure is run. However, this protection is insufficient.
In STREAMS, both the stream head and the dndis driver are fully parallel. At a given moment, many instances of the read put procedure of dndis and the write put procedure of the stream head can be executing. These instances must be prevented from entering the sybsystem concurrently.
The solution to this problem is to serialize the concurrent putnext (Section B.3.1) calls, which can be done in either of two ways:
The key to these two methods is that the put procedure at the boundary of a stack must defer all processing to its service procedure. The service procedures of a stack are serialized by the STREAMS environment. An insulating module is required at both the lower read and upper write queues of a subsystem stack.