Open In App

Modes of DMA Transfer

In this article we will try to understand the details associated with the DMA (Direct Memory Access) like what exactly DMA is or how it works and also further we will see various modes of DMA Transfer (like Burst mode and other modes). Before directly jumping into the details associated with the modes of DMA transfer let us first try to understand what exactly DMA is and how does this DMA actually work.

Direct Memory Access (DMA):
DMA basically stands for Direct Memory Access. It is a process which enables data transfer between the Memory and the IO (Input/ Output) device without the need of or you can say without the involvement of CPU during data transfer.



Working of DMA:
Following list of points will describe briefly about DMA and its working as follows.



Modes of DMA Transfer:
Now after getting some brief idea about DMA and its working it’s the time to analyze Modes of DMA Transfer.

Mode-1: 
Burst Mode –

Pros:

Cons:

Percentage of Time CPU remains blocked:
Let time taken to prepare the data be Tx and time taken to transfer the data be Ty. Then percentage of time CPU remains blocked due to DMA is as follows.

Percentage of time CPU remains in blocked state = Ty * 100% / Tx + Ty

Mode-2: 
Cycle Stealing Mode –

Pros:

Cons:

Percentage of Time CPU remains blocked:
Let time taken to prepare data be Tx and time taken to transfer the data be Ty. Then percentage of time CPU remains blocked due to DMA is as follows.

Percentage of time CPU remains in blocked state = Ty * 100% / Tx

Mode-3: 
Interleaving Mode –

Pros:

Cons:

Since, DMA will use System Bus only when CPU is not using it So,

Percentage of time CPU remains in blocked state = 0%

Example: 

Explanation – 

Internal data preparation speed given =          2 MBPs. 
So for preparing 2 MB it takes   ------>           1 second
For preparing 1B it takes           ------->          1 second / 2MB

So now for 16B data preparation it takes ------->1 second  * 16B / 2MB
(after reciprocating Mega will be become micro 

(that is 10^6 will become 10^-6 after reciprocating))
therefore for preparation 16B it takes -------> 8 microseconds

Therefore percentage of time CPU remains blocked in case of 
Cycle Stealing mode = 2 * 100% / 8 = 25% 
Article Tags :