Order Now

Operating Systems

Category:

No matching category found.

0 / 5. 0

Words: 275

Pages: 1

121

//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

Elly Tierney

5.0 (177 reviews)

Recent reviews about this Writer

I’ve already tried some writing services, and though some of them were not that bad, there always were some problems. I’m happy to find a company that really cares about its customers! I’ll surely get back with new orders.

View profile

Related Essays

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)

Movie review

Pages: 1

(275 words)

Evaluating A Used Car

Pages: 2

(550 words)

The City of London

Pages: 1

(275 words)

appeal letter revised

Pages: 1

(275 words)