Process management, Computer Networking

Assignment Help:

Bootstrapping all the processes and establishing correct lines of communication is, by itself, the toughest aspect of this assignment. Before writing any code you should think carefully about how to start all the process and get them connected to each other. You will have accomplished a signi?cant ?rst step once you can reliably start all 20 processes and have them establish connections among themselves properly. Inter-process communication shoulbe via sockets whose type you choose.

I recommend that you make two executables, named host and router. host should accept a command line argument of one letter: either A, B, C, or D. router should accept a command line of R1 or R2. Because there are lots of parameters (e.g., IP addresses, link addresses), have each executable read its parameters from a common ?le once the executable has determined its identity. You may ?nd the combination of socketpair(2) and forking to be useful for starting and organizing the many processes. Here is a working example of the use of the socketpair system call to get three processes (app, IP, and link) connected to each other in a stack con?guration. The code below is available with the assignment in WebCT as ?le example.c. You are welcome to use all, part, or none of this code in your assignment.

#include

#include

#include

#include

#include

#include
int sock_fd[4];

#define APP_SOCK 0

#define IP_APP_SOCK 1

#define IP_LINK_SOCK 2

#define LINK_IP_SOCK 3

#define BUF_SIZE 1024

char buf[BUF_SIZE];

Once all connections are made, I suggest writing code that will format an option less IP datagram and forward from application to application, without ICMP error cases, fragmentation, or any other unusual cases such as TTL expiration, etc. Once you have the basic data ?ow working then you can start to add code one feature at a time for TTL, checksums, fragmentation, and routing errors. You will need to have lots of print statements to trace execution, but with 20 processes, writing to the console may prove problematic. If it does, consider writing debug statements into a log ?le. Be sure to use unbuffered output statements so that there is no possibility of output statements appearing in the log in a different order than they were executed in your programs.


Related Discussions:- Process management

Twisted pair cable - computer network, Twisted Pair Cable Twisted pair...

Twisted Pair Cable Twisted pair cable  consists of two insulated copper  wires  each  about 1 mm  thick arranged in a regular spiral  pattern. The wires  are twisted together

Explain parallel computer architecture, Parallel Computer Architecture ...

Parallel Computer Architecture The two key parametric concerns in designing parallel computer architecture are: 1) executing many numbers of instructions concurrently, and

Critical path method, You are the Senior Project Manager in a software comp...

You are the Senior Project Manager in a software company and have, as part of your team, a student on a three month internship. The student has proudly told you that they have stu

Explain pipeline processing, Pipeline Processing Pipelining is a scheme...

Pipeline Processing Pipelining is a scheme to realize, overlapped parallelism in the proposed way out of a problem on a digital computer in an economical way. To understand the

Explain the hubs and repeaters, Hubs/Repeaters Hubs/Repeaters are used ...

Hubs/Repeaters Hubs/Repeaters are used to connect together two or more network segments of any media type. In larger design, signal quality starts to deteriorate as segment exc

Define the term network throughput, Network throughput It is a symptoma...

Network throughput It is a symptomatic measure of the message carrying capability of a network. It is termed as the total number of messages network can send in per unit time.

Permutation representation through matrix, Q. Permutation representation th...

Q. Permutation representation through Matrix? Figure: Clos Network The functioning of this above permutation is displayed in Figure. This permutation is able to

Medium earth orbiting satellite, Medium Earth Orbiting satellite is an orbi...

Medium Earth Orbiting satellite is an orbit which is located just above the few hundred miles to a few thousands above the earth surface. It is of higher advantage than Low orbit s

What is synchronous tdm, What is Synchronous TDM? In STDM, the multiple...

What is Synchronous TDM? In STDM, the multiplexer allocates exactly the same time slot to every device at all times, whether or not a device has anything to transmit.

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