The process that comes first will be executed first.
Assume all the process has arrived at same time and you have to consider the process with low process id to have arrived first.
The next process starts only after the previous gets fully executed.
The first line contains an integer ‘T’, which denotes the number of test cases to be run. Then, the T test cases follow.
The first line of each test case contains a single positive integer, ‘N’, denoting the number of Processes.
The second line of each test case contains ‘N’ space-separated non-negative integers denoting the ‘burst’ time of each process.
For each test case, print the two lines.
The first will contain the “waiting time” of each process separated by the space in the same order in which they are input.
The second will contain the “turn-around time” of each process separated by the space in the same order in which they are input.
Output for each test case will be printed in a separate line.
You do not need to print anything. It has already been taken care of. Just implement the given function.
1 <= T <= 10
1 <= N <= 10^6
1 <= BURST[i], ARRIVAL[i]<= 1000
Where ‘T’ denotes the number of test cases, ‘N’ denotes the number of processes, ‘BURST’ represents the ‘burst time’ of each process, and ‘ARRIVAL’ represents the ‘arrival time’ of each process.
Time Limit: 1sec
Shortest Job First(Non - preemptive)
FCFS Scheduling Algorithm with Different Arrival Time
Priority CPU Scheduling : 2
Round Robin Scheduling with different arrival times
Page Faults