Java program simulate a network

Assignment Help JAVA Programming
Reference no: EM131587

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: EM131587

Questions Cloud

Optimal translocation strategies : Optimal Translocation Strategies - use stochastic dynamic programming (SDP) to ?nd the optimal decisions
Write an assembly language subroutine : Write an assembly language subroutine
Price elasticity of demand : Price elasticity of demand for two customer segments
Accuracy and completeness of computations : Analysis right and you have to develop a plausible argument to "prove" that your analysis is correct
Java program simulate a network : Java program simulate a network
Computer programming using c language lab : Computer programming using c language lab
Red brand canners : Red Brand Canners Gordon asked Myers about the demand for tomato products for the coming year. Myers replied that they could sell all of the whole canned tomatoes they could produce.
Flow assurance technical report : Flow Assurance Technical Report - Scale Risk Assessment
Give both a high-level algorithm and an implementation : Give both a high-level algorithm and an implementation (\bubble diagram") of a Turing machine for the language

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Implementation activities of software development

Analysis, design, and implementation activities of software development

  World data app

Prepare WorldDataApp project. It implements the NameIndex portion, including creating it in SetupProgram, and searching, viewing and updating it in UserApp program.

  Java program to create a tree

Java program to create a tree, generate class - BottomUpTwoThreeFourTree, BottomUpTwoThreeFourTree,

  Design an abstract data type in java

Design an abstract data type in Java that represents a musical pitch

  Create a class safestack that implements a stack of strings

Create a class SafeStack that implements a stack of strings

  Print the contents of the array

Prepare a second loop that prints the contents of the array

  Compilation and Execution - JAVA problem

Style marks are based on how your submitted code looks. Remember that good code is easily readable (and understandable) by someone who did not write it. For assignments, you should also include your name, student number, what course this is, what ass..

  Create a project in eclipse

Create a new project

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  File integrity checker - tripwire

Write a program that will perform some of the basic tasks accomplished by a file integrity checker such as Tripwire.

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

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