1 / 36

Hardware/Software Co-design Embedded & Real-Time System Scheduling & Performance Estimation

Hardware/Software Co-design Embedded & Real-Time System Scheduling & Performance Estimation. Advisor: Sao-Jie Chen Member: 黃佩菁 P92921009 蔡勝中 P92943005. Outline. A Co-design framework Partitioning and Mapping Scheduling criteria Scheduling algorithms

dewei
Download Presentation

Hardware/Software Co-design Embedded & Real-Time System Scheduling & Performance Estimation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hardware/Software Co-designEmbedded & Real-Time SystemScheduling & Performance Estimation Advisor: Sao-Jie Chen Member: 黃佩菁 P92921009 蔡勝中 P92943005

  2. Outline • A Co-design framework • Partitioning and Mapping • Scheduling criteria • Scheduling algorithms • Performance estimation • WCET Analysis • ILP Method • Conclusion

  3. Co-design Framework System description Compiler System behavior Validation Partitioning & Mapping Partitioned specification Performance Estimation Evaluation SW synthesis Interface synthesis HW synthesis Prototype

  4. Outline • A Co-design framework • Partitioning and Mapping • Scheduling criteria • Scheduling algorithms • Performance estimation • WCET Analysis • ILP Method • Conclusion

  5. P1 P2 P3 P5 P4 Task 1 Task 2 P1 P5 P2 P3 PE1 PE2 P4 PE3 Partitioning and Mapping • Period / Deadline of each task • Process dependencies in tasks • PEs: CPU, DSP, ASIC, ... • Allocation: Processes -> PEs • Scheduling: Priorities -> Processes

  6. Outline • A Co-design framework • Partitioning and Mapping • Scheduling criteria • Scheduling algorithms • Performance estimation • WCET Analysis • ILP Method • Conclusion

  7. Scheduling Criteria • CPU utilization Keep CPU as busy as possible • Throughput Number of processes that complete their execution per time unit • Turnaround time Amount of time to execute a particular process • Waiting time Amount of time a process has been waiting in the ready queue • Response time Amount of time it takes from when a request was submitted until the first response is produced, not output

  8. Outline • A Co-design framework • Partitioning and Mapping • Scheduling criteria • Scheduling algorithms • Performance estimation • WCET Analysis • ILP Method • Conclusion

  9. Scheduling Algorithms • FCFS scheduling algorithm • SJF scheduling algorithm • EDF scheduling algorithm • RR scheduling algorithm • Priority scheduling algorithm • Multilevel queue scheduling algorithm • RM scheduling algorithm

  10. Fist-Come, First-Served Scheduling • The process that requests the CPU first is allocated the CPU first. • FCFS scheduling is not real time scheduling • Case where FCFS request in a failure • Process 1: execution time = 4, t6 deadline • Process 2: execution time = 2, t4 deadline

  11. Scheduling Algorithms • FCFS scheduling algorithm • SJF scheduling algorithm • EDF scheduling algorithm • RR scheduling algorithm • Priority scheduling algorithm • Multilevel queue scheduling algorithm • RM scheduling algorithm

  12. Shortest-Job-First Scheduling • The process that request less CPU burst is allocated the CPU first. • Case where SJF request in a failure • Process 1: execution time = 2 , t4 deadline • Process 2: execution time = 4 , t5 deadline

  13. Scheduling Algorithms • FCFS scheduling algorithm • SJF scheduling algorithm • EDF scheduling algorithm • RR scheduling algorithm • Priority scheduling algorithm • Multilevel queue scheduling algorithm • RM scheduling algorithm

  14. Earliest-Deadline-First Scheduling • The process that have earlier deadline is have higher priority. Priority is determined by deadline. • Case where EDF results in a failure • Process 1: execution time = 2 , t4 deadline • Process 2: execution time = 4 , t5 deadline

  15. Scheduling Algorithms • FCFS scheduling algorithm • SJF scheduling algorithm • EDF scheduling algorithm • RR scheduling algorithm • Priority scheduling algorithm • Multilevel queue scheduling algorithm • RM scheduling algorithm

  16. Round-Robin Scheduling • Each process is assigned a time interval • If the process is still running at the end of the quantum, the CPU is preempted and given to another process • Issue – length of the quantum • Too short will cause too many process switches and lowers the CPU efficiency • Too long will cause poor response to short interactive request.

  17. Scheduling Algorithms • FCFS scheduling algorithm • SJF scheduling algorithm • EDF scheduling algorithm • RR scheduling algorithm • Priority scheduling algorithm • Multilevel queue scheduling algorithm • RM scheduling algorithm

  18. Priority Scheduling • Each process is assigned priority, and the runable process with the highest priority is allowed to run. • Priorities assign algorithms are classified as fixed priority, dynamic priority, or mixed priority.

  19. Scheduling Algorithms • FCFS scheduling algorithm • SJF scheduling algorithm • EDF scheduling algorithm • RR scheduling algorithm • Priority scheduling algorithm • Multilevel queue scheduling algorithm • RM scheduling algorithm

  20. Multilevel queue Scheduling • Ready queue is partitioned into separate queues: Foreground and background • Each queue has its own scheduling algorithm • Foreground – RR, higher priority • Background - FCFS

  21. Scheduling Algorithms • FCFS scheduling algorithm • SJF scheduling algorithm • EDF scheduling algorithm • RR scheduling algorithm • Priority scheduling algorithm • Multilevel queue scheduling algorithm • RM scheduling algorithm

  22. Rate-Monotonic Scheduling • RMS is the optimal fixed-priority algorithm • The shorter period, the higher priority • If a task set cannot be scheduled using the RM algorithm, it cannot be scheduled using any fixed-priority algorithm • The deadlines of n processes can be met if the processor utilization: U: Processor utilization n: the number of tasks in a system Ci: Computation time Pi: Process

  23. Outline • A Co-design framework • Partitioning and Mapping • Scheduling criteria • Scheduling algorithms • Performance estimation • WCET Analysis • ILP Method • Conclusion

  24. Performance Estimation • How to estimation embedded software performance? • Simulate • Estimate • The importance of Worst-Case Execution Time (WCET) in embedded systems • Simple architecture • Instruction execution time is fixed • Cached architecture • Two possible execution times – cache and miss

  25. Outline • A Co-design framework • Partitioning and Mapping • Scheduling criteria • Scheduling algorithms • Performance estimation • WCET Analysis • ILP Method • Conclusion

  26. WCET Analysis • WCET solutions • find the longest path and sum up each instruction’s time • cache miss, pipeline stall, etc, make an instruction time vary. Take them into account and sum up the modified instruction’s time • WCET analysis can be divided into two components: • Program Path Determines the sequence of instructions to be executed in the worst-case scenario. • Microarchitecture modeling Models the underlying hardware systems and computes the WCET of a known sequence of instructions.

  27. Outline • A Co-design framework • Partitioning and Mapping • Scheduling criteria • Scheduling algorithms • Performance estimation • WCET Analysis • ILP Method • Conclusion

  28. ILP Method • Integer linear programming (ILP) method • Basic Block • ILP formulation

  29. ILP Method - Basic Block • Basic block • Only have straight-line sequence of instructions

  30. ILP Formulation • If we let variable xibe the execution count of a basic block Bi, and constant cibe the execution time of the basic block, then the total execution time of the program is given as where N is the number of basic blocks in the program. note:ximust be integer values

  31. WCET Example

  32. Outline • A Co-design framework • Partitioning and Mapping • Scheduling criteria • Scheduling algorithms • Performance estimation • WCET Analysis • ILP Method • Conclusion

  33. Conclusion • Limitation of fixed-priority scheduling is that it is not always possible to fully utilize the CPU • Scheduling Algorithms will effect embedded real time system performance • Estimated must be tight • Embedded software is hot in the feature no matter O.S or App.

  34. Reference • Krithi Ramamritham and Jonh Stankovic, “Scheduling Algorithms and Operating System Support for Real-Time System,” Proceedings of the IEEE, Volume 82, No.1, January 1994, P.55-65 • Y.-T. S. Li, S. Malik, and A. Wolfe, “Performance estimation of embedded software with instruction cache modeling,” ACM Transactions on Design Automation of Electronic Systems 4, no. 3 (July 1999) • Jochen Liedtke, “Toward real microkernels,” ACM Transaction on Communications, Volume 39 Issue 9 • Harbour, M.G.; Klein, M.H.; Lehoczky, J.P., “Timing analysis for fixed-priority scheduling of hard real-time systems,” Software Engineering, IEEE Transactions on , Volume: 20 , Issue: 1 , Jan. 1994 Pages:13 – 28

  35. Reference • Ti-Yen Yen; Wolf, W., “Performance estimation for real-time distributed embedded systems,” Parallel and Distributed Systems, IEEE Transactions on , Volume: 9 , Issue: 11 , Nov. 1998 • C. L. Liu, James W. Layland, “Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment,” Journal of the ACM (JACM),  Volume 20 Issue 1, Jan. 1973 • Engblom, J.; Ermedahl, A., “Modeling complex flows for worst-case execution time analysis,” Real-Time Systems Symposium, 2000. Proceedings. The 21st IEEE , 27-30 Nov. 2000

  36. Thank You

More Related