Blocking Analysis of FIFO, Unordered, and Priority-Ordered Spin Locks

Size: px
Start display at page:

Download "Blocking Analysis of FIFO, Unordered, and Priority-Ordered Spin Locks"

Transcription

1 On Spin Locks in AUTOSAR: Blocking Analysis of FIFO, Unordered, and Priority-Ordered Spin Locks Alexander Wieder and Björn Brandenburg MPI-SWS RTSS /04/2013 Vancouver, Canada

2 Motivation: AUTOSAR: OS-specification widely used for embedded applications Resources accessed from multiple cores: AUTOSAR mandates spin locks.

3 Motivation: AUTOSAR: OS-specification widely used for embedded applications Resources accessed from multiple cores: AUTOSAR mandates spin locks. But AUTOSAR does not specify spin lock type!

4 Motivation: AUTOSAR: OS-specification widely used for embedded applications Resources accessed from multiple cores: AUTOSAR mandates spin locks. But AUTOSAR does not specify spin lock type! Which type should be used?

5 Spin Lock Types Variety of reasonable choices: Non-Preemptable FIFO-ordered (MSRP) Spinning Priority-Ordered Preemptable Unordered Spinning Priority-Ordered with FIFO tie-breaking

6 Spin Lock Types Variety of reasonable choices: analysis-friendly support for locking priorities simple implementation (test&set) low architecture requirements FIFO-ordered (MSRP) Priority-Ordered Unordered safe for unknown lock types Priority-Ordered with FIFO tie-breaking

7 Spin Lock Types Variety of reasonable choices: Non-Preemptable blocking analysis FIFO-ordered (MSRP) Spinning available Priority-Ordered for most types! Preemptable Unordered Spinning Priority-Ordered with FIFO tie-breaking

8 Contributions Blocking analysis for 8 types of spin locks

9 Contributions Blocking analysis for 8 types of spin locks 7/8 spin lock types: first blocking analysis

10 Contributions Blocking analysis for 8 types of spin locks 7/8 spin lock types: first blocking analysis Asymptotically less pessimistic than prior approaches

11 Contributions Blocking analysis for 8 types of spin locks 7/8 spin lock types: first blocking analysis Asymptotically less pessimistic than prior approaches Suggest AUTOSAR API changes based on evaluation results

12 Novel Spin Lock Analysis Key Technique: Blocking Analysis modeled as Integer Linear Program (ILP)

13 Novel Spin Lock Analysis Key Technique: Blocking Analysis modeled as Integer Linear Program (ILP) Worst-case blocking bounds determined by ILP solver

14 Challenges Prior analysis is pessimistic due to inflation. Prior analysis is specific to non-preemptable FIFO-ordered spin locks.

15 Challenges Prior analysis is pessimistic due to inflation. Prior analysis is specific to non-preemptable FIFO-ordered spin locks.

16 Task Model sporadic tasks: T i : (e i,d i,p i ) constrained deadlines: d i apple p i partitioned fixed-priority scheduling

17 Basic Spin Lock Analysis Spin locks busy-wait while waiting for contended resource.

18 Basic Spin Lock Analysis Spin locks busy-wait while waiting for contended resource. Straight-forward analysis approach: treat spin-time as execution time apply response-time analysis

19 FIFO-Ordered Spin Locks Multiprocessor Stack Resource Policy (MSRP) [1] [1] P. Gai, G. Lipari, and M. Di Natale, Minimizing memory utilization of real-time task sets in single and multi-processor systems-on-a-chip, in RTSS 01. IEEE, 2001.

20 FIFO-Ordered Spin Locks Multiprocessor Stack Resource Policy (MSRP) [1] The MSRP uses non-preemptable FIFO-ordered spin locks for resources shared across processors. [1] P. Gai, G. Lipari, and M. Di Natale, Minimizing memory utilization of real-time task sets in single and multi-processor systems-on-a-chip, in RTSS 01. IEEE, 2001.

21 FIFO-Ordered Spin Locks classic MSRP analysis inflate execution time 0 response-time analysis

22 FIFO-Ordered Spin Locks classic MSRP analysis inflate execution time inflated execution times 0 response-time analysis

23 FIFO-Ordered Spin Locks classic MSRP analysis inflate execution time inflated execution times 0 response-time analysis Ri R i = e 0 i + X h<i p h e 0 h

24 FIFO-Ordered Spin Locks classic MSRP analysis inflate execution time inflated execution times 0 response-time analysis Ri R i = e 0 i + X h<i p h e 0 h

25 Execution-Time Inflation in Classic MSRP Analysis P1 T1 T2 P2 T3 Executing Spinning Pending but not scheduled Critical Section t

26 Execution-Time Inflation in Classic MSRP Analysis P1 T1 T2 P2 T3 Executing T1 busy-waiting for Spinning shared resource Pending but not scheduled Critical Section t

27 Execution-Time Inflation in Classic MSRP Analysis P1 T1 T2 P2 T3 Executing T2 s job pending, but not executing Spinning Pending but not scheduled Critical Section t

28 Execution-Time Inflation in Classic MSRP Analysis P1 T1 T2 P2 T3 Executing Spinning Pending but not scheduled T2 s job completes Critical Section t

29 Execution-Time Inflation in Classic MSRP Analysis P1 T1 P2 T3 Consider T1 s request Executing Spinning Pending but not scheduled Critical Section t

30 Execution-Time Inflation in Classic MSRP Analysis P1 T1 P2 T3 Consider T1 s request Executing Spinning T1 s request Pending but not scheduled could be blocked by T3 s request Critical Section t

31 Execution-Time Inflation in Classic MSRP Analysis P1 T1 P2 T3 T1 s job busy-waits Executing Spinning Pending but not scheduled Critical Section t

32 Execution-Time Inflation in Classic MSRP Analysis P1 T1 P2 T3 Executing Execution time inflation: Spinning Spin time treated as execution time Pending but not scheduled Critical Section t

33 Execution-Time Inflation in Classic MSRP Analysis P1 T1 P2 T3 Executing Execution time inflation: Spinning Spin time treated as execution time Pending but not scheduled Critical Section t

34 Execution-Time Inflation in Classic MSRP Analysis T1 original execution time P1 P2 T3 Executing Spinning Pending but not scheduled Critical Section t

35 Execution-Time Inflation in Classic MSRP Analysis T1 original execution time P1 P2 T3 inflated execution time Executing Spinning Pending but not scheduled Critical Section t

36 Execution-Time Inflation in Classic MSRP Analysis P1 T1 Execution time P2 T3 inflated for all jobs! Executing Spinning Pending but not scheduled Critical Section t

37 Execution-Time Inflation in Classic MSRP Analysis P1 T1 Execution time P2 T3 inflated for all jobs! Executing Spinning Pending but not scheduled Critical Section t

38 Original Schedule T1 P1 T2 P2 T3 Executing Spinning Pending but not scheduled T2 s job completes Critical Section t

39 Schedule with Inflated Execution Times T1 P1 T2 P2 T3 Executing Spinning Pending but not scheduled Deadline Miss Critical Section t

40 Schedule with Inflated Execution Times T1 P1 T2 P2 T3 Impossible in a Executing real schedule! Spinning Pending but not scheduled Deadline Miss Critical Section t

41 Original Schedule T1 P1 T2 P2 T3 Executing Spinning At most one Pending but not scheduled can be blocked! Critical Section t

42 Inflation is Inherently Pessimistic All prior analyses rely on execution time inflation!

43 Inflation is Inherently Pessimistic All prior analyses rely on execution time inflation! We show that execution time inflation is an inherent source of pessimism in blocking analysis.

44 Inflation is Inherently Pessimistic Theorem Any blocking analysis relying on the inflation of job execution costs can be pessimistic by a factor of ( n).

45 Inflation is Inherently Pessimistic Theorem Any blocking analysis relying on the inflation of job execution costs can be pessimistic by a factor of ( n). maximal ratio of shortest and longest task period number of tasks

46 Inflation is Inherently Pessimistic Theorem Any blocking analysis relying on the inflation of job execution costs can be pessimistic by a factor of ( n). Details and proof in paper

47 Challenges Prior analysis is pessimistic due to inflation. Prior analysis is specific to non-preemptable FIFO-ordered spin locks.

48 Challenges Prior analysis is pessimistic due to inflation. ILP formulation Explicit blocking terms Prior analysis is specific to non-preemptable FIFO-ordered spin locks.

49 Challenges Prior analysis is pessimistic due to inflation. ILP formulation Explicit blocking terms Prior analysis is specific to non-preemptable FIFO-ordered spin locks.

50 ILP-Based Blocking Analysis of Spin Locks inflation-free blocking analysis response-time analysis with uninflated execution times

51 ILP-Based Blocking Analysis of Spin Locks inflation-free blocking analysis response-time analysis with uninflated execution times Key technique for inflation-free blocking analysis: Blocking Analysis modeled as Integer Linear Program (ILP) Worst-case blocking bounds determined by ILP solver

52 ILP Generation for FIFO-Ordered Spin Locks P1 T1 P2 T2 P3 T3 t Executing Spinning Critical Section

53 ILP Generation for FIFO-Ordered Spin Locks P1 T1 P2 T2 P3 T3 t Executing Spinning Critical Section

54 ILP Generation for FIFO-Ordered Spin Locks Assign blocking variables: P1 T1 P2 T2 P3 T3 t Executing Spinning Critical Section

55 ILP Generation for FIFO-Ordered Spin Locks Assign blocking variables: P1 T1 P2 T2 P3 T3 X 2,1,1 X 2,1,2 X 2,1,3 X 3,1,1 X 3,1,2 t Executing Spinning Critical Section

56 Blocking Variables 0 apple X apple 1 X : Fraction of critical section length contributing to T1 s blocking

57 Blocking Variables 0 apple X apple 1 X : X =0 X =1 Fraction of critical section length contributing to T1 s blocking Request does not contribute to T1 s blocking. Request contributes to T1 s blocking.

58 Blocking Variables 0 apple X apple 1 X : X =0 X =1 Analysis accounts Fraction of critical section length contributing to T1 s blocking at most once for each request Request does not contribute to T1 s blocking. Request contributes to T1 s blocking.

59 Blocking Variables 0 apple X apple 1 X : X =0 Analysis accounts Fraction of critical section length contributing to T1 s blocking at most once for each request Request does not contribute to T1 s blocking. X =1 Request contributes to T1 s blocking. No double counting!

60 ILP Generation for FIFO-Ordered Spin Locks Impose constraints: P1 T1 P2 T2 P3 T3 X 2,1,1 X 2,1,2 X 2,1,3 X 3,1,1 X 3,1,2 t Executing Spinning Critical Section

61 ILP Generation for FIFO-Ordered Spin Locks Impose constraints: P1 T1 P2 T2 Observation X 2,1,1 X 2,1,2 X 2,1,3 Each request can be blocked by P3 T3 at most one request for the same X 3,1,1 X 3,1,2 resource from each other processor. t Executing Spinning Critical Section

62 ILP Generation for FIFO-Ordered Spin Locks Impose constraints: P1 T1 P2 T2 P3 T3 X 2,1,1 X 2,1,2 X 2,1,3 X 3,1,1 X 3,1,2 t Executing Spinning Critical Section

63 ILP Generation for FIFO-Ordered Spin Locks Impose constraints: P1 T1 X 2,1,1 + X 2,1,2 + X 2,1,3 apple 1 P2 P3 T2 T3 X 2,1,1 X 2,1,2 X 2,1,3 X 3,1,1 X 3,1,2 t Executing X 3,1,1 + XSpinning 3,1,2 apple 1 Critical Section

64 ILP Generation for FIFO-Ordered Spin Locks Impose constraints: P1 T1 X 2,1,1 + X 2,1,2 + X 2,1,3 apple 1 P2 T2 constraints to X 2,1,1 X 2,1,2 X 2,1,3 rule out P3 impossible T3 schedules X 3,1,1 X 3,1,2 t Executing X 3,1,1 + XSpinning 3,1,2 apple 1 Critical Section

65 ILP Generation for FIFO-Ordered Spin Locks Impose constraints: P1 T1 X 2,1,1 + X 2,1,2 + X 2,1,3 apple 1 P2 T2 constraints to X 2,1,1 X 2,1,2 X 2,1,3 rule out P3 impossible T3 schedules X 3,1,1 X 3,1,2 ILP Constraints simple composable t Executing X 3,1,1 + XSpinning 3,1,2 apple 1 Critical Section

66 ILP for Worst-Case Blocking Generate Integer Linear Program: X 2,1,1 + X 2,1,2 + X 2,1,3 apple 1 X 3,1,1 + X 3,1,2 apple 1

67 ILP for Worst-Case Blocking Generate Integer Linear Program: worst-case blocking maximal blocking X 2,1,1 + X 2,1,2 + X 2,1,3 apple 1 X 3,1,1 + X 3,1,2 apple 1

68 ILP for Worst-Case Blocking Generate Integer Linear Program: maximize X 2,1,1 L 2,1,1 + X 2,1,2 L 2,1,2 + X 2,1,3 L 2,1,3 + X 3,1,1 L 3,1,1 + X 3,1,2 L 3,1,2 subject to X 2,1,1 + X 2,1,2 + X 2,1,3 apple 1 X 3,1,1 + X 3,1,2 apple 1

69 ILP for Worst-Case Blocking Generate Integer Linear Program: maximize X 2,1,1 L 2,1,1 + X 2,1,2 L 2,1,2 + X 2,1,3 L 2,1,3 + X 3,1,1 L 3,1,1 + X 3,1,2 L 3,1,2 subject to maximal critical X 2,1,1 + X 2,1,2 + X 2,1,3 apple 1 section length X 3,1,1 + X 3,1,2 apple 1

70 ILP for Worst-Case Blocking Generate Integer Linear Program: maximize X 2,1,1 L 2,1,1 + X 2,1,2 L 2,1,2 + X 2,1,3 L 2,1,3 Worst-case blocking bound + X 3,1,1 L 3,1,1 + X 3,1,2 L 3,1,2 determined by ILP solver. subject to X 2,1,1 + X 2,1,2 + X 2,1,3 apple 1 X 3,1,1 + X 3,1,2 apple 1

71 Explicit Accounting for Blocking inflation-free blocking analysis response-time analysis with uninflated execution times R i = e i + b i + X h<i Ri p h e h

72 Explicit Accounting for Blocking inflation-free blocking analysis worst-case blocking bound determined by ILP-solver response-time analysis with uninflated execution times R i = e i + b i + X h<i Ri p h e h

73 Explicit Accounting for Blocking inflation-free blocking analysis worst-case blocking bound determined by ILP-solver response-time analysis with uninflated execution times R i = e i + b i + X h<i Ri p h e h uninflated execution costs

74 Challenges Prior analysis is pessimistic due to inflation. Explicit blocking terms ILP formulation Prior analysis is specific to non-preemptable FIFO-ordered spin locks.

75 Challenges Prior analysis is pessimistic due to inflation. Explicit blocking terms ILP formulation Prior analysis is specific to non-preemptable FIFO-ordered spin locks.

76 Challenges Prior analysis is pessimistic due to inflation. Explicit blocking terms ILP formulation Prior analysis is specific to non-preemptable FIFO-ordered spin locks.

77 So far we only talked about the MSRP...

78 So far we only talked about the MSRP......but there s more.

79 Spin Lock Types Non-Preemptable FIFO-ordered (MSRP) Spinning Priority-Ordered Preemptable Unordered Spinning Priority-Ordered with FIFO tie-breaking

80 Spin Lock Types FIFO-ordered Prior analyses Non-Preemptable do not generalize (MSRP) Spinning to other spin lock types without Priority-Ordered strong progress guarantees. Preemptable Unordered Spinning Priority-Ordered with FIFO tie-breaking

81 Prior Analyses Rely on Strong Progress Guarantees FIFO-Ordering is analysis-friendly: Each request can be blocked by at most one request for the same resource from each other processor.

82 Prior Analyses Rely on Strong Progress Guarantees FIFO-Ordering is analysis-friendly: Each request can be blocked by at most one request for the same resource from each other processor. Prior analyses rely on strong progress guarantees provided by FIFO-ordering.

83 Prior Analyses Rely on Strong Progress Guarantees Unordered spin locks: Each request can be blocked by all other requests for the same resource.

84 Challenges Prior analysis is pessimistic due to inflation. Explicit blocking terms ILP formulation Prior analysis is specific to non-preemptable FIFO-ordered spin locks.

85 Challenges Prior analysis is pessimistic due to inflation. Explicit blocking terms ILP formulation Prior analysis is specific to non-preemptable FIFO-ordered spin locks. Wait-time bounds Composable constraints

86 Challenges Prior analysis is pessimistic due to inflation. Explicit blocking terms ILP formulation Prior analysis is specific to non-preemptable FIFO-ordered spin locks. Wait-time bounds Composable constraints

87 Analysis of Unordered Spin Locks P1 T1 P2 T2 P3 T3 X 2,1,1 X 2,1,2 X 2,1,3 X 3,1,1 X 3,1,2 t Executing Spinning Critical Section

88 Analysis of Unordered Spin Locks Can all of these really block T1 s request? P1 T1 P2 T2 X 2,1,1 X 2,1,2 X 2,1,3 P3 T3 X 3,1,1 X 3,1,2 t Executing Spinning Critical Section

89 Analysis of Unordered Spin Locks P1 P2 P3 T1 T2 T3 Can all of these really block T1 s request? Observation: Two requests can only interfere if they were pending at the same time. X 2,1,1 X 2,1,2 X 2,1,3 X 3,1,1 X 3,1,2 t Executing Spinning Critical Section

90 Analysis of Unordered Spin Locks Observation: Two requests can only interfere if they were pending at the same time.

91 Per-Request Wait-Time Bounds How many remote request can be pending while T1 s request is pending?

92 Per-Request Wait-Time Bounds How many remote request can be pending while T1 s request is pending? Bound wait time of T1 s request. [1] [1] K. Lakshmanan, D. Niz, and R. Rajkumar, Coordinated task scheduling, allocation and synchronization on multiprocessors, in RTSS 09, 2009.

93 Bounding the Wait Time of Requests P1 T1 P2 T2 P3 T3 X 2,1,1 X 2,1,2 X 2,1,3 X 3,1,1 X 3,1,2 t Executing Spinning Critical Section

94 Bounding the Wait Time of Requests P1 T1 P2 P3 T2 T3 X 2,1,1 X 2,1,2 X 2,1,3 X 3,1,1 X 3,1,2 t Executing T2 s response time Spinning Critical Section

95 Bounding the Wait Time of Requests worst-case wait time of T1 s request P1 T1 P2 T2 X 2,1,1 X 2,1,2 X 2,1,3 P3 T3 X 3,1,1 X 3,1,2 t Executing Spinning Critical Section

96 Bounding the Wait Time of Requests P1 T1 P2 T2 P3 T3 X 2,1,1 X 2,1,2 X 2,1,3 X 3,1,1 X 3,1,2 t Executing Spinning Critical Section

97 Bounding the Wait Time of Requests P1 T1 P2 T2 P3 T3 X 2,1,1 X 2,1,2 X 2,1,3 X 3,1,1 X 3,1,2 t Executing Spinning Critical Section

98 Bounding the Wait Time of Requests P1 T1 P2 T2 P3 T3 X 2,1,1 X 2,1,2 X 2,1,3 X 3,1,1 X 3,1,2 t Executing Spinning Critical Section

99 Bounding the Wait Time of Requests At most one of T2 s jobs can overlap with T1 s request. P1 T1 P2 T2 X 2,1,1 X 2,1,2 X 2,1,3 P3 T3 X 3,1,1 X 3,1,2 t Executing Spinning Critical Section

100 Bounding the Wait Time of Requests At most one of T2 s jobs can overlap with T1 s request. P1 T1 P2 P3 T2 T3 X 2,1,1 X 2,1,2 X 2,1,3 X 3,1,1 X 3,1,2 Bound number of t Executing conflicting requests. Spinning Critical Section

101 ILP Constraints Unordered Spin Locks P1 T1 P2 T2 P3 T3 X 2,1,1 X 2,1,2 X 2,1,3 X 3,1,1 X 3,1,2 t Executing Spinning Critical Section

102 ILP Constraints Unordered Spin Locks X 2,1,1 + X 2,1,2 + X 2,1,3 apple 1 P1 T1 P2 T2 P3 T3 X 2,1,1 X 2,1,2 X 2,1,3 X 3,1,1 X 3,1,1 + X 3,1,2 Xapple 3,1,2 1 t Executing Spinning Critical Section

103 ILP Constraints Unordered Spin Locks X 2,1,1 + X 2,1,2 + X 2,1,3 apple 1 P1 P2 P3 T1 T2 T3 Same constraints for unordered and FIFO-ordered spin locks. X 2,1,1 X 2,1,2 X 2,1,3 X 3,1,1 X 3,1,1 + X 3,1,2 Xapple 3,1,2 1 t Executing Spinning Critical Section

104 Challenges Prior analysis is pessimistic due to inflation. Explicit blocking terms ILP formulation Prior analysis is specific to non-preemptable FIFO-ordered spin locks. Wait-time bounds Composable constraints

105 Challenges Prior analysis is pessimistic due to inflation. Explicit blocking terms ILP formulation Prior analysis is specific to non-preemptable FIFO-ordered spin locks. Wait-time bounds Composable constraints

106 Evaluation

107 Evaluation Non-Preemptable FIFO-ordered (MSRP) Spinning Priority-Ordered Preemptable Unordered Spinning Priority-Ordered with FIFO tie-breaking

108 Evaluation Could we reduce pessimism? Non-Preemptable FIFO-ordered (MSRP) Spinning Priority-Ordered Preemptable Unordered Spinning Priority-Ordered with FIFO tie-breaking

109 Evaluation Could we reduce pessimism? FIFO-ordered (MSRP) Non-Preemptable Does the spin lock Spinning type matter at all? Priority-Ordered Preemptable Unordered Spinning Priority-Ordered with FIFO tie-breaking

110 Evaluation Could we reduce pessimism? FIFO-ordered (MSRP) Non-Preemptable Does the spin lock Spinning type matter at all? Which type Priority-Ordered should we use? Preemptable Unordered Spinning Priority-Ordered with FIFO tie-breaking

111 Evaluation Could we reduce pessimism? FIFO-ordered (MSRP) Non-Preemptable Does the spin lock Spinning type matter at all? Which type Priority-Ordered should we use? Preemptable When can unordered Spinning locks be used? Unordered Priority-Ordered with FIFO tie-breaking

112 Evaluation Could we reduce pessimism? FIFO-ordered (MSRP) Non-Preemptable Does the spin lock Spinning type matter at all? Which type Priority-Ordered should we use? Preemptable When can unordered Spinning locks be used? Unordered Should spinning be preemptable or Priority-Ordered non-preemptable? with FIFO tie-breaking

113 Evaluation Large-scale schedulability experiments: m number of processors : 4, 8, 16 average task utilization: 0.1, 0.2, 0.3 critical section lengths:, [1µs, 15µs] [1µs, 100µs] number of resources: m/2, m, 2m number of requests: 1, 2, 5, 10, 15 resource sharing factors: 0.1, 0.25, 0.4, 0.75

114 Evaluation Large-scale schedulability experiments: m number of processors : 4, 8, different configurations average task utilization: 0.1, 0.2, 0.3 critical section lengths:, [1µs, 15µs] [1µs, 100µs] number of resources: m/2, m, 2m number of requests: 1, 2, 5, 10, 15 resource sharing factors: 0.1, 0.25, 0.4, 0.75

115 Evaluation Large-scale schedulability experiments: number of processors : 4, 8, 16 average task utilization: 0.1, 0.2, 0.3 critical section lengths:, number of resources: m 1296 different configurations [1µs, 15µs] [1µs, 100µs] m/2, m, 2m 1000 samples number of requests: 1, 2, 5, 10, 15 per data point resource sharing each factors: configuration 0.1, 0.25, 0.4, 0.75

116 Schedulability Experiments fraction of schedulable task sets #tasks less idle time more contention

117 Schedulability Experiments fraction of schedulable task sets higher is better #tasks less idle time more contention

118 Notation F N

119 Notation F N FIFO-ordered

120 Notation F N Non-preemptable

121 Notation Type Ordering F N FIFO-ordered non-preemptable P N Priority-ordered non-preemptable U N PF N Unordered non-preemptable Priority-ordered non-preemptable with FIFO tie-breaking

122 Does the new analysis reduce pessimism?

123 Does the new analysis reduce pessimism? schedulable MSRP-classic 0.2 MSRP-holistic F N number of tasks Configuration: 16 CPUs, avg. utilization: 0.1, 16 shared resources, CS lengths [1µs, 15µs], at most 2 requests per resource, contention = 0.4

124 Does the new analysis reduce pessimism? schedulable MSRP-classic 0.2 MSRP-holistic F N classic analysis number of tasks Configuration: 16 CPUs, avg. utilization: 0.1, 16 shared resources, CS lengths [1µs, 15µs], at most 2 requests per resource, contention = 0.4

125 Does the new analysis reduce pessimism? schedulable MSRP-classic 0.2 MSRP-holistic F N classic analysis number of tasks holistic analysis [1] Configuration: 16 CPUs, avg. utilization: 0.1, 16 shared resources, CS lengths [1µs, 15µs], at most 2 requests per resource, contention = 0.4 [1] B. Brandenburg, Scheduling and locking in multiprocessor real-time operating systems, Ph.D. dissertation, The University of North Carolina at Chapel Hill, 2011.

126 Does the new analysis reduce pessimism? 1 schedulable MSRP-classic 0.2 MSRP-holistic F N classic analysis number of tasks ILP-based analysis holistic analysis [1] Configuration: 16 CPUs, avg. utilization: 0.1, 16 shared resources, CS lengths [1µs, 15µs], at most 2 requests per resource, contention = 0.4 [1] B. Brandenburg, Scheduling and locking in multiprocessor real-time operating systems, Ph.D. dissertation, The University of North Carolina at Chapel Hill, 2011.

127 Does the new analysis reduce pessimism? schedulable MSRP-classic 0.2 MSRP-holistic U N classic analysis number of tasks ILP-based analysis of unordered spin lock holistic analysis [1] Configuration: 16 CPUs, avg. utilization: 0.1, 16 shared resources, CS lengths [1µs, 15µs], at most 2 requests per resource, contention = 0.4 [1] B. Brandenburg, Scheduling and locking in multiprocessor real-time operating systems, Ph.D. dissertation, The University of North Carolina at Chapel Hill, 2011.

128 Does the new analysis reduce pessimism? schedulable Less pessimism with new blocking analysis MSRP-classic 0.2 MSRP-holistic U N number of tasks ILP-based analysis of unordered spin lock classic analysis holistic analysis [1] Configuration: 16 CPUs, avg. utilization: 0.1, 16 shared resources, CS lengths [1µs, 15µs], at most 2 requests per resource, contention = 0.4 [1] B. Brandenburg, Scheduling and locking in multiprocessor real-time operating systems, Ph.D. dissertation, The University of North Carolina at Chapel Hill, 2011.

129 Does the Spin Lock Type matter?

130 Does the Spin Lock Type matter?

131 Does the Spin Lock Type matter? Spin lock type has significant impact on schedulability.

132 When can unordered locks be used?

133 When can unordered locks be used?

134 When can unordered locks be used?

135 When can unordered locks be used? Task sets schedulable regardless of spin lock type

136 When can unordered locks be used? Task sets schedulable regardless of spin lock type Enables use of simpler algorithms and cheaper hardware!

137 Handling Unknown Spin Lock Types Analysis for unordered spin locks makes no ordering assumptions

138 Handling Unknown Spin Lock Types Analysis for unordered spin locks makes no ordering assumptions Analysis for unordered spin locks applicable for unknown types!

139 What is the impact of allowing preemptable spinning?

140 What is the impact of allowing preemptable spinning? Preemptable spinning can...

141 What is the impact of allowing preemptable spinning? Preemptable spinning can......decrease schedulability (FIFO-ordered)

142 What is the impact of allowing preemptable spinning? Preemptable spinning can......increase schedulability (priority-ordered)...decrease schedulability (FIFO-ordered)

143 Summary and Conclusions

144 Suggested API changes Spin lock type has significant impact on schedulability. Specify spin lock type

145 Suggested API changes Spin lock type has significant impact on schedulability. Specify spin lock type FIFO- and priority ordering required to support many workloads. Support FIFO and priority ordering in AUTOSAR

146 Suggested API changes Spin lock type has significant impact on schedulability. Specify spin lock type FIFO- and priority ordering required to support many workloads. Support FIFO and priority ordering in AUTOSAR Preemptable spinning can improve schedulabiliy. Support preemptable spinning with ordering guarantees

147 Summary Novel blocking analysis for spin locks: inflation-free blocking analysis response-time analysis with uninflated execution times

148 Summary Novel blocking analysis for spin locks: support for 8 spin lock types inflation-free blocking analysis response-time analysis with uninflated execution times

149 Summary Novel blocking analysis for spin locks: inflation-free blocking analysis support for 8 spin lock types...including unordered locks: safe for unknown types response-time analysis with uninflated execution times

150 Summary Novel blocking analysis for spin locks: inflation-free blocking analysis response-time analysis with uninflated execution times support for 8 spin lock types...including unordered locks: safe for unknown types asymptotically less pessimistic

151 Summary Novel blocking analysis for spin locks: inflation-free blocking analysis response-time analysis with uninflated execution times support for 8 spin lock types...including unordered locks: safe for unknown types asymptotically less pessimistic suggestions for AUTOSAR

152 Future Work Current analysis assumes non-nested critical sections.

153 Future Work Current analysis assumes non-nested critical sections. Nested critical sections: work in progress

154 Fin

Improved Analysis and Evaluation of Real-Time Semaphore Protocols for P-FP Scheduling

Improved Analysis and Evaluation of Real-Time Semaphore Protocols for P-FP Scheduling Improved Analysis and Evaluation of Real-Time Semaphore Protocols for P-FP Scheduling RTAS 13 April 10, 2013 Björn B. bbb@mpi-sws.org Semaphores + P-FP Scheduling Used in practice: VxWorks, QNX, ThreadX,

More information

Multiprocessor Real-Time Locking Protocols: from Homogeneous to Heterogeneous

Multiprocessor Real-Time Locking Protocols: from Homogeneous to Heterogeneous Multiprocessor Real-Time Locking Protocols: from Homogeneous to Heterogeneous Kecheng Yang Department of Computer Science, University of North Carolina at Chapel Hill Abstract In this project, we focus

More information

Achieving Predictable Multicore Execution of Automotive Applications Using the LET Paradigm

Achieving Predictable Multicore Execution of Automotive Applications Using the LET Paradigm Achieving Predictable Multicore Execution of Automotive Applications Using the LET Paradigm Alessandro Biondi and Marco Di Natale Scuola Superiore Sant Anna, Pisa, Italy Introduction The introduction of

More information

A Fully Preemptive Multiprocessor Semaphore Protocol for Latency-Sensitive Real-Time Applications

A Fully Preemptive Multiprocessor Semaphore Protocol for Latency-Sensitive Real-Time Applications A Fully Preemptive Multiprocessor Semaphore Protocol for Latency-Sensitive Real-Time Applications ECRTS 13 July 12, 2013 Björn B. bbb@mpi-sws.org A Rhetorical Question On uniprocessors, why do we use the

More information

On the Complexity of Worst-Case Blocking Analysis of Nested Critical Sections

On the Complexity of Worst-Case Blocking Analysis of Nested Critical Sections On the Complexity of Worst-Case Blocking Analysis of Nested Critical Sections Alexander Wieder Björn B. Brandenburg Max Planck Institute for Software Systems (MPI-SWS) Abstract Accurately bounding the

More information

Replica-Request Priority Donation: A Real-Time Progress Mechanism for Global Locking Protocols

Replica-Request Priority Donation: A Real-Time Progress Mechanism for Global Locking Protocols Replica-Request Priority Donation: A Real-Time Progress Mechanism for Global Locking Protocols Bryan C. Ward, Glenn A. Elliott, and James H. Anderson Department of Computer Science, University of North

More information

Multiprocessor Synchronization and Hierarchical Scheduling

Multiprocessor Synchronization and Hierarchical Scheduling Multiprocessor Synchronization and Hierarchical Scheduling Farhang Nemati, Moris Behnam, Thomas Nolte Mälardalen Real-Time Research Centre P.O. Box 883, SE-721 23 Västerås, Sweden farhang.nemati@mdh.se

More information

Carnegie Mellon University. Hard Real-Time Multiprocessor Scheduling (Part II) Marcus Völp

Carnegie Mellon University. Hard Real-Time Multiprocessor Scheduling (Part II) Marcus Völp Hard eal-time Multiprocessor Scheduling (Part II) Marcus Völp Lessons Learned from UP two concepts to counteract priority inversion priority inheritance priority ceiling priority ceiling priority inheritance

More information

A Blocking Bound for Nested FIFO Spin Locks

A Blocking Bound for Nested FIFO Spin Locks locking ound for Nested FIFO Spin Locks lessandro iondi, jörn. randenburg and lexander Wieder* * * * MPI-SWS, Kaiserslautern, Germany Scuola Superiore Sant nna, Pisa, Italy 2 THIS TLK 1 nalysis of nested

More information

Global Scheduling in Multiprocessor Real-Time Systems

Global Scheduling in Multiprocessor Real-Time Systems Global Scheduling in Multiprocessor Real-Time Systems Alessandra Melani 1 Global vs Partitioned scheduling Single shared queue instead of multiple dedicated queues Global scheduling Partitioned scheduling

More information

Schedulability Analysis of the Linux Push and Pull Scheduler with Arbitrary Processor Affinities

Schedulability Analysis of the Linux Push and Pull Scheduler with Arbitrary Processor Affinities Schedulability Analysis of the Linux Push and Pull Scheduler with Arbitrary Processor Affinities Arpan Gujarati, Felipe Cerqueira, and Björn Brandenburg Multiprocessor real-time scheduling theory Global

More information

Resource Sharing among Prioritized Real-Time Applications on Multiprocessors

Resource Sharing among Prioritized Real-Time Applications on Multiprocessors Resource Sharing among Prioritized Real-Time Applications on Multiprocessors Sara Afshar, Nima Khalilzad, Farhang Nemati, Thomas Nolte Email: sara.afshar@mdh.se MRTC, Mälardalen University, Sweden ABSTRACT

More information

Nested Multiprocessor Real-Time Locking with Improved Blocking

Nested Multiprocessor Real-Time Locking with Improved Blocking Nested Multiprocessor Real-Time Locking with Improved Blocking Bryan C. Ward and James H. Anderson Department of Computer Science, University of North Carolina at Chapel Hill Abstract Existing multiprocessor

More information

Event-Driven Scheduling. (closely following Jane Liu s Book)

Event-Driven Scheduling. (closely following Jane Liu s Book) Event-Driven Scheduling (closely following Jane Liu s Book) Real-Time Systems, 2006 Event-Driven Systems, 1 Principles Assign priorities to Jobs At events, jobs are scheduled according to their priorities

More information

A Synchronous IPC Protocol for Predictable Access to Shared Resources in Mixed-Criticality Systems

A Synchronous IPC Protocol for Predictable Access to Shared Resources in Mixed-Criticality Systems A Synchronous IPC Protocol for Predictable Access to Shared Resources in Mixed-Criticality Systems RTSS 14 December 4, 2014 Björn B. bbb@mpi-sws.org Linux Testbed for Multiprocessor Scheduling in Real-Time

More information

4.1 Interval Scheduling

4.1 Interval Scheduling 41 Interval Scheduling Interval Scheduling Interval scheduling Job j starts at s j and finishes at f j Two jobs compatible if they don't overlap Goal: find maximum subset of mutually compatible jobs a

More information

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5

OPERATING SYSTEMS CS3502 Spring Processor Scheduling. Chapter 5 OPERATING SYSTEMS CS3502 Spring 2018 Processor Scheduling Chapter 5 Goals of Processor Scheduling Scheduling is the sharing of the CPU among the processes in the ready queue The critical activities are:

More information

Real-Time Resource-Sharing under Clustered Scheduling: Mutex, Reader-Writer, and k-exclusion Locks

Real-Time Resource-Sharing under Clustered Scheduling: Mutex, Reader-Writer, and k-exclusion Locks Real-Time Resource-Sharing under Clustered Scheduling: Mutex, Reader-Writer, and k-exclusion Locks Björn B. Brandenburg Department of Computer Science University of North Carolina at Chapel Hill bbb@cs.unc.edu

More information

Efficient Microarchitecture Modeling and Path Analysis for Real-Time Software. Yau-Tsun Steven Li Sharad Malik Andrew Wolfe

Efficient Microarchitecture Modeling and Path Analysis for Real-Time Software. Yau-Tsun Steven Li Sharad Malik Andrew Wolfe Efficient Microarchitecture Modeling and Path Analysis for Real-Time Software Yau-Tsun Steven Li Sharad Malik Andrew Wolfe 1 Introduction Paper examines the problem of determining the bound on the worst

More information

Supporting Nested Locking in Multiprocessor Real-Time Systems

Supporting Nested Locking in Multiprocessor Real-Time Systems Supporting Nested Locking in Multiprocessor Real-Time Systems Bryan C. Ward and James H. Anderson Department of Computer Science, University of North Carolina at Chapel Hill Abstract This paper presents

More information

Multi-Resource Real-Time Reader/Writer Locks for Multiprocessors

Multi-Resource Real-Time Reader/Writer Locks for Multiprocessors Multi-Resource Real-Time Reader/Writer Locks for Multiprocessors Bryan C. Ward and James H. Anderson Dept. of Computer Science, The University of North Carolina at Chapel Hill Abstract A fine-grained locking

More information

An Implementation of the PCP, SRP, D-PCP, M-PCP, and FMLP Real-Time Synchronization Protocols in LITMUS RT

An Implementation of the PCP, SRP, D-PCP, M-PCP, and FMLP Real-Time Synchronization Protocols in LITMUS RT An Implementation of the PCP, SRP, D-PCP, M-PCP, and FMLP Real-Time Synchronization Protocols in LITMUS RT Björn B. Brandenburg and James H. Anderson The University of North Carolina at Chapel Hill Abstract

More information

A Comparison of the M-PCP, D-PCP, and FMLP on LITMUS RT

A Comparison of the M-PCP, D-PCP, and FMLP on LITMUS RT A Comparison of the M-PCP, D-PCP, and FMLP on LITMUS RT Björn B. Brandenburg and James H. Anderson The University of North Carolina at Chapel Hill Dept. of Computer Science Chapel Hill, NC 27599-375 USA

More information

Real-Time Systems. Hard Real-Time Multiprocessor Scheduling

Real-Time Systems. Hard Real-Time Multiprocessor Scheduling Real-Time Systems Hard Real-Time Multiprocessor Scheduling Marcus Völp WS 2015/16 Outline Introduction Terminology, Notation and Assumptions Anomalies + Impossibility Results Partitioned Scheduling (no

More information

A Server-based Approach for Predictable GPU Access with Improved Analysis

A Server-based Approach for Predictable GPU Access with Improved Analysis A Server-based Approach for Predictable GPU Access with Improved Analysis Hyoseung Kim 1, Pratyush Patel 2, Shige Wang 3, and Ragunathan (Raj) Rajkumar 4 1 University of California, Riverside, hyoseung@ucr.edu

More information

Mechanisms for Guaranteeing Data Consistency and Flow Preservation in AUTOSAR Software on Multi-core Platforms

Mechanisms for Guaranteeing Data Consistency and Flow Preservation in AUTOSAR Software on Multi-core Platforms Mechanisms for Guaranteeing Data Consistency and Flow Preservation in AUTOSAR Software on Multi-core Platforms Haibo Zeng General Motors R&D, haibo.zeng@gm.com Marco Di Natale Scuola Superiore S. Anna,

More information

Aperiodic Servers (Issues)

Aperiodic Servers (Issues) Aperiodic Servers (Issues) Interference Causes more interference than simple periodic tasks Increased context switching Cache interference Accounting Context switch time Again, possibly more context switches

More information

Real-Time Resource-Sharing under Clustered Scheduling: Mutex, Reader-Writer, and k-exclusion Locks

Real-Time Resource-Sharing under Clustered Scheduling: Mutex, Reader-Writer, and k-exclusion Locks Real-Time Resource-Sharing under Clustered Scheduling: Mutex, Reader-Writer, and k-exclusion Locks Björn B. Brandenburg and James H. Anderson Department of Computer Science, University of North Carolina

More information

An FPGA Implementation of Wait-Free Data Synchronization Protocols

An FPGA Implementation of Wait-Free Data Synchronization Protocols An FPGA Implementation of Wait-Free Data Synchronization Protocols Benjamin Nahill 1, Ari Ramdial 1, Haibo Zeng 1, Marco Di Natale 2, Zeljko Zilic 1 1 McGill University, email: {benjaminnahill, ariramdial}@mailmcgillca,

More information

AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel. Alexander Züpke, Marc Bommert, Daniel Lohmann

AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel. Alexander Züpke, Marc Bommert, Daniel Lohmann AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel Alexander Züpke, Marc Bommert, Daniel Lohmann alexander.zuepke@hs-rm.de, marc.bommert@hs-rm.de, lohmann@cs.fau.de Motivation Automotive and Avionic industry

More information

Partitioning and Interface Synthesis in Hierarchical Multiprocessor Real-Time Systems

Partitioning and Interface Synthesis in Hierarchical Multiprocessor Real-Time Systems Partitioning and Interface Synthesis in Hierarchical Multiprocessor Real-Time Systems Alessandro Biondi Scuola Superiore Sant Anna Pisa, Italy alessandro.biondi@sssup.it Giorgio Buttazzo Scuola Superiore

More information

CPSC/ECE 3220 Summer 2018 Exam 2 No Electronics.

CPSC/ECE 3220 Summer 2018 Exam 2 No Electronics. CPSC/ECE 3220 Summer 2018 Exam 2 No Electronics. Name: Write one of the words or terms from the following list into the blank appearing to the left of the appropriate definition. Note that there are more

More information

Supporting Nested Locking in Multiprocessor Real-Time Systems

Supporting Nested Locking in Multiprocessor Real-Time Systems Supporting Nested Locking in Multiprocessor Real-Time Systems Bryan C. Ward and James H. Anderson Department of Computer Science, University of North Carolina at Chapel Hill Abstract This paper presents

More information

Preview. Process Scheduler. Process Scheduling Algorithms for Batch System. Process Scheduling Algorithms for Interactive System

Preview. Process Scheduler. Process Scheduling Algorithms for Batch System. Process Scheduling Algorithms for Interactive System Preview Process Scheduler Short Term Scheduler Long Term Scheduler Process Scheduling Algorithms for Batch System First Come First Serve Shortest Job First Shortest Remaining Job First Process Scheduling

More information

A Contention-Sensitive Fine-Grained Locking Protocol for Multiprocessor Real-Time Systems

A Contention-Sensitive Fine-Grained Locking Protocol for Multiprocessor Real-Time Systems A Contention-Sensitive Fine-Grained Locking Protocol for Multiprocessor Real-Time Systems Catherine E. Jarrett, Bryan C. Ward, and James H. Anderson Dept. of Computer Science, University of North Carolina

More information

AUTOSAR Extensions for Predictable Task Synchronization in Multi- Core ECUs

AUTOSAR Extensions for Predictable Task Synchronization in Multi- Core ECUs 11AE-0089 AUTOSAR Extensions for Predictable Task Synchronization in Multi- Core ECUs Copyright 2011 SAE International Karthik Lakshmanan, Gaurav Bhatia, Ragunathan (Raj) Rajkumar Carnegie Mellon University

More information

Embedded Systems: OS. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Embedded Systems: OS. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Embedded Systems: OS Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Standalone Applications Often no OS involved One large loop Microcontroller-based

More information

Shared Cache Aware Task Mapping for WCRT Minimization

Shared Cache Aware Task Mapping for WCRT Minimization Shared Cache Aware Task Mapping for WCRT Minimization Huping Ding & Tulika Mitra School of Computing, National University of Singapore Yun Liang Center for Energy-efficient Computing and Applications,

More information

Analysis and Implementation of Global Preemptive Fixed-Priority Scheduling with Dynamic Cache Allocation

Analysis and Implementation of Global Preemptive Fixed-Priority Scheduling with Dynamic Cache Allocation Analysis and Implementation of Global Preemptive Fixed-Priority Scheduling with Dynamic Cache Allocation Meng Xu Linh Thi Xuan Phan Hyon-Young Choi Insup Lee Department of Computer and Information Science

More information

Overview. Sporadic tasks. Recall. Aperiodic tasks. Real-time Systems D0003E 2/26/2009. Loosening D = T. Aperiodic tasks. Response-time analysis

Overview. Sporadic tasks. Recall. Aperiodic tasks. Real-time Systems D0003E 2/26/2009. Loosening D = T. Aperiodic tasks. Response-time analysis Overview Real-time Systems D0003E Lecture 11: Priority inversion Burns/Wellings ch. 13 (except 13.12) Aperiodic tasks Response time analysis Blocking Priority inversion Priority inheritance Priority ceiling

More information

Empirical Approximation and Impact on Schedulability

Empirical Approximation and Impact on Schedulability Cache-Related Preemption and Migration Delays: Empirical Approximation and Impact on Schedulability OSPERT 2010, Brussels July 6, 2010 Andrea Bastoni University of Rome Tor Vergata Björn B. Brandenburg

More information

Embedded Systems: OS

Embedded Systems: OS Embedded Systems: OS Jinkyu Jeong (Jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu ICE3028: Embedded Systems Design, Fall 2018, Jinkyu Jeong (jinkyu@skku.edu) Standalone

More information

A Server-based Approach for Predictable GPU Access Control

A Server-based Approach for Predictable GPU Access Control A Server-based Approach for Predictable GPU Access Control Hyoseung Kim 1, Pratyush Patel 2, Shige Wang 3, and Ragunathan (Raj) Rajkumar 2 1 University of California, Riverside 2 Carnegie Mellon University

More information

Source EE 4770 Lecture Transparency. Formatted 16:43, 30 April 1998 from lsli

Source EE 4770 Lecture Transparency. Formatted 16:43, 30 April 1998 from lsli 17-3 17-3 Rate Monotonic Priority Assignment (RMPA) Method for assigning priorities with goal of meeting deadlines. Rate monotonic priority assignment does not guarantee deadlines will be met. A pure periodic

More information

CS418 Operating Systems

CS418 Operating Systems CS418 Operating Systems Lecture 9 Processor Management, part 1 Textbook: Operating Systems by William Stallings 1 1. Basic Concepts Processor is also called CPU (Central Processing Unit). Process an executable

More information

CPSC/ECE 3220 Summer 2017 Exam 2

CPSC/ECE 3220 Summer 2017 Exam 2 CPSC/ECE 3220 Summer 2017 Exam 2 Name: Part 1: Word Bank Write one of the words or terms from the following list into the blank appearing to the left of the appropriate definition. Note that there are

More information

Fixed-Priority Multiprocessor Scheduling

Fixed-Priority Multiprocessor Scheduling Fixed-Priority Multiprocessor Scheduling Real-time Systems N periodic tasks (of different rates/periods) r i T i C i T i C C J i Ji i ij i r i r i r i Utilization/workload: How to schedule the jobs to

More information

Adaptive Clustered EDF in LITMUS RT

Adaptive Clustered EDF in LITMUS RT Adaptive Clustered EDF in LITMUS RT Aaron Block,. Sherman, Texas William Kelley, BAE Systems. Ft. Worth, Texas Adaptable System: Whisper Whisper is a motion tracking system Speakers are placed on users

More information

Compositional multiprocessor scheduling: the GMPR interface

Compositional multiprocessor scheduling: the GMPR interface Compositional multiprocessor scheduling: the GMPR interface Artem Burmyakov Enrico Bini Eduardo Tovar Abstract Composition is a practice of key importance in software engineering. When real-time applications

More information

Concurrent activities in daily life. Real world exposed programs. Scheduling of programs. Tasks in engine system. Engine system

Concurrent activities in daily life. Real world exposed programs. Scheduling of programs. Tasks in engine system. Engine system Real world exposed programs Programs written to interact with the real world, outside the computer Programs handle input and output of data in pace matching the real world processes Necessitates ability

More information

A Server-based Approach for Predictable GPU Access Control

A Server-based Approach for Predictable GPU Access Control A Server-based Approach for Predictable GPU Access Control Hyoseung Kim * Pratyush Patel Shige Wang Raj Rajkumar * University of California, Riverside Carnegie Mellon University General Motors R&D Benefits

More information

Stack Size Minimization for Embedded Real-Time Systems-on-a-Chip *

Stack Size Minimization for Embedded Real-Time Systems-on-a-Chip * Design Automation for Embedded Systems, 7, 53^87, 2002. ß 2002 Kluwer Academic Publishers, Boston. Manufactured inthe Netherlands. Stack Size Minimization for Embedded Real-Time Systems-on-a-Chip * PAOLO

More information

A Comparison of Scheduling Latency in Linux, PREEMPT_RT, and LITMUS RT. Felipe Cerqueira and Björn Brandenburg

A Comparison of Scheduling Latency in Linux, PREEMPT_RT, and LITMUS RT. Felipe Cerqueira and Björn Brandenburg A Comparison of Scheduling Latency in Linux, PREEMPT_RT, and LITMUS RT Felipe Cerqueira and Björn Brandenburg July 9th, 2013 1 Linux as a Real-Time OS 2 Linux as a Real-Time OS Optimizing system responsiveness

More information

Scheduling of Parallel Real-time DAG Tasks on Multiprocessor Systems

Scheduling of Parallel Real-time DAG Tasks on Multiprocessor Systems Scheduling of Parallel Real-time DAG Tasks on Multiprocessor Systems Laurent George ESIEE Paris Journée du groupe de travail OVSTR - 23 mai 2016 Université Paris-Est, LRT Team at LIGM 1/53 CONTEXT: REAL-TIME

More information

An Optimal k-exclusion Real-Time Locking Protocol Motivated by Multi-GPU Systems

An Optimal k-exclusion Real-Time Locking Protocol Motivated by Multi-GPU Systems An Optimal k-exclusion Real-Time Locking Protocol Motivated by Multi-GPU Systems Glenn A. Elliott and James H. Anderson Department of Computer Science, University of North Carolina at Chapel Hill Abstract

More information

AUTOBEST: A microkernel-based system (not only) for automotive applications. Marc Bommert, Alexander Züpke, Robert Kaiser.

AUTOBEST: A microkernel-based system (not only) for automotive applications. Marc Bommert, Alexander Züpke, Robert Kaiser. AUTOBEST: A microkernel-based system (not only) for automotive applications Marc Bommert, Alexander Züpke, Robert Kaiser vorname.name@hs-rm.de Outline Motivation AUTOSAR ARINC 653 AUTOBEST Architecture

More information

CONTENTION IN MULTICORE HARDWARE SHARED RESOURCES: UNDERSTANDING OF THE STATE OF THE ART

CONTENTION IN MULTICORE HARDWARE SHARED RESOURCES: UNDERSTANDING OF THE STATE OF THE ART CONTENTION IN MULTICORE HARDWARE SHARED RESOURCES: UNDERSTANDING OF THE STATE OF THE ART Gabriel Fernandez 1, Jaume Abella 2, Eduardo Quiñones 2, Christine Rochange 3, Tullio Vardanega 4 and Francisco

More information

Reference Model and Scheduling Policies for Real-Time Systems

Reference Model and Scheduling Policies for Real-Time Systems ESG Seminar p.1/42 Reference Model and Scheduling Policies for Real-Time Systems Mayank Agarwal and Ankit Mathur Dept. of Computer Science and Engineering, Indian Institute of Technology Delhi ESG Seminar

More information

REPORT DOCUMENTATION PAGE Form Approved OMB NO

REPORT DOCUMENTATION PAGE Form Approved OMB NO REPORT DOCUMENTATION PAGE Form Approved OMB NO. 0704-0188 The public reporting burden for this collection of information is estimated to average 1 hour per response, including the time for reviewing instructions,

More information

TDDB68 Processprogrammering och operativsystem / Concurrent programming and operating systems

TDDB68 Processprogrammering och operativsystem / Concurrent programming and operating systems TENTAMEN / EXAM TDDB68 Processprogrammering och operativsystem / Concurrent programming and operating systems 2017-06-05 Examiner: Mikael Asplund (0700895827) Hjälpmedel / Admitted material: Engelsk ordbok

More information

Cache-Conscious Concurrency Control of Main-Memory Indexes on Shared-Memory Multiprocessor Systems

Cache-Conscious Concurrency Control of Main-Memory Indexes on Shared-Memory Multiprocessor Systems Cache-Conscious Concurrency Control of Main-Memory Indexes on Shared-Memory Multiprocessor Systems Sang K. Cha, Sangyong Hwang, Kihong Kim, Keunjoo Kwon VLDB 2001 Presented by: Raluca Marcuta 1 / 31 1

More information

(b) External fragmentation can happen in a virtual memory paging system.

(b) External fragmentation can happen in a virtual memory paging system. Alexandria University Faculty of Engineering Electrical Engineering - Communications Spring 2015 Final Exam CS333: Operating Systems Wednesday, June 17, 2015 Allowed Time: 3 Hours Maximum: 75 points Note:

More information

Partitioned Fixed-Priority Scheduling of Parallel Tasks Without Preemptions

Partitioned Fixed-Priority Scheduling of Parallel Tasks Without Preemptions Partitioned Fixed-Priority Scheduling of Parallel Tasks Without Preemptions *, Alessandro Biondi *, Geoffrey Nelissen, and Giorgio Buttazzo * * ReTiS Lab, Scuola Superiore Sant Anna, Pisa, Italy CISTER,

More information

Grand Central Dispatch

Grand Central Dispatch A better way to do multicore. (GCD) is a revolutionary approach to multicore computing. Woven throughout the fabric of Mac OS X version 10.6 Snow Leopard, GCD combines an easy-to-use programming model

More information

An implementation of the flexible spin-lock model in ERIKA Enterprise on a multi-core platform

An implementation of the flexible spin-lock model in ERIKA Enterprise on a multi-core platform An implementation of the flexible spin-lock model in ERIKA Enterprise on a multi-core platform Sara Afshar 1, Maikel P.W. Verwielen 2, Paolo Gai 3, Moris Behnam 1, Reinder J. Bril 1,2 1 Mälardalen University,

More information

Making OpenVX Really Real Time

Making OpenVX Really Real Time Making OpenVX Really Real Time Ming Yang 1, Tanya Amert 1, Kecheng Yang 1,2, Nathan Otterness 1, James H. Anderson 1, F. Donelson Smith 1, and Shige Wang 3 1The University of North Carolina at Chapel Hill

More information

CPU scheduling. Alternating sequence of CPU and I/O bursts. P a g e 31

CPU scheduling. Alternating sequence of CPU and I/O bursts. P a g e 31 CPU scheduling CPU scheduling is the basis of multiprogrammed operating systems. By switching the CPU among processes, the operating system can make the computer more productive. In a single-processor

More information

!! What is virtual memory and when is it useful? !! What is demand paging? !! When should pages in memory be replaced?

!! What is virtual memory and when is it useful? !! What is demand paging? !! When should pages in memory be replaced? Chapter 10: Virtual Memory Questions? CSCI [4 6] 730 Operating Systems Virtual Memory!! What is virtual memory and when is it useful?!! What is demand paging?!! When should pages in memory be replaced?!!

More information

Exam Review TexPoint fonts used in EMF.

Exam Review TexPoint fonts used in EMF. Exam Review Generics Definitions: hard & soft real-time Task/message classification based on criticality and invocation behavior Why special performance measures for RTES? What s deadline and where is

More information

Parallel Scheduling for Cyber-Physical Systems: Analysis and Case Study on a Self-Driving Car

Parallel Scheduling for Cyber-Physical Systems: Analysis and Case Study on a Self-Driving Car Parallel Scheduling for Cyber-Physical Systems: Analysis and Case Study on a Self-Driving Car Junsung Kim, Hyoseung Kim, Karthik Lakshmanan and Raj Rajkumar Carnegie Mellon University Google 2 CMU s Autonomous

More information

An Approach to Task Attribute Assignment for Uniprocessor Systems

An Approach to Task Attribute Assignment for Uniprocessor Systems An Approach to ttribute Assignment for Uniprocessor Systems I. Bate and A. Burns Real-Time Systems Research Group Department of Computer Science University of York York, United Kingdom e-mail: fijb,burnsg@cs.york.ac.uk

More information

A Stack-Based Resource Allocation Policy for Realtime Processes

A Stack-Based Resource Allocation Policy for Realtime Processes A Stack-Based Resource Allocation Policy for Realtime Processes T.P. Baker Department of Computer Science Florida State University Tallahassee, FL 32304-4019 Presented by Tsai Lin-Jiun Outline! Abstract

More information

Semi-Partitioned Scheduling for Resource-Sharing Hard-Real-Time Tasks

Semi-Partitioned Scheduling for Resource-Sharing Hard-Real-Time Tasks Semi-Partitioned Scheduling for Resource-Sharing Hard-Real-Time Tasks Mayank Shekhar Southern Illinois University Carbondale mayank@siu.edu Harini Ramaprasad Southern Illinois University Carbondale harinir@siu.edu

More information

Resource Reservation & Resource Servers

Resource Reservation & Resource Servers Resource Reservation & Resource Servers Resource Reservation Application Hard real-time, Soft real-time, Others? Platform Hardware Resources: CPU cycles, memory blocks 1 Applications Hard-deadline tasks

More information

Fixed-Priority Multiprocessor Scheduling. Real-time Systems. N periodic tasks (of different rates/periods) i Ji C J. 2 i. ij 3

Fixed-Priority Multiprocessor Scheduling. Real-time Systems. N periodic tasks (of different rates/periods) i Ji C J. 2 i. ij 3 0//0 Fixed-Priority Multiprocessor Scheduling Real-time Systems N periodic tasks (of different rates/periods) r i T i C i T i C C J i Ji i ij i r i r i r i Utilization/workload: How to schedule the jobs

More information

CS4514 Real Time Scheduling

CS4514 Real Time Scheduling CS4514 Real Time Scheduling Jose M. Garrido Fall 2015 Department of Computer Science 1 Periodic Tasks Typical real-time application has many tasks that need to be executed periodically Reading sensor data

More information

Non-Preemptive Access to Shared Resources in Hierarchical Real-Time Systems

Non-Preemptive Access to Shared Resources in Hierarchical Real-Time Systems Non-Preemptive Access to Shared Resources in Hierarchical Real-Time Systems Marko Bertogna, Fabio Checconi, Dario Faggioli November 4, 2008 Abstract This paper presents a new strategy to arbitrate the

More information

SIC: Provably Timing-Predictable Strictly In-Order Pipelined Processor Core

SIC: Provably Timing-Predictable Strictly In-Order Pipelined Processor Core SIC: Provably Timing-Predictable Strictly In-Order Pipelined Processor Core Sebastian Hahn and Jan Reineke RTSS, Nashville December, 2018 saarland university computer science SIC: Provably Timing-Predictable

More information

Virtual Memory - Overview. Programmers View. Virtual Physical. Virtual Physical. Program has its own virtual memory space.

Virtual Memory - Overview. Programmers View. Virtual Physical. Virtual Physical. Program has its own virtual memory space. Virtual Memory - Overview Programmers View Process runs in virtual (logical) space may be larger than physical. Paging can implement virtual. Which pages to have in? How much to allow each process? Program

More information

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date:

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date: Subject Name: OPERATING SYSTEMS Subject Code: 10EC65 Prepared By: Kala H S and Remya R Department: ECE Date: Unit 7 SCHEDULING TOPICS TO BE COVERED Preliminaries Non-preemptive scheduling policies Preemptive

More information

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University CS 571 Operating Systems Midterm Review Angelos Stavrou, George Mason University Class Midterm: Grading 2 Grading Midterm: 25% Theory Part 60% (1h 30m) Programming Part 40% (1h) Theory Part (Closed Books):

More information

THE DELAY COMPOSITION THEOREM ON PIPELINE SYSTEMS WITH NON-PREEMPTIVE PRIORITY VARYING SCHEDULING ALGORITHMS YI LU THESIS

THE DELAY COMPOSITION THEOREM ON PIPELINE SYSTEMS WITH NON-PREEMPTIVE PRIORITY VARYING SCHEDULING ALGORITHMS YI LU THESIS THE DELAY COMPOSITION THEOREM ON PIPELINE SYSTEMS WITH NON-PREEMPTIVE PRIORITY VARYING SCHEDULING ALGORITHMS BY YI LU THESIS Submitted in partial fulfillment of the requirements for the degree of Master

More information

Integrating Concurrency Control and Energy Management in Device Drivers. Chenyang Lu

Integrating Concurrency Control and Energy Management in Device Drivers. Chenyang Lu Integrating Concurrency Control and Energy Management in Device Drivers Chenyang Lu Overview Ø Concurrency Control: q Concurrency of I/O operations alone, not of threads in general q Synchronous vs. Asynchronous

More information

CLOCK DRIVEN SCHEDULING

CLOCK DRIVEN SCHEDULING CHAPTER 4 By Radu Muresan University of Guelph Page 1 ENGG4420 CHAPTER 4 LECTURE 2 and 3 November 04 09 7:51 PM CLOCK DRIVEN SCHEDULING Clock driven schedulers make their scheduling decisions regarding

More information

MULTI SLOTH: An Efficient Multi-Core RTOS using Hardware-Based Scheduling

MULTI SLOTH: An Efficient Multi-Core RTOS using Hardware-Based Scheduling MULTI SLOTH: An Efficient Multi-Core RTOS using Hardware-Based Scheduling Rainer Müller, Daniel Danner, Wolfgang Schröder-Preikschat, Daniel Lohmann Friedrich Alexander Universität (FAU) Erlangen Nürnberg,

More information

CSE 120 Principles of Operating Systems Spring 2017

CSE 120 Principles of Operating Systems Spring 2017 CSE 120 Principles of Operating Systems Spring 2017 Lecture 5: Scheduling Administrivia Homework #1 due tomorrow Homework #2 out tomorrow October 20, 2015 CSE 120 Lecture 8 Scheduling and Deadlock 2 Scheduling

More information

Algorithms in Systems Engineering IE172. Midterm Review. Dr. Ted Ralphs

Algorithms in Systems Engineering IE172. Midterm Review. Dr. Ted Ralphs Algorithms in Systems Engineering IE172 Midterm Review Dr. Ted Ralphs IE172 Midterm Review 1 Textbook Sections Covered on Midterm Chapters 1-5 IE172 Review: Algorithms and Programming 2 Introduction to

More information

Evaluation of Temporal and Performance Aspects

Evaluation of Temporal and Performance Aspects TECHNISCHE UNIVERSITÄT ILMENAU Evaluation of Temporal and Performance Aspects Integrated Hard- and Software Systems http://www.tu-ilmenau.de/ihs Problem Statement Performance Modeling Performance Evaluation

More information

Multiprocessor Real-Time Locking Protocols for Replicated Resources

Multiprocessor Real-Time Locking Protocols for Replicated Resources Multiprocessor Real-Time Locking Protocols for Replicated Resources Catherine E. Nemitz 1, Kecheng Yang 1, Ming Yang 1, Pontus Ekberg 2, and James H. Anderson 1 1 Department of Computer Science, University

More information

Response Time Analysis of Asynchronous Real-Time Systems

Response Time Analysis of Asynchronous Real-Time Systems Response Time Analysis of Asynchronous Real-Time Systems Guillem Bernat Real-Time Systems Research Group Department of Computer Science University of York York, YO10 5DD, UK Technical Report: YCS-2002-340

More information

Hardware/Software Partitioning and Scheduling of Embedded Systems

Hardware/Software Partitioning and Scheduling of Embedded Systems Hardware/Software Partitioning and Scheduling of Embedded Systems Andrew Morton PhD Thesis Defence Electrical and Computer Engineering University of Waterloo January 13, 2005 Outline 1. Thesis Statement

More information

Multiprocessor scheduling

Multiprocessor scheduling Chapter 10 Multiprocessor scheduling When a computer system contains multiple processors, a few new issues arise. Multiprocessor systems can be categorized into the following: Loosely coupled or distributed.

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 29 Approximation Algorithms Load Balancing Weighted Vertex Cover Reminder: Fill out SRTEs online Don t forget to click submit Sofya Raskhodnikova 12/7/2016 Approximation

More information

Operating Systems. Process scheduling. Thomas Ropars.

Operating Systems. Process scheduling. Thomas Ropars. 1 Operating Systems Process scheduling Thomas Ropars thomas.ropars@univ-grenoble-alpes.fr 2018 References The content of these lectures is inspired by: The lecture notes of Renaud Lachaize. The lecture

More information

Advanced Operating Systems (CS 202) Scheduling (1)

Advanced Operating Systems (CS 202) Scheduling (1) Advanced Operating Systems (CS 202) Scheduling (1) Today: CPU Scheduling 2 The Process The process is the OS abstraction for execution It is the unit of execution It is the unit of scheduling It is the

More information

Concurrent programming: Introduction I

Concurrent programming: Introduction I Computer Architecture course Real-Time Operating Systems Concurrent programming: Introduction I Anna Lina Ruscelli - Scuola Superiore Sant Anna Contact info Email a.ruscelli@sssup.it Computer Architecture

More information

Lecture 12: An Overview of Scheduling Theory

Lecture 12: An Overview of Scheduling Theory Lecture 12: An Overview of Scheduling Theory [RTCS Ch 8] Introduction Execution Time Estimation Basic Scheduling Approaches Static Cyclic Scheduling Fixed Priority Scheduling Rate Monotonic Analysis Earliest

More information

Resource-bound process algebras for Schedulability and Performance Analysis of Real-Time and Embedded Systems

Resource-bound process algebras for Schedulability and Performance Analysis of Real-Time and Embedded Systems Resource-bound process algebras for Schedulability and Performance Analysis of Real-Time and Embedded Systems Insup Lee 1, Oleg Sokolsky 1, Anna Philippou 2 1 RTG (Real-Time Systems Group) Department of

More information

CSE 120. Fall Lecture 8: Scheduling and Deadlock. Keith Marzullo

CSE 120. Fall Lecture 8: Scheduling and Deadlock. Keith Marzullo CSE 120 Principles of Operating Systems Fall 2007 Lecture 8: Scheduling and Deadlock Keith Marzullo Aministrivia Homework 2 due now Next lecture: midterm review Next Tuesday: midterm 2 Scheduling Overview

More information

Timing Analysis of Parallel Software Using Abstract Execution

Timing Analysis of Parallel Software Using Abstract Execution Timing Analysis of Parallel Software Using Abstract Execution Björn Lisper School of Innovation, Design, and Engineering Mälardalen University bjorn.lisper@mdh.se 2014-09-10 EACO Workshop 2014 Motivation

More information