CS 3733 Operating Systems, Spring 2006 Assignment 5
Due May 1
In this assignment you will modify your compile_all program of Assignment 4 so that it can use multiple compile_daemon programs.
Use this
cover sheet
as the first sheet when handing in your assignment. Make sure you include
your makefile and lint output.
Part 0: If you did not get Assignment 4 completely working,
do so.
Part 1:
Modify your compile_all.c program from Part 3 of Assignment 4
so that the second parameter (which was ignored in the previous assignment)
represents a configuration file. The first line of the configuration file
contains the path of the C compiler. Each additional line is the name of a host
running the compile_daemon program. In this part, assume that there
are at least as many host lines in the configuration file as there are
filename parameters. Send one token to each of the first hosts
in the configuration file. Use the readline function from the
restart library to read the lines of the file. You may assume that it is an
error if a line is longer than 1024 bytes, but you should handle this error
in an appropriate way. Make sure your program takes advantage of as
much parallelism as possible in compiling the programs.
Part 2:
Remove the restriction that there are at least as many hosts in the
configuration file as there are filename parameters. If there are fewer,
distribute the load as equally as possible. For example, if there are
5 files to compile and 3 hosts running compile_daemon, two of these
should compile 2 programs and one should compile the remaining one.
You will demonstrate your program in the Linux Lab during class on the due date.
Instructions are available here.