1,515 views
0 votes
0 votes
Is FCFS always non-preemptive?

If an I/O bound process comes, then? It will be preempted or not?

2 Answers

Best answer
1 votes
1 votes

FCFS Scheduling Algorithm: 

  • What comes at first gets scheduled first.

 

  • It's Non-Preemptive scheduling algorithm.
  • Convoy effect:
    • Since FCFS is non-preemptive, when a CPU intensive process comes, it takes a lot of CPU time while all the other processes are made to in the ready queue. So one process slows down the entire performance of the system.

 

  • What happens when an I/O bound process comes?
    • I/O bound processes are not CPU intensive usually. So they get executed quickly. 
    • The problem comes when I/O bound processes are followed by CPU intensive processes or vice versa.
      • When there are I/O bound processes in the ready queue waiting for CPU, but a CPU intensive process is executing, the I/O devices are forced to go idle.
      • When the CPU intensive process finishes its execution and it may move to I/O devices.
      • I/O bound processes get executed quickly and now when they come for I/O devices, it is not available since the CPU intensive process is accessing it. This may lead to CPU being idle.
      • No preemption happens even if an I/O bound process comes. 
selected by
1 votes
1 votes
Yes,  FCFS is always pre-emptive. (Non-Preemptive meaning that once a process is given to the CPU, then it can’t be taken away). Due to being non-preemptive, it is suitable for CPU bound processes. (CPU bound process - are the processes which require most of the time on CPU. Input bound - are the processes which require most of the time on peripherals).

What happens when an I/O bound process comes?
Most of the I/O bound processes are not CPU intensive. Hence, they get executed fast.
As the I/O bound processes get executed fast, but when they arrive for I/O devices, the CPU is not available as the CPU intensive process is using it.
This leads to the idleness of the CPU.

So, yes no “preemption” happens even though the I/O bound process comes.

Related questions

0 votes
0 votes
0 answers
2
lc1234 asked Jan 16, 2022
211 views
Given 1GB USB pen drive which is now formatted using i-node, assuming 32-bit addressing with 1Kbytes blocks with 4 bytes per block pointer. What is maximum file size the ...
0 votes
0 votes
0 answers
3
adeemajain asked Jan 17, 2019
339 views
Someone please give the formula for average memory access time when there is Tlb, cache memory and pagefault all 3 things are considered. Because i m confuse in few thin...
0 votes
0 votes
1 answer
4
nishant_magarde asked Oct 29, 2018
227 views
Prior knowledge to start with OS.