i want a program to calculate waiting time of each process in non preemptive scheduling, given their arrival time and burst time. Can someone help me for this??
Printable View
i want a program to calculate waiting time of each process in non preemptive scheduling, given their arrival time and burst time. Can someone help me for this??
There are a lot more details you have to fill in:
- does a thread/process run from start to finish without relinguishing control?
- what is the scheduling algorithm for submitted processes?
- does it take time to start and clean up a process?
kind regards,
Jos
Write a program to list the waiting time of the processes based on the arrival time and the burst time under non preemptive scheduling. In the Non Preemptive Scheduling, the current process keeps the CPU until it releases the CPU by terminating. The operating system never initiates a context switch from a running process to another process.
when there is more than one processes waiting for the CPU, the process which will release the cpu first by calculating the sum of arrival time and burst time, will be allocated.
Input
int process[] = {1, 2, 3, 4}
int arrival[] = {0, 2, 4, 5}
int burst[] = {7, 4, 1, 4}
Output
The function getWaitingList() returns {0, 6, 3, 7}
Explanation:
process 1 3 2 4
0 7 8 12 16 Start time of the process
The waiting time should be: 0, 6, 3, 7
Ah, this is homework, there is nothing challenging about it; so, what have you done yourself so far?
kind regards,
Jos
actually i am very new to java with a very little programming experience, i hav no idea how to solve this. Its my university assignment. Kindly help me to find a solution 4 this
Erm, the question asked was "what have you done yourself so far?"