If p1at.Text = 0 Then
p1ts = p1at.Text
p1tc = p1bt.Text
t1.Text = p1ts
t2.Text = p1tc
If p1tc > p2at.Text Then
p2tc = Val(p1tc) + Val(p2bt.Text)
t3.Text = p2tc
Else
p2tc = Val(p1tc - p2bt.Text) + Val(p2bt.Text)
t3.Text = p2tc
If p2tc > p2at.Text Then
p3tc = Val(p2tc) + Val(p3bt.Text)
t4.Text = p3tc
Else
p3tc = Val(p2tc - p3bt.Text) + Val(p3bt.Text)
t4.Text = p2tc
end if
end if
end if

there is a problem with my code. help. ..

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by dorothy.v

Yep there is a problem. It's not enclosed in code tags, nor does it come with anything to explain what it is trying to accomplish.

could not agree more. :D

Yep there is a problem. It's not enclosed in code tags, nor does it come with anything to explain what it is trying to accomplish.

cpu scheduling FCFS
the user can input 3 process state
this is the logic : smallest time + burst time = sum1
if the next arrival time is less than the sum1 then add the next burst time
but if the next arrival time is greater than the sum1 then subtract the sum1 to the arrival time so you will get the difference1. after that the difference1 must be added to the sum1 then add the burst time. that is the cycle.

what do you think is the appropriate formula with this. hope you can help me

at - arrival time
bt - burst time
I - idle
for example the user input 3 process
process 1 - at = 5
bt - 5
process 2 - at - 2
bt - 2
process 3 - at - 12
bt - 3
I P2 P1 P3
0 2 4 10 15