1 Reducing Queue Lock Pessimism in Multiprocessor Schedulability Analysis Yang Chang, Robert Davis and Andy Wellings Real-time Systems Research Group University.

Slides:



Advertisements
Similar presentations
CPU Scheduling.
Advertisements

Chapter 7 - Resource Access Protocols (Critical Sections) Protocols: No Preemptions During Critical Sections Once a job enters a critical section, it cannot.
Priority Inheritance and Priority Ceiling Protocols
Priority INHERITANCE PROTOCOLS
Copyright © 2000, Daniel W. Lewis. All Rights Reserved. CHAPTER 8 SCHEDULING.
Real-Time Mutli-core Scheduling Moris Behnam. Introduction Single processor scheduling – E.g., t 1 (P=10,C=5), t 2 (10, 6) – U= >1 – Use a faster.
1 EE5900 Advanced Embedded System For Smart Infrastructure RMS and EDF Scheduling.
CS5270 Lecture 31 Uppaal, and Scheduling, and Resource Access Protocols CS 5270 Lecture 3.
CSE 522 Real-Time Scheduling (4)
REAL-TIME COMMUNICATION ANALYSIS FOR NOCS WITH WORMHOLE SWITCHING Presented by Sina Gholamian, 1 09/11/2011.
Chapter 5 CPU Scheduling. CPU Scheduling Topics: Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Soft Real-Time Semi-Partitioned Scheduling with Restricted Migrations on Uniform Heterogeneous Multiprocessors Kecheng Yang James H. Anderson Dept. of.
Chapter 6: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 2, 2005 Chapter 6: CPU Scheduling Basic.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Chapter 6: CPU Scheduling
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
Chapter 6 CPU SCHEDULING.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Quantifying the Sub-optimality of Non-preemptive Real-time Scheduling Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.
Scheduling. Alternating Sequence of CPU And I/O Bursts.
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
The Global Limited Preemptive Earliest Deadline First Feasibility of Sporadic Real-time Tasks Abhilash Thekkilakattil, Sanjoy Baruah, Radu Dobrin and Sasikumar.
Prepare by : Ihab shahtout.  Overview  To give an overview of fixed priority schedule  Scheduling and Fixed Priority Scheduling.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria.
Chapter 5: Process Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Basic Concepts Maximum CPU utilization can be obtained.
1 11/29/2015 Chapter 6: CPU Scheduling l Basic Concepts l Scheduling Criteria l Scheduling Algorithms l Multiple-Processor Scheduling l Real-Time Scheduling.
1 Real-Time Scheduling. 2Today Operating System task scheduling –Traditional (non-real-time) scheduling –Real-time scheduling.
CSCI1600: Embedded and Real Time Software Lecture 24: Real Time Scheduling II Steven Reiss, Fall 2015.
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 5 CPU Scheduling Slide 1 Chapter 5 CPU Scheduling.
6.1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Multiprocessor Fixed Priority Scheduling with Limited Preemptions Abhilash Thekkilakattil, Rob Davis, Radu Dobrin, Sasikumar Punnekkat and Marko Bertogna.
CSCI1600: Embedded and Real Time Software Lecture 23: Real Time Scheduling I Steven Reiss, Fall 2015.
Undergraduate course on Real-time Systems Linköping University TDDD07 Real-time Systems Lecture 2: Scheduling II Simin Nadjm-Tehrani Real-time Systems.
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Introductory Seminar on Research CIS5935 Fall 2008 Ted Baker.
Introduction to Operating System Created by : Zahid Javed CPU Scheduling Fifth Lecture.
Operating Systems Scheduling. Scheduling Short term scheduler (CPU Scheduler) –Whenever the CPU becomes idle, a process must be selected for execution.
1 Uniprocessor Scheduling Chapter 3. 2 Alternating Sequence of CPU And I/O Bursts.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Lecture 4 CPU scheduling. Basic Concepts Single Process  one process at a time Maximum CPU utilization obtained with multiprogramming CPU idle :waiting.
CPU scheduling.  Single Process  one process at a time  Maximum CPU utilization obtained with multiprogramming  CPU idle :waiting time is wasted 2.
Basic Concepts Maximum CPU utilization obtained with multiprogramming
1 Chapter 5: CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms.
CPU SCHEDULING.
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Chapter 5a: CPU Scheduling
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
CS 143A - Principles of Operating Systems
CPU Scheduling G.Anuradha
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Operating System Concepts
3: CPU Scheduling Basic Concepts Scheduling Criteria
Chapter5: CPU Scheduling
Chapter 6: CPU Scheduling
Outline Scheduling algorithms Multi-processor scheduling
Chapter 5: CPU Scheduling
CSCI1600: Embedded and Real Time Software
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
CHAPTER 8 Resources and Resource Access Control
Shortest-Job-First (SJR) Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
CPU Scheduling: Basic Concepts
Module 5: CPU Scheduling
Presentation transcript:

1 Reducing Queue Lock Pessimism in Multiprocessor Schedulability Analysis Yang Chang, Robert Davis and Andy Wellings Real-time Systems Research Group University of York

2 Overview Background Multiprocessor scheduling Multiprocessor resource sharing Pessimism in existing work A new model of spinning Schedulability analysis Empirical evaluations Conclusion and future work

Pentium 4 Background: processors 3 Core i7

4 Background: multiprocessor scheduling Partitioned scheduling A task can only run on a specific processor Existing exact analysis for single processors can be used NP-hard to find an optimal task allocation Global scheduling Allows tasks to migrate among processors More appropriate for open systems Overheads related to task migration Tractable exact analysis is so far unknown for sporadic tasks Fixed task-priority / fixed job-priority / dynamic-priority Focus on fixed task-priority global scheduling (global FP)

5 Background: multiprocessor resource sharing protocols Fully Partitioned multiprocessor system MPCP of Rajkumar et al MSRP of Gai et al Global multiprocessor system FMLP of Block et al Devi et al P-PCP of Easwaran and Anderson, 2009 Red ones use queue locks (FIFO-queue-based non- preemptive spin locks) as their building blocks

6 Background: Queue Locks Upon resource request Task becomes non-pre-emptible Checks if the requested resource has been locked If not, it enters the critical section and accesses the resource non-preemptively Otherwise, it is inserted into a FIFO queue for the resource and busy waits until the resource becomes available Upon resource release Releases the associated lock Becomes pre-emptible again The task at the head of the FIFO queue will get the resource next

7 Background: current analysis of queue-lock based systems Existing analyses e.g. [GAI2001], [BLOCK2007], [DEVI2006] inflate the worst-case execution time to include the time wasted spinning For each resource request, it is assumed that requests to the same resource always interfere with it. m is the total number of processors is the total number of tasks that access resource Hence, each resource request can spin for at most total of the longest critical sections of all tasks regarding resource Then, use some existing global FP analysis (that does not consider resource sharing)

If there are 4 tasks on a 4 processor system and 3 tasks access the same resource only once while the other task accesses the same resource 100 times, existing analysis estimates that 309 time units will be wasted …99 times… This is overly pessimistic. The real worst-case scenario for this configuration is: So at most 9 time units will be wasted on spinning Pessimism in existing analysis(1) 8

Pessimism in existing analysis(2) Under global FP scheduling, when analyzing a task at priority k, all tasks with lower priorities can be ignored. When k is a low priority, many higher priority tasks may have inflated execution times. Pessimism can accumulate at low priorities. This greatly reduces the number of tasksets that can be recognised as schedulable. Aim to provide a less pessimistic model of spinning for lower priority tasks 9

A less pessimistic modeling of spinning (1) For each task k, our new model calculates the maximum amount of spinning caused by any task’s accesses to each resource during task k’s deadline D k. Our model safely ignores those resource accesses that can never run in parallel with others Suppose we know the maximum number of requests to a resource every task can have during D k For each 2<=x<=m, we calculate the maximum number of resource request groups in which x requests for the same resource could happen in parallel 10

A less pessimistic modeling of spinning (2) 11 Calculate the maximum computation time that could be wasted on busy waiting (spinning) by x parallel accesses to the same resource The worst case can be further improved by considering the duration of resource accesses

Schedulability analysis (1) Built on Bertogna and Lipari’s sufficient analysis for global FP systems Total interference to the problem job within its problem window D k is the total of any execution time that occurs when the problem job is not executing within the problem window Global FP is work conserving, so if the total interference is less than m*(D k - C k ), task k will be guaranteed to be schedulable 12 tata tdtd DkDk CkCk CkCk

Schedulability analysis (2) With resource sharing, there are 3 differences: 1. Tasks with priorities lower than the problem job can also interfere 2. Spinning wastes processor time 3. A task may be non-preemptively blocked (Block et al. 2007) - Not work conserving We re-define total interference to the problem job within its problem window as the total of any idle time, task execution time or spinning time that occurs when the problem job is not executing within the problem window If the total interference is less than m*(D k - C k ), task k will be guaranteed to be schedulable. C k does not include any spinning time. 13

Schedulability analysis (3) Upper bound on the total interference made up of: Upper bound on the interference from higher priority tasks to the problem job derived by Bertogna and Lipari. Total spinning time within the problem window Upper bound on the interference to the problem job when this job is non- preemptively blocked : m * B k where B k is the maximum length of the non- preemptive blocking due to lower priority tasks When the problem job is not one of the m highest priority ready tasks, spinning, high priority task execution, non-preemptible execution of the low priority tasks (excluding any spinning) may occur When the problem job is spinning, all processor time is part of the total interference. However, some of this processor time has to be spent on spinning. Since all spinning time has been accounted for previously, we can ignore a minimal amount of inevitable spinning and so avoid double counting

Schedulability analysis (4) New spinning time modeling approach has two interesting characteristics: 1. Irrespective of the priority of the problem job under analysis, all tasks that access a resource always contribute to the total spinning time 2. It ignores all the resource accesses that can never run in parallel with any other resource accesses when estimating total spinning time This makes schedulability analysis work better than existing approaches when analyzing low priority tasks … but worse when analyzing high priority tasks Solution is to combine existing analysis and new analysis (for each task check schedulability using existing WCET Inflation Analysis (WIA) and only if unschedulable check with new technique (lp-CDW), combined approach referred to as m-CDW) 15

Evaluation Experiments were conducted on randomly generated task sets: Priority assignment policy (DkC monotonic) Processors (4 or 8) Number of tasks in each set (25) Total utilization (between 0 and m *100%) Periods (log uniform in range [2000, 25000]) Constrained deadlines (uniform in range [ C,T ]) 20,000 tasksets for each configuration Only one resource in the whole system Max resource accesses in any job is limited to 5 Length of each resource access is randomly generated. (More graphs in the technical report) 16

Evaluation (4 processors) 17

Evaluation (8 processors) 18

Evaluation (4 processors) 19 Varying taskset cardinality from with other parameters held constant U = 2.0 (50%)

Evaluation (8 processors) 20 Varying taskset cardinality from with other parameters held constant U = 4.0 (50%)

Conclusion and Future Work Contribution: A more effective way of modeling the impact of queue locks on task schedulability – works well when there are a large number of tasks – unlike previous techniques A new schedulability analysis to work with the new spinning time modeling approach Future work includes: Taking nested resource accesses into consideration Applying this approach to other resource sharing protocols that use queue locks and suspension-based locks (e.g. FMLP) 21

Questions 22