d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Iso: Help On Srt Algorithm Implementation
Add Reply New Topic New Poll
Member
Posts: 19,256
Joined: Mar 24 2008
Gold: 710.00
Dec 6 2015 11:50am
If you dont know what SRT is
https://en.wikipedia.org/wiki/Shortest_remaining_time

basically 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!
Member
Posts: 19,256
Joined: Mar 24 2008
Gold: 710.00
Dec 6 2015 01:53pm
i managed to figure it out, mods please close :D
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll