# CPU consumption loop $p = 0; # number of processes (0 => 1 process) $w = 20; # amount of work per iteration (20) $t = 0; # sec of think time between iterations (0) for (1..$p) {fork()} while (1) {for($x=0;$x<$w*100000;$x++){sin($x/($x+2))} if($t){sleep($t)}}