0
votes

The first come, first served scheduling algorithm is a non-preemptive algorithm, it means that if there's a process in running state, it cannot be preempted, till it completes. But if some kernel process arrives in between, will the CPU be allocated to that kernel process?

If yes, will this be the case with any higher priority process, irrespective of whether it is a system process or not?

1
I'm not sure about the real question you're asking. FCFS doesn't have any notion of priority, so nothing special happen when a system process is scheduled. Your question is about implementation detail (IMHO) but your are not precising which implementation.mrBen
*specifying (precising is a false friend from french)mrBen

1 Answers

1
votes

As mrBen told in his answer, there is no notion of priority. It will still be treated as any such process waiting on the ready queue. Hence, this algorithm cannot just be used in Practical.

However, that being said, there are certain situations which makes FCFS a practical use. Consider the use case where the Process Scheduling algorithm uses Priority Scheduling and consider there are 2 processes having the same priority. In this situation to resolve the conflict, FCFS may be used.

In such cases, Kernel Process will always be having higher priority than the user processes. Within Kernel processes, the hardware interrupt has higher priority than the software interrupt since you cannot have a device waiting and starve it while executing signals.

Hope I answered your question!