75
Welcome! Welcome!

Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Embed Size (px)

Citation preview

Page 1: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Welcome!Welcome!

Page 2: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

PhD Dissertation DefensePhD Dissertation Defense

PhD Candidate: Wenming Li

Advisor: Dr. Krishna M. KaviCommittee:

Dr. Krishna M. KaviDr. Robert AklDr. Phil Sweany

Page 3: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Group-EDFGroup-EDF - A New Approach And An - A New Approach And An Efficient Non-Preemptive Efficient Non-Preemptive

Algorithm for Soft Real-Time Algorithm for Soft Real-Time SystemsSystems

Page 4: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

ContributionsContributions

A new approach for soft real-time systems.

A new scheduling algorithm for soft real-time systems and soft Real-Time Operating System (RTOS).

Page 5: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Contributions (Cont’d)Contributions (Cont’d)

Our research work is a new approach for soft real-time systems.

- First proposed the strategy of the dynamic grouping of tasks with deadlines.

- First proposed a two-level scheduling scenario for real-time tasks.

Page 6: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Contributions (Cont’d)Contributions (Cont’d)

Group-EDF is a new scheduling algorithm for soft RTOS and real-time systems.- First proposed to use Earliest Deadline First (EDF) for dynamic groups and Shortest Job First (SJF) within a group.

Page 7: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

FocusFocus

Soft real-time systems and soft RTOS.Non-preemptive scheduling.Real-time periodic, aperiodic, or

sporadic tasks.

Page 8: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

The Taxonomy of Real-time The Taxonomy of Real-time Scheduling Scheduling

Our EDF/gEDF algorithm is applicable to the shaded regionOur EDF/gEDF algorithm is applicable to the shaded region

Page 9: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Terminology of the Real-Time Terminology of the Real-Time ModelModel

Page 10: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Hard Real-Time SystemsHard Real-Time Systems

Every resource management system must work in the correct order to meet time constraints. No deadline miss is allowed.

Disadvantage

- Low utilization

Page 11: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Soft Real-Time SystemsSoft Real-Time Systems

It is similar to hard real-time systems. But it is not necessary that every time constraint be met. Some deadline miss is tolerated.

Advantage

- High utilization

Page 12: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Non-Preemptive SchedulingNon-Preemptive Scheduling

Why non-preemptive?

- non-preemptive scheduling is more efficient than preemptive scheduling since preemption incurs context switching overhead which can be significant in fine-grained multithreading systems.

Page 13: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Basic Real-Time SchedulingBasic Real-Time Scheduling

First Come First Served (FCFS)Round Robin (RR)Shortest Job First (SJF)

Page 14: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

First Come First Served First Come First Served (FCFS)(FCFS)

Simple “first in first out” queueLong average waiting timeNegative for I/O bound processesNonpreemptive

Page 15: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Round Robin (RR)Round Robin (RR)

FCFS + preemption with time quantumPerformance (average waiting time) is

proportional to the size of the time quantum.

Page 16: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Shortest Job First (SJF)Shortest Job First (SJF)

Optimal with respect to average waiting time.

Requires profiling of the execution times of tasks.

Page 17: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Static Priority Scheduling – Static Priority Scheduling – Rate-Monotonic (RM)Rate-Monotonic (RM)

The shorter the period of a task, the higher is its priority (relative deadline = period).

A set of n independent, periodic jobs can be scheduled by the rate monotonic policy if

e1/P1 + e2/P2 + … + en/Pn n (21/n - 1)

- The upper bound on utilization is ln2 = 0.69 as n approaches infinity.

Page 18: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Static Priority Scheduling – Static Priority Scheduling – Deadline-Monotonic (DM)Deadline-Monotonic (DM)

The shorter the relative deadline of a task, the higher is its priority.

Suitable when relative deadline period

For arbitrary relative deadlines, DM outperforms RM in terms of utilization.

Page 19: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Dynamic Priority Scheduling – Dynamic Priority Scheduling – Earliest Deadline First (EDF)Earliest Deadline First (EDF)

The first and the most effectively widely used dynamic priority-driven scheduling algorithm.

Effective for both preemptive and non-preemptive scheduling periodic, aperiodic, and sporadic tasks.

Page 20: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Preemptive EDFPreemptive EDF

For a set of preemptive periodic, aperiodic, and sporadic tasks, EDF is optimal in the sense that EDF will find a schedule if a schedule is possible for other algorithms.

- Approach 100% utilization for periodic tasks

Page 21: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Non-Preemptive EDFNon-Preemptive EDF

Optimal for sporadic non-preemptive tasks.

Scheduling periodic and aperiodic non-preemptive tasks is NP-hard.

- Approach near optimal for non-preemptive scheduling on a uniprocessor system.

Page 22: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Theory of EDFTheory of EDF

Minimize maximum lateness Lmax = max {Li | i = 1, …, n} = max {Ci - di | i = 1, …, n}

The problem: 1 | nonpmtn | Lmax Any sequence of jobs in nondecreasing order of due dates

di, results in an optimal schedule. The scheduling problem {1 | nonpmtn, ri | Lmax} is NP-hard. Let Lmax = max {Ci - di | i = 1, …, n} = 0, that is, all

deadlines of tasks must be met.

Page 23: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

POSIX 1003.1bPOSIX 1003.1b

Portable Operating System Interface (POSIX) 1003.1b, the IEEE Computer Society’s Portable Application Standards Committee (PASC)- SCHED FIFO

- SCHED RR

- SCHED OTHER

Page 24: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Related WorkRelated Work

Domino Effect of EDF- Overload

Overload Detection And Control- Best-effort by value-density V/C - Admission control- Disadvantage:

Needing accurate utilization computingSwitching between two scheduling schemesUsing Worst Case Execution Time (WCET)

Page 25: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Related WorkRelated Work

SCAN-EDF for disk scheduling- Use SJF to break deadline ties

Quantized deadlines (from CMU)

- Static deadline windows

Page 26: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Our Real-time ModelOur Real-time Model

A task (job) in a real-time system or a thread in multithreading processing i is

defined as:

i = (ri, ei, Di, Pi)

Page 27: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Overview of gEDFOverview of gEDF

Divide real-time jobs into groups by their deadlines, dynamically.

Groups are based on EDF but tasks within a group may be scheduled based on a different scheme - SJF, Value, Priority, etc.

gEDF is used both in underload and overload.

Page 28: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Overview of gEDF (Cont’d)Overview of gEDF (Cont’d)We use SJF to enhance EDF, but it is

extensible to other scheduling schemes.gEDF is suitable for non-preemptive

soft-real-time systems.The criteria of selecting suitable

grouping policy is flexible Static deadline windows Dynamic windows as jobs arrive

Page 29: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Overview of gEDF (Cont’d)Overview of gEDF (Cont’d)

A group in the gEDF algorithm depends on a group range parameter Gr.

A job j belongs to the same group as job i if di dj (di + Gr*(di – t)), where t is the current time, 1 i, j N. We group jobs with deadlines that are very close to each other.- The jobs with very close deadlines are in a group (but not necessary if at the boundary of groups)

Page 30: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

The gEDF AlgorithmThe gEDF Algorithm

We assume a uniprocessor system. QgEDF is a queue for gEDF scheduling. The current time is represented by t. |QgEDF| represents the length of the queue QgEDF. = (r, e, D, P) is the job at the head of the queue.- gEDF Group = {k | k QgEDF, dk – d1 D1 * Gr, 1 k m, where m |QgEDF|}, and D1 is the deadline of the first job in a group

Page 31: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

The gEDF Algorithm (Cont’d)The gEDF Algorithm (Cont’d)

Function Enqueue (QgEDF, ) if ( ’s deadline d > t ) then

insert job into QgEDF by Earliest

Deadline First, i.e. di di+1 di+2,

where i, i+1, i+2 QgEDF, 1 i |QgEDF| - 2;

end

- Enqueue is invoked on job arrivals.

Page 32: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

The gEDF Algorithm (Cont’d)The gEDF Algorithm (Cont’d)

Function Dequeue (QgEDF) if QgEDF then

find a job min with emin = min {ek | k QgEDF,

dk – d1 Gr*D1, 1 k m, where m |QgEDF|};

run it and delete min from QgEDF; end

- Dequeue is called when the processor becomes idle.

Page 33: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

The ExperimentThe Experiment

Used MATLAB provided tools to generate tasks.

- In each experiment generated N tasks.

- The jobs are scheduling using EDF & gEDF.

- The experiment is truncated at a predetermined time T.

Success rate is computed based on m out of N jobs completed.

Page 34: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

The Experiment (Cont’d)The Experiment (Cont’d)

Varied

- Load (or utilization)

- Execution time

- Deadline (tight deadlines & loose deadlines)

- Group range

- Deadline tolerance (hard vs. soft real-time)

Page 35: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

The Experiment (Cont’d)The Experiment (Cont’d)

For each set of parameters, the experiment is repeated 100 times and the results shown are the averages from the 100 experiments.

Page 36: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Success Ratio: gEDF vs. EDFSuccess Ratio: gEDF vs. EDFDeadline Tolerance Deadline Tolerance Tr =Tr = 0.2 0.2

0.65

0.70

0.75

0.80

0.85

0.90

0.95

1.00

0.1

0.3

0.5

0.7

0.9

1.1

1.3

1.5

1.7

1.9

2.1

2.3

2.5

2.7

2.9

Utilization

Su

cc

es

s R

atio

EDF

gEDF

Page 37: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Success Ratio: gEDF vs. EDFSuccess Ratio: gEDF vs. EDFDeadline Tolerance Deadline Tolerance TrTr = 0.5 = 0.5

0.50

0.60

0.70

0.80

0.90

1.00

0.1

0.3

0.5

0.7

0.9

1.1

1.3

1.5

1.7

1.9

2.1

2.3

2.5

2.7

2.9

Utilization

Succ

ess

Rat

io

EDF

gEDF

Page 38: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Success Ratio: gEDF vs. EDFSuccess Ratio: gEDF vs. EDFDeadline Tolerance Deadline Tolerance TrTr = 1.0 = 1.0

0.40

0.50

0.60

0.70

0.80

0.90

1.00

0.1

0.3

0.5

0.7

0.9

1.1

1.3

1.5

1.7

1.9

2.1

2.3

2.5

2.7

2.9

Utilization

Suc

cess

Rat

io

EDF

gEDF

Page 39: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Success Ratio: gEDF vs. EDFSuccess Ratio: gEDF vs. EDFSummary of the three previous figuresSummary of the three previous figures

90%100%110%120%130%140%150%160%170%180%

0.1

0.3

0.5

0.7

0.9

1.1

1.3

1.5

1.7

1.9

2.1

2.3

2.5

2.7

2.9

Utilization

Suc

cess

-rat

io P

erfo

rman

ce

Fac

tor

Tr=0.2

Tr=0.5

Tr=1.0

Page 40: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Success Ratio: gEDF vs. EDFSuccess Ratio: gEDF vs. EDFSummary of the three previous figuresSummary of the three previous figures

The gEDF algorithm obtains higher success ratio under higher system loads.

Suitable for soft real-time systems.

Page 41: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Success Ratio: gEDF vs. Success Ratio: gEDF vs. EDF/Best-Effort/GuaranteeEDF/Best-Effort/Guarantee

Summary when Summary when TrTr = 0.5 = 0.5

Page 42: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Effect of Deadline Laxity on Effect of Deadline Laxity on Success RatioSuccess Ratio

Tight Deadline Tight Deadline DD = 1 (Deadline = Execution Time) = 1 (Deadline = Execution Time)

and hard real-time and hard real-time

0.20.30.4

0.50.60.70.8

0.91.0

0.1

0.3

0.5

0.7

0.9

1.1

1.3

1.5

1.7

1.9

2.1

2.3

2.5

2.7

2.9

Utilization

Su

cc

es

s R

atio EDF: Tr=0

gEDF: Tr=0

Page 43: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

0.20.3

0.40.5

0.60.7

0.80.9

1.0

0.1

0.3

0.5

0.7

0.9

1.1

1.3

1.5

1.7

1.9

2.1

2.3

2.5

2.7

2.9

Utilization

Su

cc

es

s R

atio

EDF: Tr=1.0

gEDF: Tr=1.0

Effect of Deadline Laxity on Effect of Deadline Laxity on Success RatioSuccess Ratio

Tight Deadline Tight Deadline DD = 1 (Deadline = Execution Time) = 1 (Deadline = Execution Time)

and softer real-time and softer real-time

Page 44: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

0.60

0.65

0.70

0.75

0.80

0.85

0.90

0.95

1.00

0.1

0.3

0.5

0.7

0.9

1.1

1.3

1.5

1.7

1.9

2.1

2.3

2.5

2.7

2.9

Utilization

Su

cc

es

s R

atio

EDF: Tr=0gEDF: Tr=0EDF: Tr=0.2gEDF: Tr=0.2

Effect of Deadline Laxity on Effect of Deadline Laxity on Success RatioSuccess Ratio

Loose Deadline Loose Deadline DD = 5 (Deadline = 5*Execution Time) = 5 (Deadline = 5*Execution Time)

Page 45: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

0.4

0.5

0.6

0.7

0.8

0.9

1.0

0.1

0.3

0.5

0.7

0.9

1.1

1.3

1.5

1.7

1.9

2.1

2.3

2.5

2.7

2.9

Utilization

Su

cc

es

s R

atio

EDF: Tr=0.5gEDF: Tr=0.5EDF: Tr=1.0gEDF: Tr=1.0

Effect of Deadline Laxity on Effect of Deadline Laxity on Success RatioSuccess Ratio

Loose Deadline Loose Deadline DD = 5 (Deadline = 5*Execution Time) = 5 (Deadline = 5*Execution Time)

Page 46: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Effect of Deadline on Effect of Deadline on Success RatioSuccess Ratio

Success Ratio of Success Ratio of EDFEDF when when DD = 1, 2, 5, 10, and 15 = 1, 2, 5, 10, and 15

(i.e. Deadline = (i.e. Deadline = DD*Execution Time)*Execution Time)

0.20

0.30

0.40

0.50

0.60

0.70

0.80

0.90

1.00

0.1

0.3

0.5

0.7

0.9

1.1

1.3

1.5

1.7

1.9

2.1

2.3

2.5

2.7

2.9

Utilization

Su

cc

es

s R

atio

D=1D=2D=5D=10D=15

Page 47: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Effect of Deadline onEffect of Deadline onSuccess RatioSuccess Ratio

Success Ratio of Success Ratio of gEDFgEDF when when DD = 1, 2, 5, 10, and 15 = 1, 2, 5, 10, and 15

(i.e. Deadline = (i.e. Deadline = DD*Execution Time)*Execution Time)

0.20

0.30

0.40

0.50

0.60

0.70

0.80

0.90

1.000

.10

.30

.50

.70

.91

.11

.31

.51

.71

.92

.12

.32

.52

.72

.9

Utilization

Su

cc

es

s R

atio

D=1D=2D=5D=10D=15

Page 48: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Effect of Deadline onEffect of Deadline onSuccess RatioSuccess Ratio

The gEDF algorithm has higher performance (i.e. success ratio) than EDF with greater deadline laxity and greater deadline tolerances.

Page 49: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Effect of Group Range (Effect of Group Range (GrGr))GrGr = 0.1, 0.2, 0.5, 1.0, = 0.1, 0.2, 0.5, 1.0, TrTr = 0.1 = 0.1

0.65

0.700.75

0.800.85

0.900.95

1.00

0.5

0.7

0.9

1.1

1.3

1.5

1.7

1.9

2.1

2.3

2.5

2.7

2.9

Utilization

Suc

cess

Rat

io

Gr:0.1Gr:0.2Gr:0.5Gr:1.0

Page 50: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Effect of Group Range (Effect of Group Range (GrGr))GrGr = 0.1, 0.2, 0.5, 1.0, = 0.1, 0.2, 0.5, 1.0, TrTr = 0.5 = 0.5

0.65

0.70

0.75

0.80

0.85

0.90

0.95

1.00

0.5

0.7

0.9

1.1

1.3

1.5

1.7

1.9

2.1

2.3

2.5

2.7

2.9

Utilization

Suc

cess

Rat

io

Gr:0.1Gr:0.2Gr:0.5Gr:1.0

Page 51: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Effect of Group Range (Effect of Group Range (GrGr))Within our experimental range, the size

of the group does not seem to show a great variance.

Intuitively- very large range means gEDF = SJF- Very short range means gEDF = EDF

Optimal window depends on execution times of jobs, deadline tightness, deadline tolerance.

Page 52: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Response Time: gEDF vs. EDFResponse Time: gEDF vs. EDFDeadline Tolerance Deadline Tolerance TrTr = 0 = 0

0

50

100

150

200

250

300

350

400

0.1

0.3

0.5

0.7

0.9

1.1

1.3

1.5

1.7

1.9

2.1

2.3

2.5

2.7

2.9

Utilization

Re

sp

on

se

Tim

e EDF

gEDF

Page 53: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Response Time: gEDF vs. EDFResponse Time: gEDF vs. EDFDeadline Tolerance Deadline Tolerance TrTr = 0.5 = 0.5

0

50

100

150

200

250

300

350

400

0.1

0.3

0.5

0.7

0.9

1.1

1.3

1.5

1.7

1.9

2.1

2.3

2.5

2.7

2.9

Utilization

Re

sp

on

se

Tim

e EDF

gEDF

Page 54: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Response Time: gEDF vs. EDFResponse Time: gEDF vs. EDFDeadline Tolerance Deadline Tolerance TrTr = 1.0 = 1.0

0

50

100

150

200

250

300

350

4000

.10

.30

.50

.70

.91

.11

.31

.51

.71

.92

.12

.32

.52

.72

.9

Utilization

Re

sp

on

se

Tim

e EDF

gEDF

Page 55: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Response Time: gEDF vs. EDFResponse Time: gEDF vs. EDF

The gEDF algorithm can yield better (=faster) response times than EDF.

Both in underloaded and overloaded situations.

Deadline tolerance Tr has greater impact on gEDF than on EDF.

Page 56: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Response Time: gEDF vs. Response Time: gEDF vs. EDF/Best-Effort/GuaranteeEDF/Best-Effort/Guarantee

Summery Summery Tr = 0.2Tr = 0.2

Page 57: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

The Effect of Deadline onThe Effect of Deadline onResponse TimeResponse Time

Response time of Response time of EDFEDF when when DD = 1, 2, 5, and 10 = 1, 2, 5, and 10

0

50100

150200

250

300350

400

0.1

0.3

0.5

0.7

0.9

1.1

1.3

1.5

1.7

1.9

2.1

2.3

2.5

2.7

2.9

Utilization

Re

sp

on

se

Tim

e

D=1D=2

D=5D=10

Page 58: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

The Effect of Deadline onThe Effect of Deadline on Response Time Response Time

Response time of Response time of gEDFgEDF when when DD = 1, 2, 5, and 10 = 1, 2, 5, and 10

0

50

100

150

200

250

300

350

400

0.1

0.3

0.5

0.7

0.9

1.1

1.3

1.5

1.7

1.9

2.1

2.3

2.5

2.7

2.9

Utilization

Re

sp

on

se

Tim

e

D=1D=2D=5D=10

Page 59: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

The Effect of Deadline onThe Effect of Deadline onResponse TimeResponse Time

When expected value of deadlines D is

sufficiently large (>2), gEDF results in faster response times than EDF does.

Page 60: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

The gEDF ImplementationThe gEDF Implementation in the Linux Kernel in the Linux Kernel

Keep the original functions for non-real-time applications.

Modify structure task_struct and add a new specific runqueue for EDF/gEDF.

Add the system call (extension to POSIX)

sys_sched_setscheduler_plus

Page 61: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

The gEDF ImplementationThe gEDF Implementation in the Linux Kernel (Cont’d) in the Linux Kernel (Cont’d)

Add a new structure

struct edf_param {

unsigned long policy;

unsigned long period;

unsigned long length;

}

Page 62: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

The gEDF ImplementationThe gEDF Implementationin the Linux Kernel (Cont’d)in the Linux Kernel (Cont’d)

Dequeue_edf_task() Enqueue_edf_task() (for EDF & gEDF)Schedule() (include the gEDF algorithm)

- Every one jiffy (1ms), entering the kernel to run schedule function (user process can also yield to other process) - Complexity O(n) (If using heap, O(log(n)). ref. Ingo Molnar O(1))

Page 63: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Benchmark TestingBenchmark TestingTest SuitesTest Suites

Page 64: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Benchmark Testing (Cont’d)Benchmark Testing (Cont’d)Another Test SuiteAnother Test Suite

Page 65: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Testing ResultsTesting Results

Page 66: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Testing Results (Cont’d)Testing Results (Cont’d)gEDF’s Success Ratio/EDF’s Success RatiogEDF’s Success Ratio/EDF’s Success Ratio

100101

107

117

114

90 95 100 105 110 115 120

1

1.13

1.31

1.43

1.63

1 1.13 1.31 1.43 1.63

Y - axis: LoadX - axis: gEDF’s Success Ratio / EDF’s Success Ratio

Page 67: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

ConclusionsConclusionsgEDF performs as well as or better than

EDF and adaptive algorithms such as Best-Effort and Guarantee schemes. In underloaded, gEDF performs as well as

EDF in terms of success ratio; gEDF shows higher success rates than EDF when dealing with soft real-time tasks.

In underloaded, gEDF performs much better than EDF in terms of response time.

Page 68: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Conclusions (Cont’d)Conclusions (Cont’d)In underloaded, gEDF obtains overall better

performance than adaptive algorithms in terms of success ratio and response time.

In overloaded, gEDF consistently outperforms EDF both in success ratio and response time.

In overloaded, gEDF obtains overall better performance than adaptive algorithms in terms of success ratio and response time.

Page 69: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Conclusions (Cont’d)Conclusions (Cont’d)SummarySummary

Algorithm Success Ratio Response TimeUnderload Overload Underload Overloa

d

Group-EDF vs. EDF = > >= >>Group –EDF vs. AdaptiveAlgorithm

Best-Effort = > >= >

GuaranteeScheme

= >> >= >>

=: at least as good as >=: better or as good as>: better >>: much better

Page 70: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Future WorkFuture WorkExplore the applicability of gEDF

algorithm for Scheduled Dataflow (SDF) Architecture.

Explore if gEDF can be used to obtain acceptable (and near optimal) results for multiprocessor systems with soft real-time tasks.

Exploring different scheduling scheme applied within each gEDF.

Page 71: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

gEDF for SDFgEDF for SDF

SU: Scheduling Unit

EP: Execution Processor SP: Synchronization Processor

PLC: Preload PSC: Poststore EXC: Execution

Page 72: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

gEDF for MultiprocessorgEDF for Multiprocessor

EDF is not optimal for multiprocessor real-time systems.

The EDF scheme can be used to schedule dynamic groups on multiprocessors.

An optimal or near optimal algorithm may be adopted to schedule jobs distributed on different processors within each dynamic group.

Page 73: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

gEDF for Multiprocessor gEDF for Multiprocessor (Cont’d)(Cont’d)

Advantage for using gEDF

- Not limited to SJF

- Possible higher success ratios in underloaded and overloaded situations

Page 74: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Scheduling within A Group Scheduling within A Group

Exploring different scheduling scheme applied within each gEDF.

- A promising research of applying the gEDF scenario.

Reduce overall power consumption.

- Explore a scheduling scheme that minimizes the power consumed by tasks in a group.

Page 75: Welcome!. PhD Dissertation Defense PhD Candidate: Wenming Li Advisor: Dr. Krishna M. Kavi Committee: Dr. Krishna M. Kavi Dr. Robert Akl Dr. Phil Sweany

Thank You !Thank You !