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
Arithmetic and Logic Unit: The Arithmetic and Logic Unit is that part of the CPU that actually performs arithmetic and logical operations on data. The CU, CPU registers and me

Client/ Server Architecture:   As the capacity and power of personal computers improved, the need to share the processing demands between the host server and the client workst

THE THIRD GENERATION (1966-1975) The introduction of IBM-360 series of computers in 1965 marked the beginning of this generation. The transistors were replaced by solid

Question 1 Draw the block diagram of von Neumann Architecture and explain about its parts in brief Question 2 Draw the block diagram of Intel 8085 CPU organization and explai

Digital Camera: A Digital camera is an electronic device which takes video or still photographs or both, digitally by recording images via an electronic image sensor. Digital

parent and child process using c language

creating programs in scheme

The role of array processor

COMPUTER INPUT: Figure shows input information for a typical airborne digital computer.  The sensors in Figure develop analogue electrical signals representing: -

Create Email Account: For sending or receiving email, you need to have to an email account. The email account may be provided by the organization for which you are working or