what is semaphore?
Printable View
what is semaphore?
Each process executes in an area called critical region. Operating system allows one process to execute at a time in critical region. For this purpose operating system use a binary variable called [B]Semaphore[/B] to check if any process is getting executed in critical region. When one process starts execution, OS set the [B]Semaphore[/B] value to 1 when there is no process in critical region then [B]Semaphore[/B] value is set to 0.