Provide a simulation program animating the system

Assignment Help Basic Computer Science
Reference no: EM132523808

Part : Modelling aconcurrent system using Finite State Processes (FSP) and using Label Transition System Analyser (LTSA) for model animation and property checking

Scenario: Two warring neighbours are separated by a field with wild berries. They agree to permit each other to enter the field to pick berries, but also need to ensure that only one of them is ever in the field at a time. After negotiation, they agree to the following protocol. When one neighbour wants to enter the field, he raises a flag. If he sees his neighbour's flag, he does not enter but lowers his flag and tries again. If he does not see his neighbor's flag, he enters the field and picks berries. He lowers his flag after leaving the field. Model this algorithm for two neighbours, NEIGHBOUR1 and NEIGHBOUR2. Specify the required safety property for the fieldand check that it does indeed ensuremutually exclusive access.Specify the required progress properties for the neighbours such that they both get topick berries given a fair scheduling strategy. Are there any adverse circumstances inwhich neighbors would not make progress? Whatif the neighbors are greedy?

(a) Propose an FSP specification modelling this scenario and explain your modelling choices.
(b) Check the properties mentioned and explain the results.
(c) Consider using a turn indicator (which can take the values 1 or 2) to avoid deadlock and provide an enhancedFSP specification for this scenario: if a neighbor sees his neighbour's flag and it is his neighbour's turn, he may not enter, but must try again later. Check that it does indeed avoid deadlock and satisfy the properties.

Part 3:Implementing a concurrent systemin Java.

Consider a generalisation of thea bove scenario, with N neighbours that want to access the field with wild berries and provide an implementation in Java that ensures mutual exclusion, avoids deadlock and offers a fair scheduling.

(a) Propose a Java implementation: it is not necessary to use a low-level algorithm like Paterson's, you can use any of the Java concurrency facilities.
(b) Provide a simulation program animating the system (with N>2 neighbours) and showing who is currently picking the berries, who is waiting etc.
(c) Argument (in plain English)how your Java implementation is satisfying each of the requested properties (mutual exclusion, lack of deadlock, fairness)or enhance the system with a GUI interfacein order to show graphically the concurrent execution.

The coding and fsp should be pasted into a word document but please also provide the below items too:
For these questions please also provide the lts files with the FSP processes and also the source code files for the java implementation. The learning material is also provided for support.

Attachment:- Modelling aconcurrent system.zip

Reference no: EM132523808

Questions Cloud

What is the leveraged-adjusted duration gap : The average duration of the loans is 10 years. The average duration of the deposits is 3 years.
How has ownership policies impacted business practices : How has the ownership policies of those countries impacted business practices? Create a three page summary of your findings.
What are the capital balances of each partner : The capital accounts of Loida Cardenas and Cristina San Jose have balances of P150,000 and P110,000, What are the capital balances of each partner
What is the new price per share : If the firm uses $30 million of its cash to repurchase 1 million shares, what is the new price per share? Assume no other news announced.
Provide a simulation program animating the system : Provide a simulation program animating the system (with N>2 neighbours) and showing who is currently picking the berries, who is waiting etc
What is the present value of prize is the interest rate : 1. A lottery will pay $8,500,000 per year for 20 years. What is the present value of this prize is the interest rate is 4.8%?
Prepare journal entries showing the corrections : The wages account has been undercast by £400. Prepare journal entries showing the corrections necessary to correct the errors
Do you think nature should have rights : In Chapter 3, Taylor outlines a few critiques of those authors that have written about bestowing rights on nature. Do you think nature should have "rights"?
Calculate the expected return over the 4-year period : a) Calculate the expected return over the 4-year period for Asset A and Asset B.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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