Create new process P while(1) { read next task process task if(P has ended) { evaluate result of P Create new process P } elsif(P should be killed) { kill P and its children Create new process P } }