Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments
description
Transcript of Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments
![Page 1: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/1.jpg)
Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments
Ilhyun Lee Cherry K. Owen Haesun K. Lee
The University of Texas of the Permian Basin
![Page 2: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/2.jpg)
Outline
Introduction Motivation and Objective UML Diagram for OE-Scheduler Implementation for OE-Scheduler Conclusion Future Work
![Page 3: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/3.jpg)
Introduction
Real-Time System Periodic Task Model Object Oriented Design OE-Scheduler
![Page 4: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/4.jpg)
Real-Time System
Computing system with a set of execution models that have timing constraints
Hard Real-Time System Soft Real-Time System
![Page 5: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/5.jpg)
Hard Real-Time System
System Value Time
Start Time Deadline
![Page 6: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/6.jpg)
Soft Real-Time System
System Value Time Start Time Deadline
![Page 7: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/7.jpg)
Periodic Task Model
A sequence of the same type of event occurring at constant intervals
Task : scheduling entity Event : recurring instance of scheduling entity
Event 1 Event 2 Event 3 Event 4 Time constant interval
![Page 8: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/8.jpg)
Object Oriented Design
Problems are modeled using objects The object-oriented approach has the
potential to reduce complexity, improve flexibility, and reduce expenses
Object reusability
![Page 9: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/9.jpg)
OE-Scheduler
Scheduler that generates a schedule of periodic tasks by the principle of eliminating unnecessary context switches under the rate monotonic algorithm
Guarantee the hard deadlines of an arbitrary number of periodic tasks in hard real-time environments
Object-oriented design
![Page 10: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/10.jpg)
Motivation
Future real-time system will run in highly dynamic behavior environments
Current our procedural scheduling algorithms cannot be efficiently applied to future real-time system
This observation motivated us to work on developing an object-oriented view-point of the OE-scheduler in hard real-periodic environments
![Page 11: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/11.jpg)
Objective
Developing an object-oriented view-point of the OE-scheduler that generates a schedule of periodic tasks by the principle of eliminating unnecessary context switches under the rate monotonic algorithm in hard real-periodic environments
![Page 12: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/12.jpg)
UML Diagram for OE-Scheduler
Class Diagram for OE-Scheduler Sequence Diagram to Produce a OE-
Schedule
![Page 13: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/13.jpg)
Class Diagram for OE-Scheduler
+Methods()
-Attributes
Periodic Task
+Methods()
-Attributes
RM Scheduler
+Methods()
-Attributes
OE-Scheduler
+Methods()
-Attributes
OE-Schedule
+Methods()
-Attributes
CRP-Slack
1
1..*
1 11..* 1
![Page 14: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/14.jpg)
Sequence Diagram to Produce a OE-Schedule
Peridoc Task OE_Scheduler RM_Scheduler OE-Schedule
Request scheduling
Request CRP and Slack
Notify
Produce OE-Schedule
CRP-Slack
Notify
Request RM Information
![Page 15: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/15.jpg)
Implementation for OE-Scheduler
Scheduling algorithm for OE-Scheduler Test result of the object-oriented OE-
Scheduler Comparison table
![Page 16: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/16.jpg)
Scheduling Algorithm for OE-Scheduler
Step1. If Pij {i: 1..n, j: 0..n} arrives the system at the
same time, pick the highest priority event of Pij {i: 1..n, j: 0..n}. Determine the Current Request
Period (CRP) of the selected event.
![Page 17: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/17.jpg)
Scheduling Algorithm for OE-Scheduler
Step2. If the CRP of the selected event is odd, then go to Step3. Otherwise, if the CRP of the selected event is even, then calculate the Slack, the maximum amount of time that a scheduler can delay running the task without missing its current deadline, for the selected event. Delay the execution of the selected event until the Slack of the selected event becomes empty. When the Slack of the selected event becomes empty, schedule the selected event under the Rate Monotonic Algorithm. Go to Step4
![Page 18: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/18.jpg)
Scheduling Algorithm for OE-Scheduler
Step3. Immediately schedule the selected event under the Rate Monotonic Algorithm.
Step4. Go to Step1 until the final event is processed
![Page 19: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/19.jpg)
Scheduling Algorithm for OE-Scheduler
Reference [1] Haesun Kang Lee, Ilhyun Lee, and Martha Evens “Scheduling Periodic Tasks with Reduced Context Switches,” Proceedings of the ACIS 1st International Conference on Software Engineering Applied to Networking & parallel/Distributed Computing (SNPD ’00), pp. 209-215, May 18-21, 2000, Champagne-Ardenne, France.
![Page 20: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/20.jpg)
Test Result of the Object-oriented OE-Scheduler
Record structure of the periodic task Workload file: OE-schedule.txt Menu-based user interface The scheduling points with CRP Schedule for 4 periodic task by OE-
Scheduler
![Page 21: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/21.jpg)
Record Structure of the Periodic Task Workload
<PID, PE. P, AT> where, PID: Process-Id of periodic task, an integer number PE: Execution time of periodic task P: Period of periodic task AT: The arrival time of the periodic process, an integer value greater than or equal to 0
![Page 22: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/22.jpg)
Workload File: OE-schedule.txt
Workload File: 1 // Periodic task #1 1 4 0 2 // Periodic task #2 1 8 0 3 // Periodic task #3 2 10 0 4 // Periodic task #4 5 20 0
![Page 23: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/23.jpg)
Menu-based User Interface
1. Generate Workload file 2. Produce the scheduling points with CRP 3. Run OE-Scheduler 4. Exit
![Page 24: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/24.jpg)
The Scheduling Points with CRP
Tasks Arrival Time Current Request Period of Pij
P10 0 even P20 0 even P30 0 even P40 0 even P11 4 odd P12 8 even P21 8 odd P31 10 odd P13 12 odd P14 16 even P22 16 even P15 20 odd P32 20 even P41 20 odd P16 24 even P23 24 odd P17 28 odd P33 30 odd P18 32 even P24 32 even P19 36 odd
![Page 25: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/25.jpg)
Schedule for 4 Periodic Task by OE-Scheduler
Schedule for 4 periodic task by OE-Scheduler Time Instance Context-Switch 0 Idle No 1 Idle No 2 Idle No 3 P10 Yes 4 P11 No 5 P20 Yes 6 P30 Yes 7 P30 No 8 P21 Yes 9 P40 Yes 10 P31 Yes 11 P12 Yes 12 P13 No 13 P31 Yes 14 P40 Yes 15 P40 No 16 P40 No 17 P40 No 18 Idle No 19 P14 Yes 20 P15 No
![Page 26: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/26.jpg)
Schedule for 4 periodic task by OE-Scheduler
21 P22 Yes 22 P41 Yes 23 P32 Yes 24 P23 Yes 25 P32 Yes 26 P41 Yes 27 P16 Yes 28 P17 No 29 P41 Yes 30 P33 Yes 31 P33 No 32 P41 Yes 33 P41 No 34 Idle No 35 P18 Yes 36 P19 No 37 P24 Yes* 38 Idle No 39 Idle No 40 Idle No * 2 context switches occur except the last instance
![Page 27: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/27.jpg)
Comparison Table
Number of context switches for times 0 to 40
Time 0 6 12 18 24 30 36 40 Algorithm
RMA 0 9 15 23 29 39 47 49 EDFA 0 9 15 23 29 39 47 49 OE 0 3 13 17 25 35 41 43
![Page 28: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/28.jpg)
Conclusion
A study of dynamic behavior property in hard real-time environments
Robust design facilitates easier extension of the system to include more dynamic environments
Provide the real-time system engineers with greater flexibility to design future real-time systems
Helping the designer of real-time operating systems
![Page 29: Object-Oriented Design and Implementation of the OE-Scheduler in Real-time Environments](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815b1c550346895dc8cec5/html5/thumbnails/29.jpg)
Future Work
Extend our scheduling algorithms to distributed and multiprocessor environments