Hi guys!! do you know where i can find sample codes on how to develop a program which simulates FCFS and RR Scheduling?? It would help a lot.. Thanks.. ^_^

Hi guys!! do you know where i can find sample codes on how to develop a program which simulates FCFS and RR Scheduling?? It would help a lot.. Thanks.. ^_^

code for the button answer

*bt stands for Burst Time
*frmfcfs is thename of the form i made
*wt is waiting time
*awt is average waiting time

Private Sub cmdanswer_Click()
frmfcfs.bt1 = Val(0)
frmfcfs.bt2 = Val(bt1.Text)
frmfcfs.bt3 = Val(bt1.Text) + Val(bt2.Text)
frmfcfs.bt4 = Val(bt1.Text) + Val(bt2.Text) + Val(bt3.Text)
frmfcfs.bt5 = Val(bt1.Text) + Val(bt2.Text) + Val(bt3.Text) + Val(bt4.Text)

frmfcfs.txtwt = Val(frmfcfs.bt1.Text) + Val(frmfcfs.bt2.Text) + Val(frmfcfs.bt3.Text) + Val(frmfcfs.bt4.Text) + Val(frmfcfs.bt5.Text)
frmfcfs.txtawt = Val(frmfcfs.txtwt.Text) / 5
frmfcfs.Show

End Sub

hope i helped you out with this

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.