Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Name: FCFS Scheduling Algorithm
Nội dung xem thử
Mô tả chi tiết
//**************************************
// Name: FCFS Scheduling Algorithm
// Description:This code implements the First come First Served Scheduling Algorithm. It gets the number
of processes and the process name, burst time and arrival time for each user from the user. It then sorts
the processes depending upon the arrival time. Calculates and displays the average turn around time and
waiting time.Then it will display the Gantt chart.
// By: Sathya Priya
//
// Inputs:1. Number of processes
//2. Process name
//3. Burst Time
//4. Arrival Time
//
//This code is copyrighted and has// limited warranties.Please see http://www.Planet-SourceCode.com/vb/scripts/ShowCode.asp?txtCodeId=11821&lngWId=3//for
details.//**************************************
/* FIRST COME FIRST SERVED SCHEDULING ALGORITHM*/
//PREPROCESSOR DIRECTIVES
#include<stdio.h>
#include<conio.h>
#include<string.h>
//GLOBAL VARIABLES - DECLARATION
int n,Bu[20],Twt,Ttt,A[10],Wt[10],w;
float Awt,Att;
char pname[20][20],c[20][20];
//FUNCTION DECLARATIONS