Operating Systems (47-60)

Source: Internet
Author: User
Tags semaphore

Process synchronization:

In the multi-channel program system, because of the resource sharing or the process cooperation, it is necessary to coordinate the two restrictive relations by the process mutual exclusion and synchronization mechanism, which indirectly restricts or restricts the process to each other.

In a multi-channel program system, many processes can share various resources, the critical resources can only be used by one process at a time, so the process must be mutually exclusive use of critical resources, each process before entering the critical section, must first apply, after allowing access to

The guidelines that the synchronization mechanism should follow:

Idle let in

Busy is waiting

Limited wait

The right to wait

To resolve mutually exclusive locking mechanisms:

Before the process enters the critical section, the lock variable is used to determine if the critical resource is occupied.

Semaphore mechanism:

Semaphore mechanism is a kind of effective process synchronization tool, which is widely used in single processor and multiprocessor, as well as in computer network.

Operating Systems (47-60)

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.