Q1. Does the DMA interrupt the processor everytime?
Yes DMA do interrupt the processor each time it has do data transfer. Frequency of interruption depends on the no of subsequent requests for IO and the mode of DMA operation.
DMA operation modes:
- cycle stealing : in this mode DMA interrupt the processor each time it has a byte data to transfer. This last as per the data count value. So frequent interruption needed to service one IO request.
- burst mode : in this mode, DMA interrupt the processor only one time (per request from the IO ) and does the bulk data transfer.
Q 2 . it uses the cycle while the processor remains unknown of the fact?
Yes DMA uses the processor cycle if processor needs to use the BUS while the BUS is temporarily owned by DMA.
Following extract explains the state of processor while DMA is in action
- from Computer Organization and Architecture: William Stallings
so as per the above paragraph, processor is not suspended until it need to use the BUS.
In a situation where processor need the BUS and it find that DMA is the BUS master , it just wait till it get the bus ownership i.e. remain idle. <--- we can say here that DMA stole a cycle