Chaitu Tech Bits

what is semaphore ? what is the advantage of semaphore

Wednesday, December 15, 2010

semaphore is a correct way which help operating system to share its source between processors, you can fined more information in professional blogs in operating systems field.



Semaphore is a synchronization tool to solve critical-section problem, can be used to control access to the critical section for a process or thread. The main disadvantage (same of mutual-exclusion) is require busy waiting. It will create problems in a multiprogramming system, where a single CPU is shared among many processes.
Busy waiting wastes CPU cycles.
Deadlock is a situation when two or more processes are waiting indefinitely for an event that can be caused by only one of the waiting processes. The implementation of a semaphore with a waiting queue may result in this situation.

Share/Bookmark

Related Posts Plugin for WordPress, Blogger...