问题
Does anybody know why semaphore operations are called P and V? Every time I read a chapter on semaphores it says something like the following:
In order for the thread to obtain a resource it executes a P operation. And in order for the thread to release a resource it executes a V operation.
What does P and V stand for? Why they are not called wait and signal?
回答1:
Dijkstra, one of the inventors of semaphores, used P and V. The letters come from the Dutch words Probeer (try) and Verhoog (increment).
See also: https://cs.nyu.edu/~yap/classes/os/resources/origin_of_PV.html
回答2:
V stands for signal and P stands for wait.
You can check the wiki for details.
Why they are not called wait and signal?
I would agree with Bill on this, the most likely reason is that because there are a lot of people who dont use English, so its probably because of that it is not called wait and signal.
来源:https://stackoverflow.com/questions/29606162/what-is-the-original-meaning-of-p-and-v-operations-in-a-context-of-a-semaphore