What is the original meaning of P and V operations in a context of a semaphore?
Asked Answered
N

4

23

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?

Nicety answered 13/4, 2015 at 13:10 Comment(3)
The relevant wikipedia page (en.wikipedia.org/wiki/…) has a section called Function name etymology. Short explanation: There are lots of people who don't use English.Ejaculate
@Bill: Not sure if they named P and V because of not everybody use English - because anyhow computer's language is the English, and all programming languages are in English... or at least most of them - not sure if there is any written or use other languages. So someone that has reach to the level of learning/studying the semaphores wouldn't stuck on the naming of signal/wait and would need a P and V to understand/make use of them. That wouldn't make much sense.Apposite
@Apposite "Computer's language is the English." Today's prevalence of English is just the result of a long-term shake-out. Things were different in the 1960s, when Dijkstra wrote his paper. For example, ALGOL 68 was designed with internationalization in mind. See also: Non-English-based programming languages. You may like the fact there are even Greek programming languages.Doorpost
S
44

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

Surbeck answered 13/4, 2015 at 13:16 Comment(1)
"Probeer te verlagen" is "try to decrease". "Verhogen" is increase.Huynh
P
7

@Kris answer is just partially right.

V stands for 'Verhoog' and P stands for 'Prolaag', not 'Probeer' as cited here.

Verhoog can be translated as 'increasing'. Decreasing would be 'Verlaag', but for better distinction between the letters Dijkstra invented the word 'Prolaag'.

See the naming in the original paper.

Prosaism answered 31/5, 2020 at 9:4 Comment(2)
This is indeed true, I'm dutch and my professor told me he only says Probeer to prevent students asking the same question every week on the meaning of Prolagg :DPretentious
Good catch on "Prolaag".Doctor
A
2

V stands for signal and P stands for wait.

You can check the wiki for details.

enter image description here

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.

Apocalypse answered 13/4, 2015 at 13:12 Comment(1)
Not sure if they named P and V because of not everybody use English - because anyhow computer's language is the English, and all programming languages are in English... or at least most of them - not sure if there is any written or use other languages. So someone that has reach to the level of learning/studying the semaphores wouldn't stuck on the naming of signal/wait and would need a P and V to understand/make use of them.Apposite
M
0
  • V stands for 'Verhoog', which can be translated as "increment".

  • P stands for 'Prolaag', a madeup Dutch word of 'probeer verlaag', which can be translated as "try to decrease".

Source: C# 4.0 Unleashed https://books.google.es/books?id=TDEsRmRMPNkC&pg=PT2060&lpg=PT2060&dq=prolaag+in+dutch&source=bl&ots=EnxjFiuZTA&sig=ACfU3U0zxBQju4Ob6Wk449Z7XZK_NH4ZSA&hl=es-419&sa=X&ved=2ahUKEwj0lq3FhqX2AhXXhf0HHTqPDbkQ6AF6BAgDEAM

Mealworm answered 1/3, 2022 at 13:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.