2

We are doing a scheduler for heterogeneous computing.

The tasks can be identified by their deadline and their data-rate and can be regarded as a two dimensional graph. See image:

enter image description here

The rectangle identifies tasks to be scheduled on the GPU, and outside tasks to be scheduled on the CPU.

The problem is we want to efficiently identify the parameters for creating the best rectangle. I.e. the rectangle containing most tasks. A function determining whether or not a dot can be added to the current rectangle can be assumed present.

There can be up to 20.000 (dots) tasks, and the axis can be arbitrary long

Are there any known algorithms / data structures solving this problem?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Sune1987
  • 25
  • 5
  • 2
    Are there any more criteria for what makes a good rectangle? If it's just "contains the most tasks", then the best rectangle is one that contains all 20,000 dots. – Kevin Nov 30 '11 at 13:27
  • There are some resource constraints (whether the task-set can be scheduled or not). The function determining whether or not the dot can be added to the rectangle indicates this relationship. – Sune1987 Nov 30 '11 at 13:44
  • It's very odd that you plot this in 2d space and don't have any criteria for which device a task is best suited for. I thought the space would have a line or curve partitioning it in 2 areas and the decision would be how to move that line. You draw a box and have a binary result for some evaluation... – phkahler Nov 30 '11 at 14:54
  • We only assume a CPU / GPU configuration where everything within the rectangles are to be scheduled on the GPU and the remaining on the CPU. There are factors taking execution speed on GPU vs GPU into account. The scenario depicts heterogenous real-time scheduling of datastreams. – Sune1987 Nov 30 '11 at 15:18

2 Answers2

0

With the given information, you could do the following:

Start by adding the dot which is closest to the center of gravity of all the dots.

If n dots are already added, select as n+1st dot, the dot which is closest to the current rectangle. Ask your given function, whether this dot can be added.

If so, inflate the rectangle so it contains this dot. Assuming all dots have unique x and y coordinates, it is always possible to add just a single dot to the rectangle.

If not, terminate.

If this is not what you want, give more information.

Henrik
  • 23,186
  • 6
  • 42
  • 92
0

If you mean a hierarchical cluster you can use a spatial index or a space-filling-curve to subdivide the 2d graph in quadrants. A quadrant can represent a thread or a core. Then you need to sort the dots with this function and check for the quadrant with the most dots.

Micromega
  • 12,486
  • 7
  • 35
  • 72