信息系统项目管理师2015年9月28日作业
2015-09-29 20:26
309 查看
linux提供两种方式,来保证使用dma时,内存和硬件cache的一致性:
1.Coherent DMA mapping
When using this mapping, the kernel ensures that there will be no cache coherency problems between the memory and the hardware device; this means that every write operation performed by the CPU on a RAM location is immediately visible to the hardware device, and vice versa. This type of mapping is also called "synchronous" or "consistent."
2.Streaming DMA mapping
When using this mapping, the device driver must take care of cache coherency problems by using the proper synchronization helper functions. This type of mapping is also called "asynchronous" or "non-coherent."
说白了,如果采用第一种方式的话,就是由kernel来保证一致性,驱动程序是不用考虑的,这种方法的缺点是
在某些体系结构上,效率很低;如果采用第二种方式的话,那么是有驱动程序来保证一致性的,所以当驱动
要使用dma来进行数据传输时,必须首先检测内存和硬件cache的一致性,linux提供了这类方法。
1.Coherent DMA mapping
When using this mapping, the kernel ensures that there will be no cache coherency problems between the memory and the hardware device; this means that every write operation performed by the CPU on a RAM location is immediately visible to the hardware device, and vice versa. This type of mapping is also called "synchronous" or "consistent."
2.Streaming DMA mapping
When using this mapping, the device driver must take care of cache coherency problems by using the proper synchronization helper functions. This type of mapping is also called "asynchronous" or "non-coherent."
说白了,如果采用第一种方式的话,就是由kernel来保证一致性,驱动程序是不用考虑的,这种方法的缺点是
在某些体系结构上,效率很低;如果采用第二种方式的话,那么是有驱动程序来保证一致性的,所以当驱动
要使用dma来进行数据传输时,必须首先检测内存和硬件cache的一致性,linux提供了这类方法。
相关文章推荐
- The Pilots Brothers' refrigerator(dfs)
- hdu 5454 Excited Database(线段树)
- 基于zbus的MySQL透明代理(<100行)
- JSP中forward和redirect的区别
- TCP/IP简介,转载自实验楼
- Add and Search Word - Data structure design
- HDU5492 Find a path DP
- 编程之美
- 前端开发工程师应该关注什么?
- 导航地图4_地理编码和反编码
- Arduino debug 实时单步调试.
- DevOps实战:Graphite监控上手指南
- hdu 5491 The Next(ICPC合肥赛)
- 2016华为上机题二(数字频率)
- 设置默认登陆账户
- mysql同一个表和不同表的一列复制到另一列的方法
- Crazy English on the road
- Jquery datatable jsonp 显示后台json数据
- 成员对象
- 第一次上台讲课的感受