answersLogoWhite

0

Semaphores are devices used to help with synchronization. If multiple processes share a common resource, they need a way to be able to use that resource without disrupting each other. You want each process to be able to read from and write to that resource uninterrupted.

A semaphore will either allow or disallow access to the resource, depending on how it is set up. One example setup would be a semaphore which allowed any number of processes to read from the resource, but only one could ever be in the process of writing to that resource at a time.

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Semaphore in operating system?

Semaphore data type used to maneuver access to multiple sources. The sources usually pertain to parallel programming, or multi user networks.


What is the name of the comminication system that uses flags?

semaphore


What were the historical digital system?

morse code braille semaphore


Usage of semaphor in operating system?

When several process are running at a time in the operating system there is always a chance of hanging, semaphor helps out OS system in solving out such problem. Semaphore is just like set of rules that help out multi-process running on a OS to use a resource.The process management under the OS is actually made on the basis of semaphor only.


In semaphore technique instead of while loop why for loop is used over there also what is the reason behind that ref-given in silberschatz of operating system concepts sixth edition book?

You should ask Silberschatz himself about that.


What is the name given to the process of signaling with two flags?

Semaphore is one such system.


When was semaphore used?

Semaphore was invented in 1648 by Robert Hooke. The first use was by Claude Chappe in 1792 in France. The system conveyed messages from city to city by relay stations or towers.


What is the name of the system where people on boats us their arms to talk with other boats?

semaphore


Is semaphore a collective noun?

No, the noun semaphore is a common noun; a word for a system of signaling with flags; a word for a thing.A collective noun is a word for groups of people or things, such as a crowd of people or a bunch of bananas.


How many semaphore flag methods are there?

there are 28 semaphore flag methods.


Is Windows 95 an operating system or an operating environment?

XP is a complete operating system, not simply an operating environment.


What is the difference between MUTEX and Semaphore?

From wikipedia:"A mutex is a binary semaphore, usually including extra features like ownership or priority inversion protection. The differences between mutexes and semaphores are operating system dependent. Mutexes are meant to be used for mutual exclusion only and binary semaphores are meant to be used for event notification and mutual exclusion."They also have a good example as to the use of a semaphore:"A thread named A needs information from two databases before it can proceed. Access to these databases is controlled by two separate threads B, C. These two threads have a message-processing loop; anybody needing to use one of the databases posts a message into the corresponding thread's message queue. Thread A initializes a semaphore S with init(S,-1). A then posts a data request, including a pointer to the semaphore S, to both B and C. Then A calls P(S), which blocks. The other two threads meanwhile take their time obtaining the information; when each thread finishes obtaining the information, it calls V(S) on the passed semaphore. Only after both threads have completed will the semaphore's value be positive and A be able to continue. A semaphore used in this way is called a 'counting semaphore.'"Basically think of a semaphore as a lock that allows multiple threads to wait in line for the resource to be free. Usually they will block and the semaphore will wake them up when it is their turn.