Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Semaphore (programming)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Operation names== The canonical names V and P come from the initials of [[Dutch language|Dutch]] words. V is generally explained as ''verhogen'' ("increase"). Several explanations have been offered for P, including ''proberen'' ("to test" or "to try"),<ref>{{citation |last1 = Silberschatz |first1 = Abraham | last2 = Galvin | first2 = Peter Baer | last3 = Gagne | first3 = Greg | edition = 8th | isbn = 978-0-470-12872-5 | publisher = John Wiley & Sons. Inc | title = Operating System Concepts | year = 2008 |page=234}}</ref> ''passeren'' ("pass"), and ''pakken'' ("grab"). Dijkstra's earliest paper on the subject<ref name="ReferenceA"/> gives ''passering'' ("passing") as the meaning for ''P'', and ''vrijgave'' ("release") as the meaning for V. It also mentions that the terminology is taken from that used in railroad signals. Dijkstra subsequently wrote that he intended ''P'' to stand for ''prolaag'',<ref>{{Cite EWD|74}}</ref> short for ''probeer te verlagen'', literally "try to reduce", or to parallel the terms used in the other case, "try to decrease".<ref>{{Cite EWD|51| MULTIPROGAMMERING EN DE X8}} (in [[Dutch language|Dutch]])</ref><ref name="try-and">Dijkstra's own translation reads "try-''and''-decrease", although that phrase might be confusing for those unaware of the [http://www.wsu.edu/~brians/errors/try.html colloquial "try-and..."]</ref><ref>[https://lkml.org/lkml/2005/12/19/34 (PATCH 1/19) MUTEX: Introduce simple mutex implementation] Linux Kernel Mailing List, 19 December 2005</ref> In [[ALGOL 68]], the [[Linux kernel]],<ref>[http://www.linuxgrill.com/anonymous/fire/netfilter/kernel-hacking-HOWTO-5.html#ss5.3 Linux Kernel hacking HOWTO] {{Webarchive|url=https://web.archive.org/web/20100528154351/http://www.linuxgrill.com/anonymous/fire/netfilter/kernel-hacking-HOWTO-5.html#ss5.3 |date=2010-05-28 }} LinuxGrill.com</ref> and in some English textbooks, the ''V'' and ''P'' operations are called, respectively, ''up'' and ''down''. In software engineering practice, they are often called ''signal'' and ''wait'',<ref name="plan9">{{cite conference |last1=Mullender |first1=Sape |first2=Russ |last2=Cox |title=Semaphores in Plan 9 |conference=3rd International Workshop on [[Plan 9 from Bell Labs|Plan 9]] |year=2008 |url=http://doc.cat-v.org/plan_9/IWP9/2008/iwp9_proceedings08.pdf#page=62}}</ref> ''release'' and ''acquire''{{r|plan9}} (standard [[Java (programming language)|Java]] library),<ref>{{Javadoc:SE|package=java.util.concurrent|java/util/concurrent|Semaphore}}</ref> or ''post'' and ''pend''. Some texts call them ''vacate'' and ''procure'' to match the original Dutch initials.<ref>{{Cite web|url=http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_2._guide/node036A.html|title=exec.library/Procure|website=amigadev.elowar.com|access-date=2016-09-19}}</ref><ref>{{Cite web|url=http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_2._guide/node0389.html|title=exec.library/Vacate|website=amigadev.elowar.com|access-date=2016-09-19}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)