reduced the number of shifts
Solved problem to keep process alive