Skip to content

Implement the Coffman-Graham Algorithm for Scheduling #1

Description

@gabyx

Coffman-Graham Algorithm

  • Assume all tasks execute the same amount of time.
    • mu(Ti) = 1.
  • Definitions:
    • If Ti < Tj, then Tj is an immediate successor of Ti.
    • Let S(Ti) be all immediate successors of Ti.
    • Let alpha(T) be an integer label assigned to T.
    • Let N(Ti) be the ordered sequence of integers formed from the set { alpha(T') | T' in S(Ti) }.
  • Find: task list for Graham's algorithm.
  • Algorithm:
    1. Choose Tk with S(Tk)=0 and let alpha(Tk) be 1.
    2. For i <-2 to n do
      1. Let R be the set of unlabeled tasks with no unlabeled successors.
      2. Let T* be the task in R such that N(T*) is lexicographically smaller than N(T) for all T in R.
      3. Let alpha(T*) <-i.
    3. Construct L = (Un, Un-1, ..., U2, U1) such that alpha(Ui) = i.
  • Theorem: w/w0 <=2 - 2/p
    • w length of constructed schedule, w0 length of optimal schedule, p > 1 processor number.
  • Collary: schedule optimal for p=2.

Links : https://medium.com/@bolerio/scheduling-tasks-and-drawing-graphs-the-coffman-graham-algorithm-3c85eb975ab

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions