6/recent/ticker-posts

OS First Come First Serve

First Come First Serve ( FCFS )

First Come First Serve (FCFS) is an operating system scheduling algorithm that automatically executes queued requests and processes in order of their arrival. It is the easiest and simplest CPU scheduling algorithm. In this type of algorithm, processes which requests the CPU first get the CPU allocation first. This is managed with a FIFO queue. The full form of FCFS is First Come First Serve.

As the process enters the ready queue, its PCB (Process Control Block) is linked with the tail of the queue and, when the CPU becomes free, it should be assigned to the process at the beginning of the queue.


Q1. Given the process names, their burst times and their arrival order, write a C Program to compute the waiting time and turnaround time of 2 processes using the FCFS Algorithm and display them. The names of the processes are of type character, burst time and arrival order are of the type integers.

Ans: Click Here


Q2. Given the process names, their burst times and their arrival order, write a C Program to compute the waiting time and turnaround time of n processes using the FCFS Algorithm and display them. Also, compute and print the average waiting time and average turnaround time. The names of the processes are of type character array, burst time and arrival order are of the type integers.

Ans: Click Here 


Post a Comment

0 Comments