© 2012 Firstsoft Technologies (P) Limited. login
Hi 'Guest'
Home SiteMap Contact Us Disclaimer
enggedu
Quick Links
Easy Studies
« NS2  Projects »


C Program for First In First Serve Algorithm

C Program for First In First Serve Algorithm

#include #include #include void main() { int n,b[10],w[10],i,j,h; int stime[10]; float avg=0; clrscr(); printf("\n\tJOB SCHEDULING ALGORITHM[FCFS]"); printf("\n\t************************************************* ****\n"); printf("\nEnter howmany jobs:"); scanf("%d",&n); printf("\nEnter burst time for corresponding job....\n"); for(i=0;i

SAMPLE INPUT AND OUTPUT:

Enter howmany jobs:5

Enter burst time for corresponding job....

Process 1:4

Process 2:2

Process 3:8

Process 4:2

Process 5:9

process 1 waiting time is 0
Process 2 waiting time: 4
Process 3 waiting time: 6
Process 4 waiting time: 14
Process 5 waiting time: 16
total waiting time:40.000000

the average waiting time is:8.000000

Gaunt Chart
***************************************

        4▬▬▬▬2▬▬8▬▬▬▬▬▬▬▬2▬▬9▬▬▬▬▬▬▬▬▬
        04▬▬▬▬6▬▬▬▬▬▬14▬▬▬▬▬▬▬▬▬▬▬▬▬▬16▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

 
SLogix Student Projects

⇓ Student Projects ⇓
⇑ Student Projects ⇑
bottom