A Partitioning Algorithm - PowerPoint PPT Presentation

1 / 5
About This Presentation
Title:

A Partitioning Algorithm

Description:

A Partitioning Algorithm. Let Ti be a task in T such that ... Scheduling for Horizontal Striping. Assume wi stripe units for supervideo Vi is stored on disk 0 ... – PowerPoint PPT presentation

Number of Views:19
Avg rating:3.0/5.0
Slides: 6
Provided by: amar89
Category:

less

Transcript and Presenter's Notes

Title: A Partitioning Algorithm


1
A Partitioning Algorithm
  • Let Ti be a task in T such that Pi ? Pj for all
    tasks Ti in T
  • S1 Ti, T T - Ti, For i2..g, Si ?
  • For i2..g
  • For every task Tl in T
  • maxTl gcd(S1 ? Tl) S w over all Tk in (S1
    ? Tl)
  • For j2..i-1
  • maxTl maxmaxTl , gcd(Sj ? Tl) S w over
    all Tk in (Sj ? Tl)
  • Let Tl be a task in T such that maxTl ? maxTk
    for every Tk in T
  • Si Tl, T T - Tl
  • For every Ti in T
  • For j1..g
  • SlackSj gcd(Sj ? Tl) S w over all Tk in
    (Sj ? Tl)
  • Add Ti to the subset Sj for which SlackSj is
    maximum

2
Scheduling for Horizontal Striping
  • Assume wi stripe units for supervideo Vi is
    stored on disk 0
  • The Problem
  • Schedule non-preemptible tasks T1Tr with periods
    P1Pr on q processors each task Ti has wi
    subtasks, with compute time of 1 interval
    between consecutive subtasks is m
  • If a task has P4, w3 and m6 is it schedulable?
  • Condition for subtasks of a single task Ti to be
    schedulable on a single processor
  • For all 1 ? j, k ? wi, j ? k, ((j-1).m) mod Pi ?
    ((k-1).m) mod Pi
  • Why?
  • What is the corresponding algorithm to test
    schedulability?

3
Testing for Schedulability
  • Procedure is_schedulable(T1..Tn,m)
  • Let ggcd(P1..Pn)
  • Take g time units 0..(g-1) that are not assigned
  • Sort the tasks in decreasing order of wi
  • For each task Ti in the sorted order
  • j0
  • while (j lt g)
  • if for k0(wi 1), time unit (jk.m) mod g is
    free
  • for k0(wi 1), assign time unit (jk.m) mod g
    to Ti
  • exit while
  • else jj1
  • If jg return FAIL
  • return (Ti , x) 1?? i ?? n and the first
    subtask of Ti is assigned to time unit x

4
Scheduling for Horizontal Striping
  • Algorithm schedule_tasks_2 Ozden 97
  • Ris_schedulable(T1Tn,m)
  • If RFAIL
  • Let gcd(P1...Pn,)g
  • If g1, return FAIL
  • Let T1Tn be tasks with periods P1/gPn/g and
    w1wn subtasks.
  • Partition the tasks into g subsets S1Sg.
  • For i1..g, let Ri schedule_tasks_2(Si,m/g)
  • If for any i Ri FAIL, return FAIL, else return
  • (Ti, x.g(j-1)) 1 ? j ? g and (Ti,x) ? Rj
  • Return R

5
Example
  • Tasks T1, T2, T3 with periods 6,8,8 have two
    subtasks each. The interval between them is 4.
  • Try the algorithm.
Write a Comment
User Comments (0)
About PowerShow.com