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

Assignment Help:
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


Related Discussions:- what is Semaphore and explain with example?

Excel, how to use excel..

how to use excel..

Cp, I NEED FLOW CHART ANT DRAWINGS OF BASIC OPERATIONS OF COMPUTER

I NEED FLOW CHART ANT DRAWINGS OF BASIC OPERATIONS OF COMPUTER

Basic of simulation, Task 1 Study various types of systems and simulate a s...

Task 1 Study various types of systems and simulate a system of your own. Task 2 Study various models and enumerate the various steps for designing a corporate model

Python Strings and Python Lists, Python Strings: Strings in Python are rec...

Python Strings: Strings in Python are recognized as an adjacent set of characters in among quotation marks. Python permits for either pairs of single or double quotes. Subsets of s

ICT IN BUSINESS, Explain how ICT can be used for achievement of each of the...

Explain how ICT can be used for achievement of each of the following business objectives, illustrating your answer with examples: 1. Customer intimacy 2. Low-cost leadership

Describe the common modeling techniques in uml, Question 1 Explain with an...

Question 1 Explain with an example the three kinds of relationships that are most important in object oriented modeling Question 2 Describe the Common Modeling techniques in

Explain the tcp/ip reference model with diagram, Question 1 Define the fol...

Question 1 Define the following terms                                   1) Analog Signals and Digital Signals 2) Composite signals Question 2 Define the following terms

Netlogo, Do you have expert can deal with netlogo

Do you have expert can deal with netlogo

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd