> If such a question has ever come up in comp.unix, it hasn't however met
> an answer. Is there some sort of "interdriver communications" in unix
> (especially in SunOS 5.5.1) ? How to write layered drivers, not using
> STREAMS mechanism ?
> I'd greatly appreciate ANY information or references.
Use an "in kernel" pipe with streams drivers
and/or
with async drivers, read from the async queue and write
to the head of another driver, (tee driver).
Example:
How to create a very fast, low level disk I/O mirroring mechanism.
Step 1).
Async writes to a DMA disk storage device driver are "captured"
off the drivers async queue and written drectly to the head of
another async disk storage device driver which writes changes
to a log space. The secret here is in the async driver *you*
write which accesses the async queue memory space in the I/O
sub-system for the standard async DMA driver most manufactures
provide or disk I/O, network interfaces, etc.
Step 2).
Log space is read by another driver, which *you* write, (possibly
a streams driver), data is passed through an in-kernel pipe which
sends the data to the head of a network stream driver, (i.e. network
interface driver), which sends the data over a WAN to a receiver on
another machine which immediately writes the data into a local log
space using an async driver.
Step 3).
A tee driver interface similar to the one described in step 1.
is used to read from the log space at the remote system and write
updates to the remote systems mirrored storage device.
Obviously, over simplified but I'm sure you get the idea. The
result from this design is a very light weight, low latency disk
mirroring transmitter which when locked onto a dedicated processor
of a multi-processor system, gives performance rivaling hardware
mirroring solutions costing mucho dinero, (e.g. EMC SRDF).
See also http://docs.sun.com/ab2
Hope this helps you out.