A CPU scheduling algorithm determines an order for the execution of its scheduled processes. Given ‘n’ processes to be scheduled on one processor, how many possible different schedules are there?
(A) n
(B) n2
(C) n!
(D) 2n
Answer: (C)
Explanation: For ‘n’ processes to be scheduled on one processor, there can be n! different schedules possible.
Example: Suppose an OS has 4 processes to schedule P1, P2, P3 and P4. For scheduling the first process, it has 4 choices, then from the remaining three processes it can take 3 choices, and so on. So, total schedules possible are 4*3*2*1 = 4!
Option (C) is correct.
Quiz of this Question