$ ./master --worker_path ./worker --wait_mechanism MECHANISM -x 2 -n 12
--worker_path is used to point to the worker
binary.
MECHANISM is one of sequential,
select, poll, or epoll. See below for
more details.
x and
n to compute ex (for
n in [0..11]).
n child worker processes, each of which
computes xn/n!.
$ ./worker -x 2 -n 3 x^n / n! : 1.3333
x^n / n! : ) on
the console if its standard-out is a terminal.
standard-out is a pipe, worker should simply write
the result into the pipe before exiting.
write-end of the pipe is made standard-out
of 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
select system call to read the workers' output in the
order it becomes available.
poll system call.
epoll system call.