2.5k views

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?

1. $n$
2. $n^{2}$
3. $n!$
4. $2^{n}$

retagged | 2.5k views

preemptive= infinite way

non preemptive=n!

option=C
by Boss (11.1k points)
selected by
0
In all case n! Only
+2
no , only for nonpreemptive it will be n!

because, it takes 1 process at a time and completes it

So, 1st process can executes n ways

2nd process can execute (n-1) ways

3rd process can executes (n-2) ways......

So, n process can executes n! ways
0
I did n't get why in case of pre-emption allowed , Why there can be infinite combination , assuming that time quantum tends to 0 and Burst time tending to NP hard problems (a silly way to say infinte) , still  if one  of the process is scheduled by CPU then , if suspended it is not the responsiblity of CPU  again (long term schedular) to schedule it again, rather the duty of Middle term schedular.
+1 vote
c)n!
by (269 points)