Skip to content

Commit c7454f7

Browse files
authored
Update Implementation_of_SJF.java
1 parent b61133c commit c7454f7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Implementation_of_SJF.java

+12
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,15 @@ public static void main(String args[]){
3636
c = i;
3737
}
3838
}
39+
40+
if (c == n)
41+
system_time++;
42+
else{
43+
completion_time[c] = system_time + burst_time[c];
44+
system_time += burst_time[c];
45+
turn_around[c] = completion_time[c] - arrival[c];
46+
wait[c] = turn_around[c] - burst_time[c];
47+
flag[c] = 1;
48+
total++;
49+
}
50+
}

0 commit comments

Comments
 (0)