31
Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Embed Size (px)

Citation preview

Page 1: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Feedback Control Real-time Scheduling

James Yang, Hehe Li, Xinguang Sheng

CIS 642, Spring 2001Professor Insup Lee

Page 2: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Agenda

• Motivation.• Feedback control system overview.• Important Issues of Feedback

control real-time scheduling.• FC-EDF by UVA.• Conclusion.

Page 3: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Motivation

• Static real-time scheduling algorithms– Requires complete knowledge of task set

and constraints. – eg. RM algorithm

• Dynamic algorithms– Does not have complete knowledge of task

set.– Resource sufficient Vs. insufficient. – eg. Earliest Deadline first, spring algorithm

Page 4: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Problems

• They are all open-loop algorithms. • Works poorly in unpredictable dynamic

systems. Because they are usually based on worse-case work-load parameters.

• Most dynamic real world applications have insufficient resources and unpredictable workload.

• Assumes that timing requirements(such as deadline)are known and fixed.

Page 5: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Agenda

• Motivation.• Feedback control system overview.• Important Issues of Feedback

control real-time scheduling.• FC-EDF by UVA.• Conclusion.

Page 6: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Feedback Control Scheduling

• Defines error terms for schedules, monitor the error, and continuously adjust the schedule to maintain satisfactory performance.

• Based on adaptive control theory, stochastic control.

• The result would be that many applications meet significantly more deadlines thereby improving the productivity.

Page 7: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Approach

• Controlled Variable.

• Set point.• Error = set point

– current value of CV.

• Manipulated Variable.

• Feedback Loop.

Page 8: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Agenda

• Motivation.• Feedback control system overview.• Important Issues of Feedback

control real-time scheduling.• FC-EDF by UVA.• Conclusion.

Page 9: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Feedback control real-time scheduling

• Choices for control variables, manipulated variables, set points.

• Choice of appropriate Control functions. Is PID enough?

• Stability Problem of feedback control in the context of real-time scheduling?

• How to tune Control parameters?• How significant is the overhead and how to

minimize it?• How to integrate a runtime analysis of time

constraints with scheduling algorithms?

Page 10: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Agenda

• Motivation.• Feedback control system overview.• Important Issues of Feedback

control real-time scheduling.• FC-EDF by UVA.• Conclusion.

Page 11: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

FC-EDF algorithm

• Control Variable: miss rate of admitted tasks MissRatio(t)

• Set Point: 1%.• Manipulated Variable: System

Load(requested CPU utilization).• Controller: PID Controller.• Scheduler: EDF algorithm.• Actuators: Service level Controller,

admission Controller

Page 12: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

FC-EDF Architecture

Page 13: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Task Model

• Imprecise Computation Model• Ti – (Ii, ETi, VALi, Si, Di)

– I: Logical Versions of Ti =( Ti1, Ti2, …, Tik)

– ET: Execution time (ETi1, ETi2, …, ETik_)– VAL: values of different implementations.– Si: Start time, Di:Soft deadlines

• Different Version of task are called service levels.

• In the future, extend deadlines.

Page 14: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

PID Controller

• Maps the miss ratio of accepted tasks to the change in requested utilization so as to drive the miss ratio back to set point.

• Cp, Ci, Cd , are tunable parameters.

Page 15: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

PID Controller cont./* called every sampling period PS */void PID(){ Get Error(t) during last sampling period P S ; /*PID control function*/ CPU(t) = Cp *Error(t) + Ci IW Error(t) + CD *(Error(t-DW) -

Error(t))/DW /* greedily increase system load when lightly loaded */ if(CPU(t) 0) CPU(t) = CPU(t) + CPU A /* call the Service Level Controller, which returns the portion of CPU(t) that is not completed in it */ CPU0 =SLC(CPU(t)); /* call the admission controller to accommodate the portion of CPU(t)

that is not completed by SLC, if there is any */ if(CPU0 != 0) ACadjust(CPU0); }

Page 16: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Service Level Controller

Page 17: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Admission Controller

• Decides whether accepts a task or not.If ETik < 1- CPU(t) accept, else reject.

• CPU(t) maybe adjusted when SLC controller cannot completely accommodate CPU(t)void Acadjust(CPU0)

{CPU(t) = CPU(t) - CPU0; }• Given an example.

Page 18: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Admission Controller(example)

• Suppose CPU(t) = 80%,

• SLC could increase 10% of the cpu use.

• AC could only admit tasks with 10% usage of cpu time, instead of 20%

Page 19: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Experiment Results

• Simulation Model• Workload Model• Implementation of FC-EDF• Performance Matrices• Experiment A: Steady Execution time• Experiment B: Dynamic Execution

Time

Page 20: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Simulation Model

Page 21: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Workload Model

• Each source is characterized with a period (P) (the deadline of each task instance equals its period),

• Worst case execution times {WCETi}, best case execution times {BCETi}, estimated execution times {EETi}, average execution times {AETi}

• Each tuple (P, WCETi,BCETi, EETi, AETi, VALi) characterizes a service level EETi =(WCETi+BCETi)*0.5AETi = EETi*etf

• etf : execution time factor denotes the accuracy of the estimation.

Page 22: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Implementation of FC-EDF

Page 23: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Performance Matrices

• MRA: Miss Ration among admitted tasks.• CPU utilization: how much the CPU is

used. • HRS: hit ratio among submitted tasks is a

measure of throughput. • VCR: Value completion ratio quality of

results. Task with lower service level contributes to lower value.

Page 24: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee
Page 25: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee
Page 26: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Performance Conclusion

• FC-EDF provides soft performance guarantee for admitted tasks.

• Achieving high system utilization.• High throughput.• Effectively adapts to the radical

changes in the execution time and system load and maintains satisfactory performance.

Page 27: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Overhead

Page 28: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Conclusion

• Presented the need for feedback control scheduling

• Presented a system developed by UVA.

• Questions?

Page 29: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

Control Theory Terminology

• Process Variable• Error• Overshoot• Steady state error• Settling time

Page 30: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

PID Controller

• PID – Proportional, Integral, Derivative• Proportional: the controller output is

proportional to the error. • Integral: output is proportional to the

amount of time the error is present. • Derivative: output is proportional to the

rate of change of the measurement of error.

Page 31: Feedback Control Real- time Scheduling James Yang, Hehe Li, Xinguang Sheng CIS 642, Spring 2001 Professor Insup Lee

PID Controller (cont.)