RMALOUF@SBCCMAIL.BITNET.UUCP (01/29/87)
State University of New York at Stony Brook Stony Brook, NY 11794-5000 Robert Malouf Marine Sciences 28-Jan-1987 04:25pm EST FROM: RMALOUF TO: Remote Addressee ( _INFO-VAX@SRI-KL.ARPA ) SUBJECT: BIO's vs. DIO's Hello, I understand the glossary definitions of Direct and Buffered I/O's, but what do they mean in real life? We are trying to set up a system of monetary rates here, but we don't really understand what generates a DIO and what generates a BIO. Could anybody explain what these counts REALLY mean, as far as actual operations are concerned? Thanks in advance, Rob Malouf RMALOUF@SBCCMAIL.BITNET
RMALOUF@SBCCMAIL.BITNET.UUCP (01/29/87)
State University of New York at Stony Brook Stony Brook, NY 11794-5000 Robert Malouf Marine Sciences 29-Jan-1987 12:06pm EST FROM: RMALOUF TO: Remote Addressee ( _INFO-VAX@SRI-KL.ARPA ) SUBJECT: BIO's vs. DIO's Hello, I understand the glossary definitions of Direct and Buffered I/O's, but what do they mean in real life? We are trying to set up a system of monetary rates here, but we don't really understand what generates a DIO and what generates a BIO. Could anybody explain what these counts REALLY mean, as far as actual operations are concerned? Thanks in advance, Rob Malouf RMALOUF@SBCCMAIL.BITNET
carl@CITHEX.CALTECH.EDU.UUCP (01/30/87)
I may be mistaken, but my understanding of the distinction is that whenever data is actually read from or written to a device, you're talking about direct I/O; when you issue a call to $QIO(W) that transfers data to or from a buffer (whether or not it entails actual I/O to a device), that's buffered I/O. Both types involve the overhead of the call to $QIO(W), but only direct I/O actually has any cost in terms of communication with the device.
sasaki@HARVARD.HARVARD.EDU.UUCP (01/30/87)
This is easy. The difference between direct i/o and buffered i/o is that direct i/o goes directly from the device into your address space. Data in a buffered i/o goes into a system buffer, which is then copied into your address space. Reverse the above for write operations. From a practical point of view, disk i/o is direct (tapes too), while terminal i/o is buffered. ---------------- Marty Sasaki uucp: harvard!sasaki Ziff Davis Technical Information Co. arpa: sasaki@harvard.harvard.edu 80 Blanchard Road bitnet: sasaki@harvunxh Burlington, MA 01803 phone: 617-273-5500
ted@cgl.ucsf.edu@blia.UUCP (01/30/87)
In article <8701291247.AA11373@ucbvax.Berkeley.EDU>, RMALOUF@SBCCMAIL.BITNET writes: > [question on direct i/o's vs buffered i/o's] Each device driver specifies whether it does direct or buffered i/o's. Direct i/o's occur when the driver sets up a device DMA directly into or out of the user's buffer. This produces a low-CPU-overhead transfer but the I/O must complete quickly because the user's pages are locked in physical memory and Unibus mapping registers are allocated (on Unibus devices). Disks and tapes generally do direct i/o. Buffered i/o's have the executive copy the user's buffer to or from non- paged pool and the driver does i/o to or from this buffer. There is the increased overhead of copying the buffer but this allows the driver to modify the data (for example, put protocol headers on for ethernet devices), do i/o to slow devices without locking the user's buffer, or even do non-DMA i/o. Terminals, line-printers, and network devices are good examples of devices using buffered i/o. For normal users, disk and tape i/o is generally direct and terminal i/o is generally buffered. Hope this helps. =============================================================================== Ted Marshall Britton Lee, Inc. p-mail: 14600 Winchester Blvd, Los Gatos, Ca 95030 voice: (408)378-7000 uucp: ...!ucbvax!mtxinu!blia!ted ARPA: mtxinu!blia!ted@Berkeley.EDU disclaimer: These opinions are my own and may not reflect those of my employer; I leave them alone and they leave me alone. fortune for today: Green light in A.M. for new projects. Red light in P.M. for traffic tickets.