Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / CS/SE 6378: Advanced Operating Systems Section 001 Project 2 This project must be done in a group

CS/SE 6378: Advanced Operating Systems Section 001 Project 2 This project must be done in a group

Computer Science

CS/SE 6378: Advanced Operating Systems Section 001 Project 2

This project must be done in a group. A group size can vary from two to three students. Code sharing among groups as well as copying code from the Internet without permission is strictly prohibited and will result in disciplinary action being taken. Each group is expected to write their own code and demonstrate the operation of this project to the instructor or the TA if asked. You may be graded not only on the correct behavior of your project, but also on your responses to questions concerning your implementation which the instructor or TA may ask during your demo.

This project must be done in Java. Since the project involves socket programming, you can only use machines dcXX.utdallas.edu, where XX ∈{01, 02, .., 45}, for running the program. Although you may develop the project on any platform, the project must run on dcXX machines; otherwise you will be assessed a penalty of 20%.

1       Project Description

Write a distributed program that uses the Node class you developed as part of the previous project and allows every process in a distributed system to discover its k-hop neighbors for each k = 1,2,...,n − 1, where n denotes the number of processes in the system.

Your program should take two arguments as inputs. The first argument denotes the process (or node) identifier. The second argument denotes the name of the configuration file that describes the communication graph (same format as in the previous project). You can assume that all links in the communication graph are bidirectional and the graph is connected.

Each process should generate a separate output file whose name is derived from the two arguments as follows. If the process identifier is ID and the configuration file name is filename, then the name of the output file should be ID-filename. The output file for each process contains exactly n−1 lines, where the k-th line contains the list of processes, sorted by their identifiers, that are at a distance of exactly k hops from the given process.

You algorithm can assume that, initially, each process knows its 1-hop neighbors as well as the total number of processes in the system. A process should not use any other information from the configuration file except as specified above.

Do not modify the interface of the Node class as specified in the previous project in anyway. It should be possible for us to replace your implementation of the Node class with another implementation without breaking your program.

2       Submission Information

All submissions will be through eLearning. Submit all the source files necessary to compile the program and run it. Also, submit a README file that contains instructions to compile and run your program.

3       Configuration Format

The configuration file will be a plain-text formatted file no more than 100kB in size. Only lines which begin with an unsigned integer are considered to be valid. Lines which are not valid should be ignored. The configuration file will contain 2n+1 valid lines. The first valid line of the configuration file contains one token that denotes the number of nodes in the system. After the first valid line, the next n lines consist of three tokens. The first token is the node identifier. The second token is the host-name of the machine on which the node runs. The third token is the port on which the node listens for incoming connections. After the first n + 1 valid lines, the next n lines consist of a space delimited list of at most n − 1 tokens. The kth valid line after the first line is a space delimited list of node IDs which are the neighbor of node k. Your parser should be written so as to be robust concerning leading and trailing white space or extra lines at the beginning or end of file, as well as interleaved with valid lines. The # character will denote a comment. On any valid line, any characters after a # character should be ignored.

You are responsible for ensuring that your program runs correctly when given a valid configuration file. Make no additional assumptions concerning the configuration format. If you have any questions about the configuration format, please ask the TA.

# number of nodes 5

  1. dc02 12234 # nodeID hostName listeningPort
  2. dc03 11233
  3. dc04 22233
  4. dc05 15232
  5. dc06 16233

          1 4                           # space delimited list of neighbors for node 0

  1. 2 3          # space delimited list of neighbors for node 1
  2. 3             # ...        node 2

           1 2 4             # ...                                                                                   node 3

          0 3                 # ...                                                                                   node 4

The output file for node 2 will contain 4 lines as follows.

1: 1 3

2: 0 4

3:

4:

2

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE