Response time calculation

Hi all,

I have a problem I am stumped due to the complexity.

Given 4 vectors.

timearrived = {0,2,4,5} // The time that a process arrives
servicetime = {3,6,5,1} // The time it takes for process to run

timeslotout = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14} // Time Slots
pidservedout = {1,1,1,2,2,2,2,2,2,3,3,3,3,3,4} // Process ID being served

I'm trying to write a algorithm that would calculate the response time (R=Tr/Ts) (Tr = turnaround time, Ts = Servicetime) for each process. In this case, process 1,2,3,4.

I been trying different things but there's just too much counters to keep track of and I'm stumped. Any help would be appreciated.
Hi kotsumu,

Welcome to cplusplus forum.

Can you post your code?

Topic archived. No new replies allowed.