Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What is a plastic semaphore?
What is a plastic semaphore?
Semaphore is the knowledge of the operating system.

Integer semaphore: The semaphore is an integer.

The data structure of semaphore is a value and a pointer, and the pointer points to the next process waiting for semaphore. The value of semaphore is related to the usage of corresponding resources. When its value is greater than 0, it indicates the number of currently available resources; When its value is less than 0, its absolute value represents the number of processes waiting to use resources. Note that the value of the semaphore can only be changed by PV operation.