0
Calculating Delay for each job
I have algorithms and I can’t solve it in java code The algorithm wants to calculate the delay time for each job And I will write the each job in array And i have 3 jobs
8 Respuestas
0
can you elaborate on the question? The question is unclear.
0
C0=0.0; /assume that a=0.0 /
I=0;
While (more jobs to process)
{
I++ ;
a=GetArrival();
If (a<ci-1)
d=ci-1 -a;
Else
d=0.0;
S=Getservice();
Ci=a+d+s;
}
n=i;
Return d1,d2,.....,dn;
0
That is the algorithm
0
for the delay, use time module and its functions and get the difference at start and end.
0
I don’t understand you 💔😭
0
is delay fixed for each job? because the statement d=c[i]-1-a is confusing. what does c[] holds? whats "a"?
0
There are array for a ,d, s
But really I don’t understand the algorithm and how I will write it in java
0
from what I understand from code, the delay is for some special cases. Some variables are unclear. but GetArrival can be the job start time and based on what the value is, the IF condition determines the delay.
consult the documentation instead of code to understand the algo. The pseudocode is very badly written.