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 works.
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.
Following list of points will describe briefly about DMA and its working as follows.
Now after getting some brief idea about DMA and its working it’s the time to analyze Modes of DMA Transfer.
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
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
Example : Consider a device operating on 2MBPs speed and transferring the data to memory is done using Cycle Stealing mode. It takes 2 microseconds to transfer 16 bytes of data to memory when it is ready or prepared. Then for what percentage of time CPU is blocked due to DMA transfer?
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%
20 videos|86 docs|48 tests
|
20 videos|86 docs|48 tests
|
|
Explore Courses for Computer Science Engineering (CSE) exam
|