0
votes

So according to google, first come first served algorithm is a non-preemptive scheduling algorithm but it also mentions that it's a preemptive algorithm. Does this mean that it can be both?

Also, if it is the case that it is non-preemptive can the process get blocked during mid-execution for I/O?

Thanks!

1
Or maybe some of the links you found via Google are garbage?Scott Hunter
FCFS can be arranged as you want. As you mention, if you're serving the task to completion at all costs, if it blocks on I/O you won't schedule anything else, or would only schedule something until the I/O completes. Or, the algorithm could place the blocked thread at the back of the job queue. Or, you could have FCFS with priority; you serve by priority, then FCFS within each priority range. FCFS is just a highly general policy that can be combined with other policies or implemented in myriad ways.ggorlen

1 Answers

0
votes

First-Come-First-Served (FCFS) The simplest scheduling policy is first-come-first served (FCFS), also known as first-in-first-out (FIFO) or CPU Scheduling Algorithms a strict queuing scheme. As each process becomes ready, it joins the ready queue. When the currently running process ceases to execute, the process that has been in the ready queue the longest is selected for running. More See