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

What are local and global page replacements?

4 Answers   TCS, Wipro,


What is meant by arm-stickiness?

1 Answers   Infosys,


what is the difference b/w window 2000 server and window 2003 server ?

2 Answers   Unisys,


when a process is created using fork(). what is shared between parent process and child process. 1.Heap 2. stack 3. shared memory segments 4. I/O handles

2 Answers   nvidia, Hyderabad Central University,


What is the difference between microprocessor and microcontroller?

64 Answers   National Instruments, Samsung, Infosys, HCL, IBM, Alcatel,






Difference between Primary storage and secondary storage?

3 Answers  


What is time-stamping?

1 Answers  


What is busy waiting?

3 Answers  


Give a brief discussion on schedulers & Dispatchers with respect to process management.

2 Answers  


What is difference b/w general semaphore and binary semaphore?

3 Answers  


Why paging is used?

2 Answers  


Stable storage cannot be implemented. (A) Explain why it cannot be. (B) Explain how database system deal with database applications

0 Answers  






Categories