Semaphores: A Definition

This lesson covers the basics of semaphores and its two main routines.

We'll cover the following...

A semaphore is an object with an integer value that we can manipulate with two routines; in the POSIX standard, these routines are sem_wait() and sem_post()Historically, sem_wait() was called P() by Dijkstra and sem_post() called V(). These shortened forms come from Dutch words; interestingly, which Dutch words they supposedly derive from has changed over time. Originally, P() came from “passering” (to pass) and V() from “vrijgave” (release); later, Dijkstra wrote P() was from “prolaag”, a contraction of “probeer” (Dutch for “try”) and “verlaag” (“decrease”), and V() from “verhoog” which means “increase”. Sometimes, ...

Access this course and 1400+ top-rated courses and projects.