Showing posts with label (FCFS). Show all posts
Showing posts with label (FCFS). Show all posts

C++ Program (Source Code) for First Come First Served (FCFS) CPU Scheduling Algorithm

First Come First Served (FCFS): 

In operating systems, tasks that are queued to be processed go through different scheduling algorithms in different operating systems. First Come First Served or FCFS is one of them.
In first come first served, literary, the task that comes first to be processed gets processed first, then the next one and this continues. This is a less preferable way of scheduling as any task can block the processor for infinite amount of time. Also as all tasks are given the same priority, more important tasks might be waiting too long to be processed.


Explain and Solve : First Come First Served (FCFS) CPU Scheduling Algorithm in C++ with Explanation

If you haven't read/tried the earlier problems then click the links follow:


First Come First Served (FCFS) CPU Scheduling Algorithm in C++ with Explanation: 

CPU gets a lot of processes to handle. The problem is shortening the waiting time for a process to reach CPU and get processed. Now consider a CPU and also consider a list in which the processes are listed as follows,
Arrival
Process
Burst Time
0
1
3
1
2
2
2
3
1

Here, Arrival is the time when the process has arrived the list, Process Number is used instead of the process name, and Burst Time is the amount of time required by the process from CPU. Well, as the unit of time you can take anything like nano-second, second, minute etc whatever. We consider it as second.