Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Zero-copy exist in Windows OS?

Reading this zero copy article,

Does Zero-copy exist in Windows OS (server 2003, 2008, 2008 R2) ?

like image 522
Lydon Ch Avatar asked Aug 17 '11 08:08

Lydon Ch


People also ask

When to use zero copy?

Zero-copy programming techniques can be used when exchanging data within a user space process (i.e. between two or more threads, etc.)

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

Yes, it is supported via the TransmitFile API.

I'm pretty sure that IIS uses this as well.

Whether or not this method does real zero-copy (i.e. doesn't even copy from the file buffers to the socket buffers) is not explicitly mentioned in the documentation. But given the fact that this method is defined in a way that definitely makes it possible, I'd be highly surprised if this were not the case.

The closest the documentation comes to stating it clearly is this paragraph:

[...] TransmitFile achieves its performance gains by sending data directly from the file cache.

like image 110
Joachim Sauer Avatar answered Sep 21 '22 00:09

Joachim Sauer