From 226af0508878c92966d621cb4e456542c70b224c Mon Sep 17 00:00:00 2001 From: Sreehari0101 <109453037+Sreehari0101@users.noreply.github.com> Date: Sat, 29 Oct 2022 00:49:25 +0530 Subject: [PATCH] non premptive sjf scheduling --- c/sjfscheduling.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 c/sjfscheduling.c diff --git a/c/sjfscheduling.c b/c/sjfscheduling.c new file mode 100644 index 0000000..81a0385 --- /dev/null +++ b/c/sjfscheduling.c @@ -0,0 +1,61 @@ +#include +int main() +{ + int i,n,j,total_wt=0,total_tat=0,pos,temp; + float avg_wt,avg_tat; + int bt[10],proc[10],wt[10],tat[10]; + + printf("Enter the no of processes:"); + scanf("%d",&n); + for(i = 0;i