art@ACC.ARPA (09/21/87)
>The choice of which mechanism to use is entirely up to the writer of the >device driver. In theory, a driver could even use different mechanisms for >different kinds of I/O requests - e.g., direct output and buffered input. I >know of no driver that does this; I doubt any has ever been written (though >technically non-I/O QIO's like SETMODE are "direct" even for otherwise >buffered drivers). We've done some things in this area in some of our VMS drivers for high speed communications devices. One of the drivers used buffered I/O for Reads and direct I/O for Writes. The theory here was that the writes would tend to complete quickly and that the reads could stay pending for an arbitrary length of time (and we didn't want to lock down process pages for that time). Another driver allows the user to specify via function modifiers on reads and writes whether to use direct or buffered I/O. This allows the user (subject to quota authorizations) to attempt to optimize his I/O. Doing this sort of thing in the driver is quite straightforward once you've read the fiche enought to really understand the VMS I/O system (where "Guide to Writing I/O Drivers" is really only an introduction). Art Berggreen art@acc.arpa ------