If you dont know what SRT is
https://en.wikipedia.org/wiki/Shortest_remaining_timebasically i need to implement that algorithm along with other sorting algorithms into a program, and im having a hard time understanding how to implement it.
Can anyone help me in terms on making the pseudo code of the SRT algorithm?
the information in which the user is entering is the Arrival time, and execution time of each process. Based on that info i need to output the turn around time and the waiting time.
ex. Process 1: Arrival time = 0, execution time = 3
Process 2: Arrival time = 2, execution time = 2
process n: arrival time =x , execution time = y
etc.
The information is being stored in the following struct
struct process
{
int number, arrival_time, waiting_time, execution_time, trnaround_time, finish_time, time,remain_time;
};
all of those fields dont have to be used, but some of them are being used in other sorting algorithms.
its going to be implemented in c++ ( dont think the language really matters though)
thanks!