We will simulate a very simple network by having a process

Assignment Help JAVA Programming
Reference no: EM13347654

We will simulate a very simple network by having a process correspond to a node in the network, and files correspond to channels in the network.

We will have at most 10 nodes in the network, nodes 0 , 1, 2, . . . , 9, or LESS, not all nodes need to be present.

Each process (i.e. node) is going to be given the following arguments

1. id of this node (i.e., a number from 0 to 9)
2. the duration, in seconds, that the node should run before it terminates
3. the destination id of a process to which the transport protocol should send data
4. a string of arbitrary text which the transport layer will send to the destination
5. the starting time for the transport layer (explained much later below)
6. a list of id's of neighbors of the process

We will have a single program foo.java which has the code for a node. Since we have multiple nodes, we will run the same program multiple times, in parallel. The only difference between each of the copies of the program running in parallel are the arguments to the program.

For example, assume I have two programs, A and B, and I want to run them at the same time. At the Unix prompt >, I would type the following

> A &
> B &

By typing the & we are putting the program in the "background", i.e., the program runs in the background and you can keep typing things at the terminal. Therefore, A and B are running in parallel at the same time.

Again, let foo be your program that represents a node. The arguments of the program are as follows foo 3 100 5 "this is a message" 40 2 1

The following would execute the program foo, and the first argument is the id of the node (3), the second is the number of seconds the process will run (100), followed by the destination for this node (5), then the message string "this is a message", then the time at which the transport layer begins, and the last arguments is a list of neighbors (i.e. 2 and 1 are neighbors of 3)

Reference no: EM13347654

Questions Cloud

You will need to model each population in terms of a nite : you will need to model each population in terms of a ?nite number of individuals which can increase or decrease each
To implement the program you must write several subroutines : to implement the program you must write several subroutines and a main program to operate an engine control unit which
Question 1skyymarley airlines has determined that the price : question 1skyymarley airlines has determined that the price elasticity of demand for two customer segments coach and
Assessmentthe project reports will be evaluated in three : assessmentthe project reports will be evaluated in three areasaccuracy and completeness of computationsyou have to get
We will simulate a very simple network by having a process : we will simulate a very simple network by having a process correspond to a node in the network and files correspond to
1 prepare a program to read 3 numbers x y z use conditional : 1. prepare a program to read 3 numbers x y z. use conditional statement and evaluate values of variables a b and c.
Red brand cannerson monday september 13 1965 mr michael : red brand cannerson monday september 13 1965 mr. michael gordon vice president of operations asked the controller
1access the spreadsheet and gather the relevant data2use : 1.access the spreadsheet and gather the relevant data.2.use the appropriate equation oddo and tomson to compute the
Turing machines1give both a high-level algorithm and an : turing machines1.give both a high-level algorithm and an implementation bubble diagram of a turing machine for the

Reviews

Write a Review

JAVA Programming Questions & Answers

  Socket programming in java: tcp

In this project we will develop a Web server in two steps. In the end, you will have built a multi-threaded Web server that is capable of processing multiple simultaneous service requests in parallel.

  Program that prompts the user to enter the year and display

Write a program that prompts the user to enter the the year and first day of the year and displays the calendar table for the year on the console. For example , if the user entered the year 2013, and 2 for tuesday, January 1, 2013, your program shoul..

  Finding java code error

Indicate in the given code segment if an error occurs. If so, point to whether it is syntax, runtime or logic and how you would fix it.

  Shows the users name and program name

Java program, the program has a page that shows the users name and program name. a second jpanel that shows 4 buttons (circle square rectangle and oval) the problem i am having is that my program is not dropping where i click and the shapes are not s..

  Write a program in java that reads contents of two vectors

Write a program in Java that reads contents of two vectors, and then displays the sum of these two vectors. The program should prompt the user to enter the size of the vectors first.

  Develop a program that will handle a golfer and his scores

develop a program that will handle a Golfer and his scores. The program will be comprised of two classes: a Golfer class that will manage all the golfer's scores and a Score class.This is a class designed to represent a golfer including his name, hom..

  One search function

One search function will use a sentinel to mark the end of the array. The other search function will use an array length (maximum legal index into the array) to determine when to exit the search loop. Both functions must return true when the searc..

  Explain the legal doctrine benefits balancing

Explain the legal doctrine "Benefits Balancing" as it pertains to applying the reasonable standard of care doctrine in the medical fields. Does a defense that the majority of physicians normally do not give a particular diagnostic test in the normal ..

  Java application which creates bank records

Write down a java application which creates 10000 bank records and the allow user ti enter a balance and customer account info. using a an account number.

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Write down ijvm code to remove top two words from stack

Write down IJVM code which will remove these top two words, multiply and put their product back on stack. You are allowed to use existing IJVM instructions only.

  Create a class named student that has three member variables

Create a class named Student that has three member variables

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