Date post: | 15-Dec-2015 |
Category: |
Documents |
Upload: | treyton-hankin |
View: | 219 times |
Download: | 1 times |
Real-Time Systems Real-Time Systems Scheduling ToolScheduling Tool
Developed byDeveloped by
Daniel GhiringhelliDaniel Ghiringhelli
Advisor: Professor JAdvisor: Professor Jiaiacun Wangcun Wang
December 19, 2005December 19, 2005
OverviewOverview
MotivationMotivation FeaturesFeatures Platform and ToolsPlatform and Tools Software Engineering ApproachSoftware Engineering Approach Algorithm Overview (bonus included!)Algorithm Overview (bonus included!) Tool Design (30,000 ft. view)Tool Design (30,000 ft. view) Tool Overview and DemonstrationTool Overview and Demonstration SummarySummary
MotivationMotivation Real-time systems: time critical systemsReal-time systems: time critical systems ScheduleSchedule: : assignment of jobs to available assignment of jobs to available
processorsprocessors Feasible scheduleFeasible schedule:: every job completes by its every job completes by its
deadlinedeadline Scheduling algorithms: Scheduling algorithms:
Clock driven / Round-robin /Priority-drivenClock driven / Round-robin /Priority-driven Need a tool to illustrate how these algorithms Need a tool to illustrate how these algorithms
workwork Particularly in RTS classesParticularly in RTS classes
and find feasible schedulesand find feasible schedules Helpful for researchHelpful for research
FeaturesFeatures Common Common Priority-Driven Priority-Driven Algorithm SupportAlgorithm Support
Earliest Deadline FirstEarliest Deadline First Deadline MonotonicDeadline Monotonic Least Slack FirstLeast Slack First
Hyperperiod calculationHyperperiod calculation Extendable interfaceExtendable interface Simulations based on task specificationsSimulations based on task specifications Graphical user interfaceGraphical user interface
Task managementTask management Visualization of a dynamic schedulerVisualization of a dynamic scheduler
Platform and ToolsPlatform and Tools
Written in Java Written in Java Eclipse 3.0 IDEEclipse 3.0 IDE SWT GUI librarySWT GUI library Deployed as an Deployed as an
executable JARexecutable JAR
Integrated JUnit Testing
Software Engineering Software Engineering PrinciplesPrinciples
Informal processInformal process Frequent ReleasesFrequent Releases GUI Mock-upGUI Mock-up Test DrivenTest Driven Regression TestRegression Test
PolicyPolicy
Initial Mock-up
Software Engineering Software Engineering ApproachApproach
Lightweight V-Model approachLightweight V-Model approach Essentially a waterfall but with User Essentially a waterfall but with User
InvolvementInvolvement No system testing (i.e., “Lightweight”)No system testing (i.e., “Lightweight”)
Test DrivenTest Driven UAT written during RequirementsUAT written during Requirements Unit Tests written during detailed Unit Tests written during detailed
design and constructiondesign and construction Customer CheckpointsCustomer Checkpoints
Lightweight V-ModelLightweight V-Model
Requirements UAT/Deployment
Unit/ComponentTests
Construction
Analysis/Design
Problem Statement
Algorithms Overview: DMAlgorithms Overview: DM Deadline Monotonic (DM)Deadline Monotonic (DM)
Static fixed priority schedulerStatic fixed priority scheduler Immediately pre-empts any running task Immediately pre-empts any running task
with a higher priority taskwith a higher priority task AdvantagesAdvantages
Easy to implement (most widely used)Easy to implement (most widely used) Low system overheadLow system overhead
DisadvantagesDisadvantages Not optimalNot optimal Requires static prioritization before run-timeRequires static prioritization before run-time
Algorithm Overview: EDFAlgorithm Overview: EDF Earliest Deadline First (EDF)Earliest Deadline First (EDF)
Dynamic priority schedulerDynamic priority scheduler Highest priority is assigned to the task with the Highest priority is assigned to the task with the
nearest deadlinenearest deadline AdvantagesAdvantages
EDF theoretically superior to DMEDF theoretically superior to DM Guaranteed scheduleability if CPU utilization Guaranteed scheduleability if CPU utilization
100% or less100% or less DisadvantagesDisadvantages
More difficult to implementMore difficult to implement Higher system overheadHigher system overhead Overloaded system is unpredictable (non-critical Overloaded system is unpredictable (non-critical
tasks may be scheduled before critical tasks)tasks may be scheduled before critical tasks)
Algorithm Overview: LSTF Algorithm Overview: LSTF (bonus!)(bonus!)
Least Slack Time First (LSTF)Least Slack Time First (LSTF) Dynamic priority schedulerDynamic priority scheduler Highest priority given to the task with Highest priority given to the task with
the least slack time (timeToDeadline – the least slack time (timeToDeadline – executionTimeLeft)executionTimeLeft)
AdvantagesAdvantages Same as EDFSame as EDF Intuitively logicalIntuitively logical
DisadvantagesDisadvantages Same as EDFSame as EDF
EDF and DM ExampleEDF and DM Example
T1
T2
T1
T2
(a) EDF
(b) RM
3 6 9 12
T1=(0, 5, 3, 5), T2=(0, 3, 1, 3)
RTS Scheduling Tool RTS Scheduling Tool DesignDesign
MVC MVC ArchitectureArchitecture
Controlling Controlling thread polls thread polls simulation simulation thread for thread for model updatesmodel updates
Model
View
Controller
Simulator
CPUQueue
Notifier
status?
ready
ControllingThread
SimulationThread
RTS Scheduling Tool: RTS Scheduling Tool: Package ViewPackage View
Thread InteractionThread Interaction
rts.SchedulerUI rts.model.TaskSimrts.gui.QueueControl rts.gui.SchedulerControl
getExecutingTask()
getBlockedTasks()
setCurrentTask()
updateTasks()
SchedulerUI.refreshSimGroup = true
currentTask
blockedTasks
Simulator InternalsSimulator Internals
Tool Overview & DemoTool Overview & Demo
Concluding RemarksConcluding Remarks
RTS Scheduling Tool features:RTS Scheduling Tool features: Friendly UIFriendly UI Effective teaching toolEffective teaching tool Scheduleability analysisScheduleability analysis
Work to be doneWork to be done Additional algorithms can be easily Additional algorithms can be easily
added!added! GUI features and optionsGUI features and options
AcknowledgmentsAcknowledgments
MU Software Engineering FacultyMU Software Engineering Faculty Professor WangProfessor Wang Professor McDonaldProfessor McDonald