I want solution to this question., JAVA Programming

Assignment Help:

This assignment is based on the principles of clock consistency and associated drifts in a distributed system. You have to create a simulation, running on a single machine, of a simple distributed system involving four process objects (PO). Each PO will contain a logical clock, a concept first proposed by Lamport.1 The concept of the logical clocks and associated synchronization, based on the following rules, will attempt to resolve the clock consistency in this system:
1. Each event (internal, send, or receive) in the system is associated with a time-stamp, based on logical clocks.
2. Each PO, Pi, will have an associated logical clock, LCi. This logical clock is implemented as a simple counter that is incremented whenever an event takes place within that PO. Since a logical clock has a monotonically increasing value, it assigns a unique number to every event. The time stamp of an event is the value of the logical clock for that event. Hence, if an event A occurs before an event B in Pi, then LCi(A) < LCi(B).
3. A Pi will randomly decide if it wants to carry out an internal event or send a message to some other Pj. If it decides to send a message to a randomly selected Pj then it will attach the value of its logical clock to that message. A Pi may also decide to receive a message from another Pj if that Pj has sent a message to the Pi earlier.
4. Whenever a Pj receives a message from another Pi, it will advance its logical clock if the time stamp associated with the incoming message is greater than or equal to the current value of its logical clock, i.e., if Pj, receives a message (event B) from Pi with a time stamp t and LCj(B) = t then Pj should advance its logical clock such that LCj (B) is equal to t + 1.
5. Any Pi, in the system, may exhibit Byzantine or arbitrary failures when it receives a message – e.g., it may choose not to advance its logical clock at all.
Your task is to:
1. Propose the interaction and failure models for this system. Discuss the pros and cons of your design.
2. Simulate this entire environment in C++ or Java using threads. Allow the simulation to reach a steady-state, i.e., run the program for a large number of iterations. During each iteration and at the end of the simulation compare the values of the logical clocks of POs – this comparison should indicate the clock drifts and their synchronizations. Repeat the simulation with different probabilities and access their effects on the clock drifts.
3. Create a brief report that indicates the aforementioned models and the analyses of the results of your simulation.

Related Discussions:- I want solution to this question.

What is mvc, Model-View-Controller (MVC) is a design pattern put together t...

Model-View-Controller (MVC) is a design pattern put together to help control change. MVC decouples interface from business logic and data. ? Model: The model having the core of

Difference among microprocessors and microcontrollers, What is the differen...

What is the difference among microprocessors and microcontrollers? Give one example of both? The microprocessor is electronic equipment that can perform various functions and a

Program, a program that groups items according to their number

a program that groups items according to their number

What is the string concatenation, What is the String Concatenation + Op...

What is the String Concatenation + Operator is employed to concatenate strings - System.out.pritln ("Hello" + "World") will print Hello World on console String concatenat

Develop a fantasy football, Need to develop a Fantasy football Project D...

Need to develop a Fantasy football Project Description: I am seeking to build a Fantasy football website. i already have an example of existing website. i want the exact same

What is bullseye explain with an example, What is Bullseye explain with an ...

What is Bullseye explain with an example? This is a easy applet that draws a series of filled, concentric circles alternating red and white, instead a bullseye. import java.ap

Inheritance, identify the possible classes and methods in the classes which...

identify the possible classes and methods in the classes which can be used in a sales tracking system for a fast food restaurants

What is asynchronous messaging, What is asynchronous messaging? Queue An...

What is asynchronous messaging? Queue Ans) Asynchronous messaging includes a client that does not wait for a message from the server. An event is used to trigger a message from

Create an online multiple choice quiz, Create an online multiple-choice qui...

Create an online multiple-choice quiz using JSP/Servlets technology. The quiz should draw questions from an array of predefined questions (at least fifteen). You should use a meani

Explain exception classes, OOPS with Java 1. Explain any five buzz word...

OOPS with Java 1. Explain any five buzz words in Java. 2. Explain exception classes and also explain common exceptions in java. 3. Explain primitive and abstract data typ

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