How to implement p and v on semaphores by using the test

Assignment Help Computer Engineering
Reference no: EM131884546

Problem

Some computers provide an indivisible machine-instruction test and set (TS) that can be used for synchronization purposes. Let X and Y be two boolean variables. The execution of the instruction TS (X, Y) copies the value of Y into X and sets Y to false. A set of concurrent processes that must execute some instructions in mutual exclusion can use a global boolean variable PERMIT, initialized to true, and a local boolean variable X in the following way:

repeat TS (X, PERMIT) until X; instructions to be executed in mutual exclusion; PERMIT:= true

• In this case, processes do not suspend themselves; they are always executing (this is called busy waiting). Compare this solution to one based on semaphores in which P and V are implemented by the kernel.

• Describe how to implement P and V on semaphores by using the test and set primitive in a busy wait scheme.

Reference no: EM131884546

Questions Cloud

Prepare a pension worksheet for the pension plan : The interest (settlement) rate applicable to the plan is 10%. Prepare a pension worksheet for the pension plan for 2013 and 2014
Discuss possible strategies adopted by programming language : Discuss the possible strategies adopted by a programming language to bind a finite mapping to a specific finite domain.
How can you define task types in ada : How can you define task types in Ada? What are the main differences between protected types and task types?
Explain the current state of web application security : Describe the major potential security risks associated with maintaining the organization's Web presence, protecting its assets.
How to implement p and v on semaphores by using the test : Describe how to implement P and V on semaphores by using the test and set primitive in a busy wait scheme.
Compute the amount of contribution margin : Compute the amount of contribution margin that will be obtained per hour of labor time spent on each product
Explain the major expectations an employer would have of you : Choose any one (1) career within and describe the path you could take. Explain the major expectations an employer would have of you in that career
At what amount should the land be recorded : Donner Company is selling a piece of land adjacent to its business premises. An appraisal reported the market value of the land to be $220,000.
Determine the taxable income of each dependents : Assume that their adjusted gross income is $479,900 and their itemized deductions remain the same. What is their 2016 taxable income?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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