Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you write zero copy in java? What are the main differences

I was reading about how you can use the java nio library to take advantage of file transfer/buffering at the O/S level which is called 'zero copy'.

What are the differences in how you create/write to files then? Are there any drawbacks to using zero-copy?

like image 423
loyalflow Avatar asked May 11 '12 15:05

loyalflow


People also ask

What is zero copy in Java?

"Zero-copy" describes computer operations in which the CPU does not perform the task of copying data from one memory area to another or in which unnecessary data copies are avoided.

What do you mean by zero copy property in a distributed system give an example?

The concept of copying data from one peripheral to another peripheral by kernel, without switching back to user-process is termed as zero copy. As you may know, kernels offer system calls for user-space processes to interact with hardware or to get things done from the kernel.


1 Answers

zero copy means that your program will not transfer the data from the kernel space to the user space and so on. this is faster nice article can be found here: http://www.ibm.com/developerworks/library/j-zerocopy/

like image 118
miks Avatar answered Sep 21 '22 01:09

miks