CS 3733 Operating Systems
This assignment relies on the first four assignments. Make a new directory and copy your code from assignment 4 into it.
/usr/local/courses/cs3733/pup/apB
runsimd.c. Modify the program
so that it takes two command line arguments:
a port number and the process limit. The server does the following in a loop:
Make the following assumptions about the exchange:
testsim arg1 arg2
getstatus
testsim should be separated by blanks.
#.
runsim as a child (due December 1, 1997)
runsim as follows:
runsim does not output
the status when a child is terminated or stopped.
runsim outputs the list in response to
a SIGUSR1, it ends the output in a # followed by a
carriage return.
runsim forks a child to run the process, it
echoes the child ID to standard output.
runsimd to
do the following:
execvp the runsim
program.
runsimd to read messages from the
network and forward them as described below to runsim.
testsim arg1 arg2 arg3....
getstatus
testsim:
getstatus:
SIGUSR1 signal to runsim.
testsim or getstatus, output
an error message to standard error and echo a # to the network connection.