scheduler algorithm-1