X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Charles Sandmann Newsgroups: comp.os.msdos.djgpp Subject: DMA and PIO (was Re: Problems with timer interrupt chaining and SmartDrv) Date: Sun, 19 Dec 2004 16:12:26 CST Organization: Rice University, Houston, TX Lines: 22 Message-ID: <41c5fcca.sandmann@clio.rice.edu> References: <01c4e368$Blat.v2.2.2$592f6a00 AT zahav DOT net DOT il> NNTP-Posting-Host: clio.rice.edu X-Trace: joe.rice.edu 1103494518 9682 128.42.105.3 (19 Dec 2004 22:15:18 GMT) X-Complaints-To: abuse AT rice DOT edu NNTP-Posting-Date: Sun, 19 Dec 2004 22:15:18 +0000 (UTC) X-NewsEditor: ED-1.5.9 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > It sounds like you are assuming that DMA is faster than PIO. That was > so once, long ago, mainly with floppy drives, but is no longer true > since ATA interfaces conquered the PC land. Nowadays, PIO is faster > than DMA, so AFAIK DMA is no longer used in disk I/O. DMA (particularly the Ultra DMA methods) is much faster than PIO, and much more friendly on CPU cycles. Under Windows 2000 and XP you have control of this (Device Manager, IDE controllers, Primary IDE Channel, Advanced). DMA is default, except on some CDs and DVDs. You can quite often speed up those device a lot by choosing DMA. Try this test. Open task manager so you can monitor CPU usage. Using the default DMA, read a 500MB file from disk. Using a modern disk this should take less than 10 seconds and use no more than 2-3 percent of the CPU. Now try forcing this to PIO only. Reboot the machine, repeat the test. You can then see how much CPU (probably 100% CPU bound) and how quickly it can read the file. There is a DMA TSR available for DOS to speed up disk access for big files, specifically to fix the problem that the BIOS is much slower than the disk capabilties.