$ ./master --worker_path ./worker --wait_mechanism MECHANISM -x 2 -n 12
--worker_pathis used to point to the worker binary.
MECHANISMis one of
epoll. See below for more details.
ex (for n in [0..11]).
nchild worker processes, each of which computes
$ ./worker -x 2 -n 3 x^n / n! : 1.3333
x^n / n! :) on the console if its
standard-outis a terminal.
standard-outis a pipe, worker should simply write the result into the pipe before exiting.
write-end of the pipe is made
standard-outof the worker.
read-end of the pipe and prints it on the screen. Here is an example for worker 3:
worker 3: 2^3 / 3! : 1.3333
selectsystem call to read the workers' output in the order it becomes available.