I am asking this question because I'm trying to get the notation to stick in my head. My lecturer said that V and P are the first letters of the dutch words for signal and wait, but this is not true.
Does anyone know what words V and P abbreviate or did Dijkstra just pick his favorite two letters?
● P semaphore function signals that the task requires a resource and if not available waits for it. ● V semaphore function signals which the task passes to the OS that the resource is now free for the other users.
The value of the semaphore S is the number of units of the resource that are currently available. The P operation wastes time or sleeps until a resource protected by the semaphore becomes available, at which time the resource is immediately claimed.
1 Answer. The explanation is: None.
Binary semaphores are sometimes easier to implement. than counting semaphores.
From Wikipedia's Semaphore (programming) article and a copy of Dijkstra's work:
P has the Proberen... (try) term in front of the meaningful verlagen (decrement) term because the Dutch words for increment and decrement both start with "V". Dijkstra added the "try to" words in front of the meaningful "decrement" term so that there would be a simpler way of distinguishing between the two functions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With