Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-unix!sri-spam!ames!sdcsvax!ucbvax!VENUS.YCC.YALE.EDU!leichter From: leichter@VENUS.YCC.YALE.EDU.UUCP Newsgroups: comp.os.vms Subject: re: buffered i/o count Message-ID: <8709191208.AA03446@ucbvax.Berkeley.EDU> Date: Fri, 18-Sep-87 10:06:00 EDT Article-I.D.: ucbvax.8709191208.AA03446 Posted: Fri Sep 18 10:06:00 1987 Date-Received: Sun, 20-Sep-87 13:44:09 EDT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: "Jerry Leichter" Distribution: world Organization: The ARPA Internet Lines: 36 Where does BUFFERED I/O count come from ? Does DMA affect it ? What determines when it gets incremented ? Pointers to manuals would be appreciated. I need to know for accounting purposes. VMS I/O can be done using either of two mechanims: Direct or buffered. The direct I/O mechanism lets the I/O device read or write memory within your process directly: The pages are locked down into physical memory, the device is told where they are and then told to "go". The buffered I/O mechanism allocates a buffer in system space (charging against the process's BYTLM quota); the I/O device is given access to the buffer, and the data transferred is copied to/from the process's address space. 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). There is no completely general principle that determines which drivers use the direct mechanism, and which the buffered. Disks and tapes use direct I/O; in general, you'd expect "high-speed" devices to do so, though there are exceptions, like the Ethernet drivers (which need to deal with link-level encapsulation). Terminals, line printers, and similar devices are buffered. Writing a driver that uses direct I/O is somewhat more involved than writing one that uses buffered I/O. Direct I/O devices are almost certain to use DMA, but plenty of buffered devices use it too - even many terminal interfaces. -- Jerry ------