what is Semaphore and explain with example?, Basic Computer Science

A semaphore is a confined variable whose value can be accessed and changed only by the operations P and V and initialization operation known as ''Semaphoiinitislize''.
• Binary Semaphores can take for granted only the value 0 or the value 1 counting semaphores also described general semaphores can suppose only nonnegative values.

• The P (or wait or sleep or down) operation on semaphores S, assumed as P(S) or wait (S), controls as follows:
• P(S):

IF S > 0
THEN S := S - 1
ELSE (wait on S)

The V (or signal or wakeup or up) process on semaphore S, written as V(S) or signal (S), controls as follows:
V(S): IF (one or additional process are waiting on S)
THEN (let one of these processes proceed)
ELSE S := S +1

Posted Date: 5/2/2012 9:30:04 AM | Location : United States

Related Discussions:- what is Semaphore and explain with example?, Assignment Help, Ask Question on what is Semaphore and explain with example?, Get Answer, Expert's Help, what is Semaphore and explain with example? Discussions

Write discussion on what is Semaphore and explain with example?
Your posts are moderated
Related Questions
Control Unit of the processor: The  Control Unit  of the processor is that unit which controls and coordinates the execution of instructions by the processor. It is responsibl

requirement analysis and specification for online voting

Question 1 Write down the Booth's Multiplication Algorithm. Justify the Booth's Multiplication Algorithm Question 2 Explain the functions of ALU Question 3 Define the term ins

Hardware Hardware includes the cable and a Hub/Switch that will connect the participating computers together. Printers or any other peripherals connected to one computer can

what are the definition?

Variables and Constants: These are the smallest components of a programming language.  For writing a program, one must know how to use the internal memory of a computer. A Com

Understanding human intelligence in social AI can be taken as just the current tool in the philosopher's toolbox for answering of questions for the behaviour of human intellig

G e ne ric Techniques Developed: In  the  pursuit  of  solutions  to  many   problems  in  the  above  categories,  serval specific  techniques have sprung up which have bee

Question 1 Write about Potential Risks to Information Systems Factors to be addressed for making information systems more secure Question 2 Write about the foll