Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Operating System Expert

Explain briefly the working of semaphore with example ?

The E.W. Dijkstra (1965) abstracted the key idea of mutual exclusion in his concepts of semaphores.

Definition
A semaphore is a confined variable whose value is able to be accessed and altered only by the operations P and V and initialization operation called as 'Semaphoiinitislize'.

Binary Semaphores is able to assume only the value 0 or the value 1 counting semaphores as well called general semaphores can assume only nonnegative values.

The P or sleep or wait or down operation on semaphores S written as P(S) or wait (S) operates as follows:

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

The V or wakeup or signal or up operation on semaphore S written as V(S) or signal (S) operates as follows:

V(S)   IF (one or more process is waiting on S)
                THEN (let one of these processes proceeds)
                ELSE   S: = S +1

Operations P and V are complete as indivisible, single, atomic action. It is guaranteed that formerly a semaphore operation has stared, no other process are able to access the semaphore until operation has completed. The Mutual exclusion on the semaphore S is enforced within P(S) and V(S).

If several processes attempt a P(S) concurrently only process will be allowed to proceed. The other processes will be set aside waiting however the implementation of P and V guarantees that processes will not suffer indefinite postponement.

Semaphores resolve the lost-wakeup problem.

Operating System, Computer Science

  • Category:- Operating System
  • Reference No.:- M9564533

Have any Question?


Related Questions in Operating System

Question state the required answer precisely and then

Question : State the required answer precisely and then provide proper explanation. It is not enough to provide one- word or one-line answers. What is the purpose of the command interpreter? Why is it usually separate fr ...

Question research hex editors available for mac os and

Question : Research hex editors available for Mac OS and Linux. Based on the documentation, how easy would validating these tools be? Select at least two hex editors for each OS, and discuss what you would do to validate ...

Question description of lasa in this assignment you will

Question: Description of LASA: In this assignment, you will select a real-world operating system (can be for a PC, server, tablet, handheld, or embedded device). You will introduce the operating system and its components ...

Discussion question this research assignment will give

Discussion Question : This research assignment will give further information on the nature and workings of multi-tasking and multi-processing operating systems. All information reported in this assignment is to be in the ...

Research types of operating systems that are currently

Research types of operating systems that are currently available and provide a scenario in which the operating system you chose would be appropriate to be used in this situation. Explain why you think the choice you made ...

State the required answer precisely and then provide proper

State the required answer precisely and then provide proper explanation. It is not enough to provide one- word or one-line answers. Briefly describe the following concepts and indicate how they are related in the context ...

Question topic computerized operating systems os are almost

Question: Topic: Computerized Operating Systems (OS) are almost everywhere. We encounter them when we use out laptop or desktop computer. We use them when we use our phone or tablet. Find articles that describes the diff ...

Catalog course descriptionin this course students carry out

Catalog Course Description In this course students carry out independent research in a significant technical area of information, network, and computer security. The student is to investigate a technical area, research i ...

Show all stepssuppose that the following processes arrive

Show all steps Suppose that the following processes arrive for execution at the times indicated. Each process will run the listed amount of time. in answering the questions, use non-preemptive scheduling and base all dec ...

Taskyour job in this assignment is to create two virtual

Task Your job in this assignment is to create two Virtual machines each running a different but the latest distribution of Linux e.g. Ubuntu Server and CentOS. Each of these VM's is to offer services to a user base. The ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As