Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   Not sure how to do this. Can anyone help? (http://www.programmingforums.org/showthread.php?t=15722)

core8583 Apr 28th, 2008 11:52 AM

Not sure how to do this. Can anyone help?
 
I need to create a program that tells me the most effective way to run some processes.

Each process has a

* Load delay
* Amount of data it outputs.


Only one process can be loading at any time, So Processes can't begin to load during another processes load delay. But can output at the same time.

I needs a script the tells me in which order to load the process to get the data back as quick as possible, in the shortest amount time.

I been thinking about how i would write this script but i'm coming up blank, can anyone help?

OpenLoop Apr 28th, 2008 11:59 AM

Re: Not sure how to do this. Can anyone help?
 
Try calculating how much data per second each process can load (Amount of data/Load delay assuming the load delay is the total amount it takes to load the amount of data the process holds). You can then use that ratio to sort the processes in ascending order.

core8583 Apr 28th, 2008 12:48 PM

Re: Not sure how to do this. Can anyone help?
 
Quote:

Originally Posted by OpenLoop (Post 144456)
Try calculating how much data per second each process can load (Amount of data/Load delay assuming the load delay is the total amount it takes to load the amount of data the process holds). You can then use that ratio to sort the processes in ascending order.

I'm not quite sure what you mean, i already know the amount of time it takes for the process to long, do you mean just load them in order of load time, the shortest load time being first and the longest being last?

As this takes 19 seconds to get all the data back from the processes.

I have put the output into a excel sheet and i can see a way to order these process so that they can load in 16 seconds.

http://img231.imageshack.us/img231/1...rderqd8.th.gif

As a note, when the process turns green (in the image) the process has release resources that are needed to load another process, but will still take time to output all of it's data. sometime in bursts because of a timer within the process.


All times are GMT -5. The time now is 9:25 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC