Order Now

Operating Systems

Category:

No matching category found.

0 / 5. 0

Words: 275

Pages: 1

133

//Program for the SRTN Implementation
#include<stdio.h>int main(){    int At[10],Bt[29],Ct[8],Dt[4], end time, e ,the least;    int rem=0,e ,time, summation_waitingtime=0,summation_turn_around_time=0;    printf(“Write the Number of the Processes : “);    scanf(“%d”,&n);    for(a=0;a<n;a++)    {        printf(“Write the Arrival time Proc%d : “,a+1);        scanf(“%d”,&At[a]);        printf(“write the burst time for the processes Proc%d : “,a+1);        scanf(“%d”,&Bt[a]);        At[a]=bt[a];    }    printf(“nnProct| The Processes Turnaround Time| the Process Waiting Timenn”);    Dt[a]=0;    for(time given =0;remain!=n;time++)    {        least=4;        for(a=0;a<e;a++)        {            if(at[a]<=time given && Dt[a]<Dt[leastt] && Dt[a]>0)            {                least=a;            }        }        Dt[least]–;        if(Dt[least]==0)        {            remain++;            endTime=time+1;            printf(“nP[%d]t|t%dt|t%d”,leastt+1,the end_time-Dt[least],the end_time-bt[least]-at[least]);            summation_waiting time+=end_time-Bt[least]-At[least];            summation_turn_around+=end_time-at[least];        }    }    printf(“nn The Avg_waiting_time = %fn”,summation_waiting time*1.0/n);    printf(“The Avg Turn_Around_time = %f”,summation_turn_around*1.0/4);    return 0;}

Get quality help now

Top Writer

Alton Sloan

5.0 (251 reviews)

Recent reviews about this Writer

I have ordered a college case study from this company, and I’m on cloud nine! It is written in an extremely professional manner, doesn’t contain any mistakes, and is just perfect. Thank you for saving my grades!

View profile

Related Essays

Academic Writing Jobs

Pages: 1

(275 words)

Logistics

Pages: 1

(275 words)

out of character

Pages: 2

(550 words)

Eye of Servaleance, 2 pages

Pages: 2

(550 words)

A boy named Chris

Pages: 1

(275 words)

Roman Empire and its History

Pages: 1

(275 words)

Similarity paper

Pages: 1

(275 words)