Deadlock & Concurrency
Algorithms
Lock Variable
TSL Mechanism
Turn Variable
Binary Semaphore
Counting Semaphore
Peterson Solution
Producer & Consumer
Dining Philosopher
Banker's algorithm
Binary Semaphore
Entry Section
while(S==0);
s=s-1;
Critical Section
Exit Section
s=s+1;
Process 1
Process 2
Entry Section
Crititcal section
Exit Section
Semaphore value =
Process in blocked state