What is the difference between Counting and binary semaphore.
What I have seen somewhere is that both can control N number of processes which have requested for a r
The most basic difference between counting and binary semaphore is that:
Strcuture implementation Binary semaphore: int s;
Counting Semaphore: Struct S { int s; Queue q; }
Using the counting semaphore now process once gained the CS(Critical Section) now has to wait for the other to get the CS, so not a single process strave. Each process get a chance for CS.