"Classic Process sync Problem"

Source: Internet
Author: User

1. Producer-Consumer issues
There is a group of producer processes that produce products and provide these products to consumer processes to consume. To enable producer processes and consumer processes to execute concurrently,
A buffer pool with n buffers is set between the two, and the producer process puts the products it produces into a buffer; the consumer process can be
A buffer to take away the product to consume. Although all producer and consumer processes are run asynchronously, they must remain
synchronization, which does not allow the consumer process to go to an empty buffer to fetch the product, nor does it allow the producer process to a buffer that has been fully loaded and has not been taken away
Products in the market.
2. The question of the Philosopher's meal
There are five philosophers sharing a round table, sitting in the surrounding five chairs, with five bowls and five chopsticks on the round table, alternating with their lifestyles
To think and dine. Usually, a philosopher thinks, and when he is hungry, he tries to fetch the chopsticks closest to him, only when he gets two chopsticks.
To dine. After dinner, put down the chopsticks and continue to think.
3. Reader-Writer questions
A data file or record can be shared by more than one process, and we refer to a process that only requires reading the file as a "reader process", and other processes are called "write processes."
Allows multiple processes to read a shared object at the same time because the read operation does not clutter the data file. However, a write process and other reader processes or writer are not allowed
The process accesses the shared object at the same time.

"Classic Process sync Problem"

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.