I don't think the operations on the Buffer Zone need to be mutually exclusive. After all, the mutex semaphores have different in and out pointers. Can they operate on different buffers?

Source: Internet
Author: User
Http://www.cskaoyan.com/thread-6232-1-3.htmlproducer consumer AlgorithmThe problem is that operations on the buffer zone do not need to be mutually exclusive ~ Mutex semaphores in the Tang Zi notebook
After all, they all have different in and out pointers. Can they operate on different buffers? When looking at producer and consumer issues, we need to access critical resources (buffers) at the same time of the process.
Because the CPU stops executing each command, the response is interrupted. therefore, each process may be interrupted when executing a statement. therefore, it is entirely possible for producers and consumers to access the buffer zone at the same time. the buffer zone is an area of memory. at the same time, only one process can access the memory. in this way, there is a mutex between them.

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.