[Solved] CS6378: Project II

$25

File Name: CS6378:_Project_II.zip
File Size: 169.56 KB

SKU: [Solved] CS6378: Project II Category: Tag:
5/5 - (1 vote)

You are required to implement a tree-based quorum system as described below.

You are expected to write your own code without help from any other person or source. Any deviation from this requirement may trigger an investigation of academic misconduct.

The program must run on UTD machines (dc01, dc02, , dc45).

1 Requirements

  1. There is a file (you can choose any name for that file) that each client node can write to. Initially, the file isempty.
  2. There are seven server nodes in the system, numbered from S1 to S7. The servers are logically arranged as a binary tree with S1 as the root. The children of server Si are nodes S2i and S2i+1.
  3. There are five client nodes in the system, numbered from C1 to C5. Each client independently generates its requests to enter the critical section by executing the following sequence of operations until twenty of its requests have been satisfied:
    • Waits for a period of time that is uniformly distributed in the range [5, 10] time units before trying to enterthe critical section.
    • Sends a REQUEST to a quorum of servers and waits for GRANTS. A quorum of a binary tree of serversis recursively defined as follows:
      1. Root of the tree + a quorum of left subtree, or
      2. Root of the tree + a quorum of right subtree, or
  • A quorum of left subtree + a quorum of right subtree.
  1. If the tree is a singleton node, then the trees quorum consists of that node.

Multiple quorums are possible in this system of seven servers. Each time a client makes a REQUEST, it should randomly select one of the quorums to send the REQUEST to. The goal is to select different quorums over the course of this project.

  • Once a REQUEST has been granted by all nodes in the selected quorum, the client can enter its criticalsection.
  • On entry into the critical section the client does the following:
    1. Opens the file mentioned above.
    2. Writes entering followed by client number and current physical time in a new line at the end of thefile. iii. Lets 3 units of time elapse, closes the file, and then exits the critical section.
    3. Sends RELEASE message to all servers in the quorum.
  • Once a client has successfully exited the critical section twenty times it sends a completion notification to server S0.
  1. The servers act as follows:
    • Initially, all servers are in an unlocked state.
    • If an unlocked server receives a clients REQUEST, the server gets locked by that client and sends aGRANT message to the client.
    • If a locked server receives a clients REQUEST, the server adds that clients REQUEST to its queue orderedby the timestamp of the REQUEST.
    • If a server receives a RELEASE message from a client:
      1. If the server is locked by that client, the server checks is queue. If there is a REQUEST in its queue,the server dequeues the REQUEST at the head of the queue, sends a GRANT to the corresponding client and stays in the locked state. Otherwise (queue is empty), the server becomes unlocked.
    • S0 brings the entire distributed computation to an end once its has received completion notification from all the clients.
  2. There are reliable socket connections (TCP) between each pair of nodes. The messages pertaining to the mutualexclusion algorithm are sent over these connections.

2 Data Collection

For your implementation of the mutual exclusion algorithm report the following (either show it on the screen or write it to a file):

  1. The total number of messages sent by each node from the beginning until it sends the completion notification.
  2. The total number of messages received by each node from the beginning until it sends the completion notification.
  3. For each node, report the following for each of its attempts to enter the critical section:
    • The number of messages exchanged.
    • The elapsed time between making a request and being able to enter the critical section (latency).
  4. Rerun your experiment with other values of: (a) time between a client exiting its critical section and issuing itsnext request, and (b) time spent in the critical section. Report what impact do these changes have on performance, specifically latency. Also, report if you come across any deadlock situation.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CS6378: Project II
$25