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

Description
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
Problem: (a) Using appropriate examples describe what are System software and Application Software. (b) Explain four tasks of file management a user frequently performs i

Create a program that uses a menu with options to enter student information (name, ID, GPA), print student information, or quit the program. Use data files and FILE pointers to sto

The development of your learning module is very time consuming, so it is recommended that you begin creating your learning module during this first week. Before you begin, download

My son has a project assignment he has problem with. The only thing is, it is due in 20 mins. can someone be able to help him? if so, how much is the fee?

1. The process abstraction is a popular way to organize concurrent programs, but it is not the only choice. An alternative to the process abstraction is to design a single-threaded


when was the first computer made

#after writing the script of rebuilting indexed on db server it gave output command executed succesfully does this mean i m done

how to introduce information system an in organization

what are the significance of telecommunications deregulation