now automatically find out the number of processes in the system, use that to determine the pattern