In what cases CPU direct transfer works faster than DMA? In what cases DMA transfer works faster than CPU direct transfer?

北城余情 提交于 2019-12-12 04:48:27

问题


I'm a little bit confused about the cases in which CPU can direct transfer the data faster than DMA(Direct Memory Access Controller)? and vice-versa?

Thanks


回答1:


1 - CPU faster than DMA

CPU is idle. No task is running except yours (or your task has highest priority and the scheduling is priority scheduling) and Core interrupt is disabled (This will even stop the scheduling as there will be no timer tick interrupt). In that case, cpu transfer will be definitely faster than DMA as generally CPU gets faster clock than the Bus(AHB in ARM) clock which provides clock to DMA.

2 - DMA faster than CPU

In Normal system where there are always a few process running and interrupts are enabled which can cause delay as CPU will be running ISR frequently and will be jumping process context due to scheduling.



来源:https://stackoverflow.com/questions/43436562/in-what-cases-cpu-direct-transfer-works-faster-than-dma-in-what-cases-dma-trans

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!