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.

Pebble merchant, There is a pebble merchant. He sells the pebbles, that are...

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing tha

Describing service oriented architecture (soa)? , Service Oriented Architec...

Service Oriented Architecture Service Oriented Architecture (SOA) is an evolution of the fundamentals governing a component based development. Component based development gives

Android, how android applications are made using java.?

how android applications are made using java.?

Converting strings to numeric primitive data types, Converting Strings to N...

Converting Strings to Numeric Primitive Data Types To convert a string which is containing digits to a primitive data type, wrapper classes can help. parseXxx method can be u

Preemptive scheduling and time slicing, In pre-emptive scheduling, the high...

In pre-emptive scheduling, the highest priority task implements until it enters the waiting or dead states or a higher priority task comes into existence. In time slicing, a tas

I want school management project, I want School Management project Proje...

I want School Management project Project Description: An easy school management project which able to store all data about students like fees structure, admission details and

Differentiation jdk 1.02 event model and event delegation, Differentiation ...

Differentiation the JDK 1.02 event model and the event-delegation model introduced with JDK 1.1?

Need java programmer for an assignment, Need java programmer for an assignm...

Need java programmer for an assignment "Prepare a program that will accept a sequence of file names as command-line arguments. These files will consist of ASCII text representin

How to implementing the cloneable interface, How to Implementing the Clonea...

How to Implementing the Cloneable Interface The java.lang.Object class contains a clone() method which returns a bitwise copy of the current object. protected native Object cl

Explain how java allows the constraints on a generic type, Consider the fol...

Consider the following C++ template class. #include using namespace std; template class SortedList { public: SortedList() {size = 0;} void insert(T item); friend ostrea

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