[comp.sys.amiga] Hard disks, DMA vs Non-DMA

GORRIEDE@UREGINA1.BITNET (Dennis Robert Gorrie) (11/18/89)

     There are many hardware details that make the explanation of DMA vs
non-DMA very diffucult.  All of the advertising hype seems to just confuse
the matter even more.

      What I am looking for is a very detailed view of the whole DMA process
vs a detailed view of the non-DMA process.  I wish somebody had system
flow charts of this kind of stuff.  Perhaps, to get a better understanding,
I will try and draw one myself.

(I can hear all the 'REAL' programmers out there saying 'What?  we don't
need no stink'n flow charts!')    :-)

farren@well.UUCP (Mike Farren) (11/30/89)

In article <8911171901.AA05286@jade.berkeley.edu> GORRIEDE@UREGINA1.BITNET (Dennis Robert Gorrie) writes:
>
>     There are many hardware details that make the explanation of DMA vs
>non-DMA very diffucult.
>      What I am looking for is a very detailed view of the whole DMA process
>vs a detailed view of the non-DMA process.

It's not REALLY that difficult.  And a "detailed" view isn't really needed.
A DMA device, very simply, is one which can take control of the system's
address and data buses and transfer data between itself and system memory
without requiring CPU assistance.  The sequence is pretty straightforward:
the DMA device requests control of the system bus.  At some point, the
system hardware grants that request (on the Amiga, this can be immediately,
or after the custom chips are done with their accesses), and the system
busses are turned over to the DMA device.  The DMA device then transfers
data (however much is necessary), returning control of the busses to the
system when it is finished.

A non-DMA device simply signals the processor when data is ready, and the
processor then does the data transfer, using standard memory reference
instructions.  A non-DMA device will not take over control of the system
busses.

Each method has advantages and disadvantages.  The chief advantage of DMA
is that, if the system has been designed to allow it, it can transfer data
without any impact on the normal CPU operation whatsoever.  On the Amiga,
this is usually the case, although in hi-res video modes with four bitplanes,
the custom chips (which have priority) control the busses for so much of
the time that other DMA devices can slow WAY down - as evidenced by the
abysmal performance of the Commodore 2090 hard disk controller in such
situations.  The disadvantage of DMA controllers is their complexity and
cost, mostly, although the DMA contention problem described above is also
important.  Non-DMA devices are simpler, generally, and can provide
equivalent performance (especially if you've got a high-speed processor,
such as a 68020), and therefore somewhat cheaper.  Their disadvantage is
that, regardless of the speed of the processor, it's still spending time
doing data transfer that might otherwise be of use doing something else.

Which is best?  Damned if I know.  Depends on too many things for any
simple answer.  I have a DMA controller (the afore-mentioned 2090), and
am, in general, quite happy with it.  Your mileage WILL vary.  Check 'em
out, and pick one that seems to do what you want it to, and do it well.
Given that, what difference does it make, really?
-- 
Mike Farren 				     farren@well.sf.ca.usa