Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!bcm!dimacs.rutgers.edu!rutgers!cbmvax!jesup From: jesup@cbmvax.commodore.com (Randell Jesup) Newsgroups: comp.periphs.scsi Subject: Re: DOS/SCSI DMA? Message-ID: <20049@cbmvax.commodore.com> Date: 22 Mar 91 19:12:06 GMT References: <27080001@hplred.HP.COM> <2154@atlas.tegra.COM> Reply-To: jesup@cbmvax.commodore.com (Randell Jesup) Organization: Commodore, West Chester, PA Lines: 37 In article sph@logitek.co.uk (Stephen Hope) writes: >vail@tegra.COM (Johnathan Vail) writes: >>The DMA on an AT is much slower than the equivelent loop in software. >>The DMA is there mostly for the refresh, I believe. If DMA is used >>then the bios for the disk would have the "driver" and DOS would still >>wait for the IO to complete. ... >>What *else* would a PC running DOS be doing? DOS is not multitasking >>and if a program is waiting for data from the disk then it waits for >>that data. >This is not strictly true. DMA is not as fast as an I/O loop, but the >latency between a request for transfer and response for DMA is on the >order of 1uS or less. I/O loop transfers are only "better" for peripherals >with a buffer (so that latency is less important), and where transfers >are block oriented, ie each transfer moves a large amount of data. For >example, older LAN cards with no buffering (eg 3Com 3C501) only work well >if DMA is used - Yes I know this is an opinion, so no flames. The only reason DMA isn't as fast (or is no faster) than the CPU on an AT-type machine is that the DMA is normally not bus-mastering DMA (it uses those silly programmed DMA-things on the motherboard). Bus-mastering DMA should always be faster than the processor (given reasonable design), since the data need only cross the bus once instead of twice with a processor loop (read data, stuff in memory - ignoring instruction overhead). Of course on a single-tasking machine it might not make any difference if the processor can read data and store it faster than it comes off the device. DMA is a BIG win with a multitasking machine, since the processor often does have better things to do than poll I/O ports. -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com BIX: rjesup The compiler runs Like a swift-flowing river I wait in silence. (From "The Zen of Programming") ;-)