First Come First Serve Scheduling Algorithm
First Come First Serve Scheduling is the simplest CPU scheduling algorithm. The criteria of First Come First Serve Scheduling algorithm are the process that requests the CPU first is holds the CPU or which process enters the ready queue first is served first. The operating system maintains a data structure that is a ready queue. If a process request the CPU then it is loaded into the ready queue which process is the head of the ready queue, connect the CPU to that process.
|Process||Burst Time (ms)|
Consider the following set of processes that arrive at time o, the length of the CPU burst time is given in milliseconds (ms).
The burst time is the time required the CPU to execute that job, generally, it’s unit milliseconds (ms). If the processes arrive in the order P!, P2, P3, P4, P5 and it served in FCFS order.
Now, We have to calculate the average waiting time, average response time.
Turn Around Time = Finished time - Arrival time Turn Around Time for P1 = 5 - 0 = 5 Turn Around Time for P2 = 29 - 0 = 29 Turn Around Time for P3 = 45 - 0 = 45 Turn Around Time for P4 = 55 - 0 = 55 Turn Around Time for P5 = 58 - 0 = 58
Average Turn Around Time =(5+29+45+55+58)/5 = 38.4 ms
Waiting Time = Starting time - Arrival time Waiting Time for P1 = 0 Waiting Time for P2 = 5 - 0 Waiting Time for P3 = 29 - 0 Waiting Time for P4 = 45 - 0 Waiting Time for P5 = 55 - 0
Average Turn Waiting Time =(0+5+29+45+55)/5 = 26.8 ms
Response Time = First response - Arrival time Response Time for P1 = 0 Response Time for P2 = 5 - 0 Response Time for P3 = 29 - 0 Response Time for P4 = 45 - 0 Response Time for P5 = 55 - 0
Average Response Time =(0+5+29+45+55)/5 = 26.8 ms
1. Services of OS
2. Functions of OS
3. Major Achievements of OS
4. Types of Operating Systems
5. Characteristics of Modern OS
6. Process States in OS
7. Difference Between Program and Process
8. Process Control Block (PCB) in OS
9. Life Cycle of Thread in OS
10. Difference between Process and Thread
11. CPU Scheduling in OS
12. First Come First Serve (FCFS) Scheduling