You are asked to develop a replicator (client) that distributes a large job over a number of computers (a server group) on a single switched LAN (our Linux lab).

Description:

You are asked to develop a replicator (client) that distributes a large job over a number of computers (a server group) on a single switched LAN (our Linux lab). In this assignment, a large (simulation) job can be divided into a number of small jobs, each of which can be assigned to one machine from the server group for execution. The execution results of the small jobs can be merged once all of them successfully terminate.
System Architecture:
client server1 server2 server3 …
| | | |
| | | |

LAN

The client and servers are running Network File System (NFS) so that user files are visible at $HOME directory. You may want to set up the following environment:
$HOME/replicate.hosts: a list of (server) hostnames which participate in the simulation. There is no reason why your implementation cannot support up to 10 servers.
$HOME/replicate_out: the directory that stores the small job execution result.
The simulation program ” hyper_link ” (binary) is provided. In this assignment, you don’t need to know or care what “hyper_link” does, and actually it is a computing intensive (CPU demanding) simulator. The command line arguments of “hyper_link” are job# 1000000 999 1 2 2 100, where the job number determines the number of small jobs in your simulation. To allow the client to run a large job, the job# should be given in a tuple: start, end, and step. For example, the command (from the client) “hyper_link 1 100 1 1000000 999 1 2 2 100” yields 100 small jobs with the job# starting from 1 to 100. Each small job produces a screen output (see example below) at the end (if finished successfully). Your code needs to redirect the output to a file and save it in $HOME/replicate_out. For example (on the server side),
./hyper_link 1 1000000 999 1 2 2 100
will produce a screen output looks like (it takes approximately 2 minutes on spirit):
1:1000000:999:2:0.5:1.125193e+00:2.454346e-04:6.251640e-01:2.205078e-04:0.000000e+00:0.000000e+00

You can only use C programming lanuage to complete this project. Your implementation should not rely on any extra library (to compile your code). Your code must compile by using gcc install on the Linux workstations

Tags: No tags