Plumbing some knowledge

Source: Internet
Author: User

1.

Reference: http://bbs.chinaunix.net/thread-3699479-1-1.html

1.1, the second floor said:

Write that is less than or equal to pipe_buf bytes must be an atomic operation that exceeds this value.

POSIX Specifies that PIPE_BUF is at least 512.

1.2, nine floor said:

Pipe_buf This value can be viewed with ulimit-p. The default for Linux is 8. But the unit here is not a byte here is the unit 512bytes. So the default size is 4096. As long as you don't write more than that, he must be an atom.

2.

DuplicateHandle

Reference: http://www.cnblogs.com/staring-hxs/p/3576927.html

3.

Reference: http://m.blog.csdn.net/blog/mituan2008/7415744

When the pipeline (blocked read and write) is full, it will block to the writing end;

Only read the pipe to read the empty (the length of the pipe on my machine is 4K) before continuing to write the pipeline, I used to think that, as long as the read-end read a byte, the writing end can continue to write.

There is: I started a crazy writing pipeline, can write 64K instead of the logo on the machine (I use Ulimit-p to see is 4K) 4 K. I don't know what's going on here.

ZC: Personal understanding, once full, you need to read empty to continue to write. Without a full fill, there is no blocking. I have not verified ...

N

Plumbing some knowledge

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.