• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Mmclass9
 

Mmclass9

on

  • 20 views

MULTIMEDIA AND SYSTEM DESIGN

MULTIMEDIA AND SYSTEM DESIGN

Statistics

Views

Total Views
20
Views on SlideShare
20
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • If the start time for Ti is 0 the j-th subtask is scheduled at times (j-1)m, (j-1).m+Pi, (j-1)m+2Pi …So tasks j and k will be scheduled together iff (j-1)m mod Pi = (k-1)m mod Pi <br />

Mmclass9 Mmclass9 Presentation Transcript

  • 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 i=2..g, Si = φ • For i=2..g • For every task Tl in T • max[Tl] = gcd(S1 ∪ {Tl}) – Σ w over all Tk in (S1 ∪ {Tl}) • For j=2..i-1 – max[Tl] = max{max[Tl] , gcd(Sj ∪ {Tl}) – Σ w over all Tk in (Sj ∪ {Tl})} • Let Tl be a task in T such that max[Tl] ≤ max[Tk] for every Tk in T • Si = {Tl}, T = T - {Tl} • For every Ti in T • For j=1..g • Slack[Sj] = gcd(Sj ∪ {Tl}) – Σ w over all Tk in (Sj ∪ {Tl}) • Add Ti to the subset Sj for which Slack[Sj] is maximum
  • Scheduling for Horizontal Striping • Assume wi stripe units for supervideo Vi is stored on disk 0 • The Problem • Schedule non-preemptible tasks T1…Tr with periods P1…Pr on q processors; each task Ti has wi subtasks, with compute time of 1; interval between consecutive subtasks is m • If a task has P=4, w=3 and m=6 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
  • Testing for Schedulability • Procedure is_schedulable({T1..Tn},m) • Let g=gcd(P1..Pn) • Take g time units 0..(g-1) that are not assigned • Sort the tasks in decreasing order of wi • For each task Tiin the sorted order • j=0 • while (j < g) – if for k=0…(wi – 1), time unit (j+k.m) mod g is free • for k=0…(wi – 1), assign time unit (j+k.m) mod g to Ti • exit while – else j=j+1 • If j=g return FAIL • return {(Ti, x): 1 ≤ i ≤ n and the first subtask of Tiis
  • Scheduling for Horizontal Striping • Algorithm schedule_tasks_2 [Ozden 97] • R=is_schedulable({T1…Tn},m) • If R=FAIL • Let gcd(P1...Pn,)=g • If g=1, return FAIL • Let T1…Tn be tasks with periods P1/g…Pn/g and w1…wn subtasks. • Partition the tasks into g subsets S1…Sg. • For i=1..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
  • Example • Tasks T1, T2, T3 with periods 6,8,8 have two subtasks each. The interval between them is 4. • Try the algorithm.
  • Example • Tasks T1, T2, T3 with periods 6,8,8 have two subtasks each. The interval between them is 4. • Try the algorithm.