Is it possible for any 2 processes to have the same arrival time in FCFS scheduling in Operating system.

StackOverflow https://stackoverflow.com/questions/20726766

  •  20-09-2022
  •  | 
  •  

Question

Is it possible for any 2 processes to have the same arrival time in FCFS scheduling in Operating system.

Was it helpful?

Solution

On a machine with multiple processors, it's possible that two processors make a request at the same time. However, assuming the queue at the heart FCFS is a single shared data-structure, then all accesses to that queue will be serialized, and the order in which they serialize determines who is ultimately "first."

Think of it like a queue at a bank or a coffee shop. You could have two different customers walk in at the same time through different doors, but they still have to get in line in sequence.

(Lamport's Bakery Algorithm is one example of serialization that you could apply here.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top