Posts

Showing posts with the label fcfs scheduling algorithm in c

FCFS scheduling algorithm in C (Operating Systems)

FCFS scheduling algorithm in C.  Its working code with output If you want explanation, you can view my YouTube video.  Youtube Link #include <stdio.h> #include <stdlib.h> typedef struct process { int id, at, bt, wt, tat, ct; } process; void sort(process pro[], int n) { process temp; for (int i = 0; i pro[j + 1].at) { temp = pro[j]; pro[j] = pro[j+1]; pro[j+1] = temp; } } void display(process pro[], int n) { printf("\n"); for (int i = 0; i