Direct Memory Access

Direct Memory Access (DMA) is a concept that allows a device to transfer data to or from system memory without the involvement of the CPU, leaving it free to perform other tasks, which has a significant impact on overall system performance, as I/O transfers are typically very slow relative to the CPU. DMA also allows for so-called zero-copy, in that we can transfer memory from a user space buffer directly to a device without any memory copies. PCI doesn't have a central DMA controller, but uses the concept of bus mastering, which allows the device to take control over the bus and initiate transfers. The IOPCIDevice class offers the setBusMasterEnable() method, which gives the device permission to act as a bus master. DMA ...

Get OS X and iOS Kernel Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.