ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU-(2020-2021)-1 > student homework > 2018329621265_卢子奕 >
Homework-6 Version 0
👤 Author: by 1224532347qqcom 2020-11-17 06:33:50
The semaphore mechanism uses the pv operation to process the semaphore.

What is a semaphore? The data structure of a semaphore is a value and a pointer, and the pointer points to the next process waiting for the semaphore. The value of the semaphore is related to the usage of the corresponding resource.

1. When its value is greater than 0, it indicates the number of currently available resources;

2. When its value is less than 0, its absolute value indicates the number of processes waiting to use the resource.

Note that the value of the semaphore can only be changed by PV operation.

Please login to reply. Login

Reversion History

Loading...
No reversions found.