What are the drawbacks of this algorithm

Assignment Help JAVA Programming
Reference no: EM131601345

A proposed algorithm for mutual-exclusion works as follows:

Let there be a multi-writer register roll, whose range is {-1, 0, . . . ,N- 1} and the initial value is -1. To enter the critical section, a process i spins on roll, until the value is -1. And when it finds the value to be -1, it sets the value of roll to i, within one time unit of the read.

After that, the process waits for more than one time unit, and then reads roll. If it still has the value i, then it enters the critical section.

Otherwise, it returns to spinning on roll until the value is -1. When a process exits its critical section, its sets the value of roll to -1.

(a) Does the algorithm guarantee mutual exclusion?
(b) Is it livelock-free?
(c) What are the drawbacks of this algorithm (in terms of performance and requirement)?

Reference no: EM131601345

Questions Cloud

Promote products-share company profiles : Across the Web, many companies provide PowerPoint presentations on their websites to promote products, share company profiles, etc.
Write a program that will randomly generate a number : Write a program that will randomly generate a number - Prompt the user to guess the number. The user has 5 tries to guess the correct answer.
Compare the economic level and income inequality : Compare how the economic level and income inequality in each country influenced other social determinants for each country.
Establish common standards for new technologies : Should device manufacturers be forced to work together to establish common standards for new technologies? Is that feasible in a free market?
What are the drawbacks of this algorithm : Does the algorithm guarantee mutual exclusion? (b) Is it livelock-free - What are the drawbacks of this algorithm
Discuss equitable processing of legal matters : Does the fact that there are so many sources of legal research assist or detract in the fair and equitable processing of legal matters. Explain
You want to implement bitlocker on your windows : You want to implement Bitlocker on your Windows 8 computer. Your computer isn't TPM compliant. How will this restrict BitLocker
Assess the probable difficulties and risks : Assess the probable difficulties and risks associated with using a public infrastructure such as the Internet as part of a business solution.
Provide examples of some global partnerships : Develop a PowerPoint presentation (addressing the country used in your Unit 2 assessment) on the potential for pandemic outbreak.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a subclass of the memorycalc class

Write a subclass of the MemoryCalc class from Assignment 6. This new calculator, called ScientificMemCalc, should be able to do everything that the MemoryCalc

  Complete java program using netbeans

Create, using NetBeans, a complete Java program called CalcWeightedAvgDropLowest according to the guidelines - the input file should be in the same directory

  Eligible for garbage collection

When is the B object, created in line 3, eligible for garbage collection - There is no way one can be absolutely certain.

  Point of sale terminal

a software implementation of a Point of Sale terminal at a typical store. The users of the system are the cashiers sitting at the sales terminals of the store. The users can use the system to manage sales items in the store, customer details and of c..

  Write a program that displays a drawing popular hangman game

Write a program that displays a drawing for the popular hangman game, as shown in Figure 15.32(c). draws a sketch for the hangman game.

  Deadlock and starvation

What is the difference between deadlock and starvation.Explain in a sentence or two how you prevented deadlock in your implementation.

  Create java application which creates random phone number

Create and implement Java application which creates and prints a random phone number of the form xxx-xxx-xxxx. Include the dashes in the output.

  Implement one class called parking meter

Implement one class called parking meter, that is a simple model of a coin operated parking meter

  Write an application class that contains several methods

Write a driver class. This class should use the main method to call four methods in the application class that will display our JOptionPanes - Write an application class that contains several methods.

  This is a client server monitoring system project

this is a client server monitoring system project design.first in the server side the 1a program is my own and i have

  Assessment taskyour task is to develop a java application

assessment taskyour task is to develop a java application that allows the user to read travel booking data from a text

  Create a modular solution algorithm using pseudocode

Create a modular solution algorithm using pseudocode. Create a structure diagram/hierarchy chart grouping processes from the defining diagram into modules.

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