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?

Digital wireless telephone networks, Mobile telephone networks started with...

Mobile telephone networks started with analog technology. Analog cellular networks were known as first generation (1G) networks. Such networks had limited capacity, and were subjec

Fully describe the assessment centre method of selection, Problem: One ...

Problem: One large employer requests CVs from applicants, and, on the basis of these, invites a selected number to take part in a telephone interview. A date and time are provi

Disadvantages of manual records, Disadvantages of Manual Records  ...

Disadvantages of Manual Records  More manpower is required to record/storelretrieve the data.   Bulky paper records take up more space and this problem increases with

Basic, WAP TO ACCEPT MARKS OF THREE SUBJECT FOR STUDENT & CALCULATE TOTAL M...

WAP TO ACCEPT MARKS OF THREE SUBJECT FOR STUDENT & CALCULATE TOTAL MARKS AND PERCENTAGE

Software, Software Computer cannot be used without a software in...

Software Computer cannot be used without a software in it. It is the software which gives instructions to the hardware of the computer so as to work all devices in tande

Designing computer based system-systems life cycle approach, Systems Life C...

Systems Life Cycle Approach Systems Analysis and Design follows a life cycle for development, as shown below. Brief discussion on this approach is given here: Figure

Science, Ask question #Minimum 100 words accepted/

Ask question #Minimum 100 words accepted/

As, access,excel and ms word/

access,excel and ms word/

Laser printers, Laser Printers: These printers can print a whole page ...

Laser Printers: These printers can print a whole page at one command, offer highest quality and can combine text, graphics, etc. They are generally restricted to A4 paper and

Describe gamma and its importance, Question 1 Describe HSV and CMYK color ...

Question 1 Describe HSV and CMYK color models Question 2 Describe gamma and its importance Question 3 What are the steps involved in image manipulation? Que

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