OnlineWoerterBuecher.de
Internes

Lexikon


semaphore


The classic method for restricting access to shared resources (e.g. storage) in a multi-processing environment. They were invented by Dijkstra and first used in T.H.E operating system. A semaphore is a protected variable (or {abstract data type}) which can only be accessed using the following operations: P(s) Semaphore s { while (s == 0) /* wait until s>0 */ s = s-1 } V(s) Semaphore s { s = s+1 } Init(s, v) Semaphore s Int v { s = v } P and V stand for Dutch "Proberen", to test, and "Verhogen", to increment. The value of a semaphore is the number of units of the resource which are free (if there is only one resource a "binary semaphore" with values 0 or 1 is used). The P operation busy-waits (or maybe sleeps) until a resource is available whereupon it immediately claims one. V is the inverse, it simply makes a resource available again after the process has finished using it. Init is only used to initialise the semaphore before any requests are made. The P and V operations must be indivisible, i.e. no other process can access the semaphore during the their execution. To avoid busy-waiting, a semaphore may have an associated queue of processes (usually a FIFO). If a process does a P on a semaphore which is zero the process is added to the semaphore' s queue. When another process increments the semaphore by doing a V and there are tasks on the queue, one is taken off and resumed. (1995-02-01)

In addition suitable contents:
[ 2 ] [ = ] [ abstract data type ] [ ad ] [ af ] [ ag ] [ ai ] [ al ] [ am ] [ an ] [ ar ] [ arc ] [ as ] [ at ] [ av ] [ b ] [ be ] [ bi ] [ binary ] [ bs ] [ bus ] [ busy-wait ] [ by ] [ ca ] [ cc ] [ ch ] [ ci ] [ cl ] [ class ] [ classic ] [ cr ] [ cu ] [ D ] [ data ] [ data type ] [ dd ] [ de ] [ do ] [ du ] [ E ] [ ec ] [ ed ] [ ee ] [ environment ] [ er ] [ era ] [ es ] [ et ] [ exec ] [ execution ] [ fi ] [ FIFO ] [ file ] [ fo ] [ for ] [ fr ] [ free ] [ ga ] [ ge ] [ gen ] [ gr ] [ h ] [ hog ] [ hr ] [ id ] [ il ] [ in ] [ inc ] [ initialise ] [ inverse ] [ io ] [ ir ] [ iron ] [ is ] [ it ] [ ke ] [ ken ] [ la ] [ Lex ] [ li ] [ lt ] [ lu ] [ ly ] [ ma ] [ map ] [ method ] [ mm ] [ mo ] [ mod ] [ module ] [ mp ] [ ms ] [ mu ] [ na ] [ nc ] [ ne ] [ ng ] [ ni ] [ nl ] [ no ] [ ns ] [ nu ] [ O ] [ op ] [ operating system ] [ pe ] [ ph ] [ pl ] [ ply ] [ pr ] [ Probe ] [ process ] [ processing ] [ program ] [ programming ] [ query ] [ ques ] [ queue ] [ rc ] [ re ] [ ro ] [ S ] [ se ] [ sh ] [ shar ] [ si ] [ sk ] [ sl ] [ sleep ] [ so ] [ source ] [ st ] [ storage ] [ strict ] [ su ] [ sum ] [ sy ] [ system ] [ T ] [ ] [ tc ] [ test ] [ th ] [ T.H.E ] [ to ] [ tr ] [ type ] [ ua ] [ um ] [ up ] [ us ] [ V ] [ va ] [ value ] [ var ] [ variable ] [ ve ] [ vi ] [ while ] [ win ] [ zero ]






Go Back ]

Free On-line Dictionary of Computing

Copyright © by OnlineWoerterBuecher.de - (7216 Reads)

All logos and trademarks in this site are property of their respective owner.

Page Generation in 0.0983 Seconds, with 17 Database-Queries
Zurück zur Startseite