Operating Systems

Sample banner

0 / 5. 0

Operating Systems

Category: Problem solving

Subcategory: Computer Science

Level: Masters

Pages: 1

Words: 275

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

Free Operating Systems Essay Sample, Download Now

Don’t waste time!

Order Original Essay on the Similar Topic

Get an original paper on the same topic

from $10 per-page