Tuesday, December 4, 2012

Zero copy mechanism

"Zero-copy" describes computer operations in which the CPU does not perform the task of copying data from one memory area to another saving significant processing power and memory. It also saves the time consuming mode switches between user space and kernel space.




Zero-copy protocols are especially important for high-speed networks in which the capacity of a network link approaches or exceeds the CPU's processing capacity. In such a case the CPU spends nearly all of its time copying transferred data, and thus becomes a bottleneck which limits the communication rate to below the link's capacity.

Techniques for creating zero-copy software include the use of DMA-based copying and memory-mapping through an MMU.


Several operating systems support zero-copying of files through specific APIs foe example Windows.
Linux supports zero copy through system calls such as sys/socket.h's sendfile, sendfile64, and splice.

The information above has been taken from Wikipedia.





No comments:

Post a Comment