What are counting semaphores?

Answers were Sorted based on User's Feedback



What are counting semaphores?..

Answer / swetcha

Counting semaphore -Locks a shared resource against
simultaneous access by multiple threads
A counting semaphore is a generalization of a mutex
semaphore that locks a shared resource against simultaneous
access by multiple threads. All resource allocation
functions, such as wait() and post() , take an optional
parameter defining the number of resources to allocate or
deallocate.

Is This Answer Correct ?    11 Yes 5 No

What are counting semaphores?..

Answer / 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

What are counting semaphores?..

Answer / arshiya

Counting semaphores are a synchronization primitive that
allow threads to wait until an event has occurred. The event
may be generated by a producer thread, or by a DSR in
response to a hardware interrupt.

Is This Answer Correct ?    8 Yes 8 No

What are counting semaphores?..

Answer / nagi

Binary semaphore or mutex is used for single resouce
locking.where as counting semaphone is a variable counter
whose value will be initilised to number of resources
present.one can acees the resource if semaphore value is
greater than zero.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Operating Systems General Concepts Interview Questions

Describe Inter Machine Communication?

0 Answers   MaxSolPro,


How do you tell if your computer is 32 or 64 bit?

0 Answers  


Explain the stipulations of c2 level security?

0 Answers  


Suppose if we have a variable 'I' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?

0 Answers  


What is the difference between hard and soft real-time systems?

4 Answers  






Who was the discover Mouse & When.?

4 Answers  


Different types of real-time scheduling?

0 Answers  


Give a brief description of the following terms: a) Play head b) Symbol c) Tweening d) ActionScript e) Frame rate f) Library panel g) Masking h) Context – sensitive Property Inspector i) Bandwidth Profiler j) Frame Label

0 Answers  


what is Compiler?

4 Answers   Aegis, AGES, Agies,


How can I tell what devices are connected to my usb?

0 Answers  


Explain Page Segmentation.

0 Answers   Genpact,


Describe the Operating System concept of Fragmentation

0 Answers   Tech Mahindra,


Categories