What are counting semaphores?

Answer Posted / kiruthiga

Semaphore is a nonnegative integer count. Semaphores are
typically used to coordinate access to resources, with the
semaphore count initialized to the number of free
resources. Threads then atomically increment the count when
resources are added and atomically decrement the count when
resources are removed.

When the semaphore count becomes zero, no more resources
are present. Threads that try to decrement the semaphore
when the count is zero block until the count becomes
greater than zero.

Is This Answer Correct ?    7 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many gb of ram can 64 bit use?

781


Is 64bit faster than 32?

718


Can two different ram speed modules be used together?

759


Can you have 2 operating systems on one computer?

749


When is a system in a safe state?

823


List the possible threads a thread can have?

746


Can you list the coffman's conditions that lead to a deadlock?

859


Define max, min heap and search time of heap.

862


Describe main memory and secondary memory storage in brief.

803


What is a critical section?

848


How do I sort files?

799


What are starvation and aging?

859


How do I enable macros?

714


What are the advantage of using threads?

798


How do I copy a full file path?

770