Written Exercise Sheet 5

Similar documents
Some Basic Information about M-S-D Systems

Comments on Window-Constrained Scheduling

Matlab and Python programming: how to get started

3.1.3 INTRODUCTION TO DYNAMIC OPTIMIZATION: DISCRETE TIME PROBLEMS. A. The Hamiltonian and First-Order Conditions in a Finite Time Horizon

Hamilton- J acobi Equation: Explicit Formulas In this lecture we try to apply the method of characteristics to the Hamilton-Jacobi equation: u t

Conens Inroducion 2 Preliminary deniions and noaion 3 3 Schedulabliy and a bound on uilizaion 6 4 Rae Monoonic Scheduling 7 4. Deniion

Handling on-line changes. Handling on-line changes. Handling overload conditions. Handling on-line changes

Notes for Lecture 17-18

Solutions to Assignment 1

ACE 562 Fall Lecture 5: The Simple Linear Regression Model: Sampling Properties of the Least Squares Estimators. by Professor Scott H.

Approximation Algorithms for Unique Games via Orthogonal Separators

Essential Microeconomics : OPTIMAL CONTROL 1. Consider the following class of optimization problems

Macroeconomic Theory Ph.D. Qualifying Examination Fall 2005 ANSWER EACH PART IN A SEPARATE BLUE BOOK. PART ONE: ANSWER IN BOOK 1 WEIGHT 1/3

Designing Information Devices and Systems I Spring 2019 Lecture Notes Note 17

04. Kinetics of a second order reaction

Introduction to Probability and Statistics Slides 4 Chapter 4

Linear Response Theory: The connection between QFT and experiments

23.2. Representing Periodic Functions by Fourier Series. Introduction. Prerequisites. Learning Outcomes

Module 2 F c i k c s la l w a s o s f dif di fusi s o i n

Homework 4 (Stats 620, Winter 2017) Due Tuesday Feb 14, in class Questions are derived from problems in Stochastic Processes by S. Ross.

Evaluating the Average-case Performance Penalty of Bandwidth-like Interfaces

Chapter 7: Solving Trig Equations

Inventory Analysis and Management. Multi-Period Stochastic Models: Optimality of (s, S) Policy for K-Convex Objective Functions

Lecture 2-1 Kinematics in One Dimension Displacement, Velocity and Acceleration Everything in the world is moving. Nothing stays still.

10. State Space Methods

Chapter 7 Response of First-order RL and RC Circuits

Let us start with a two dimensional case. We consider a vector ( x,

SOLUTIONS TO ECE 3084

Physics 20 Lesson 5 Graphical Analysis Acceleration

Basic definitions and relations

Asymptotic Equipartition Property - Seminar 3, part 1

Physics 235 Chapter 2. Chapter 2 Newtonian Mechanics Single Particle

Lecture 4 Notes (Little s Theorem)

Solutions for Assignment 2

ODEs II, Lecture 1: Homogeneous Linear Systems - I. Mike Raugh 1. March 8, 2004

E β t log (C t ) + M t M t 1. = Y t + B t 1 P t. B t 0 (3) v t = P tc t M t Question 1. Find the FOC s for an optimum in the agent s problem.

Stochastic models and their distributions

Final Spring 2007

Spring Ammar Abu-Hudrouss Islamic University Gaza

a 10.0 (m/s 2 ) 5.0 Name: Date: 1. The graph below describes the motion of a fly that starts out going right V(m/s)

Announcements: Warm-up Exercise:

1. Consider a pure-exchange economy with stochastic endowments. The state of the economy

T. J. HOLMES AND T. J. KEHOE INTERNATIONAL TRADE AND PAYMENTS THEORY FALL 2011 EXAMINATION

Biol. 356 Lab 8. Mortality, Recruitment, and Migration Rates

EXERCISES FOR SECTION 1.5

control properties under both Gaussian and burst noise conditions. In the ~isappointing in comparison with convolutional code systems designed

Seminar 4: Hotelling 2

F This leads to an unstable mode which is not observable at the output thus cannot be controlled by feeding back.

MATH 4330/5330, Fourier Analysis Section 6, Proof of Fourier s Theorem for Pointwise Convergence

EE 301 Lab 2 Convolution

Lecture Notes 5: Investment

6.003 Homework #9 Solutions

CHAPTER 12 DIRECT CURRENT CIRCUITS

arxiv: v1 [cs.ds] 30 Apr 2016

Analysis of Federated and Global Scheduling for Parallel Real-Time Tasks

KEY. Math 334 Midterm I Fall 2008 sections 001 and 003 Instructor: Scott Glasgow

t is a basis for the solution space to this system, then the matrix having these solutions as columns, t x 1 t, x 2 t,... x n t x 2 t...

d 1 = c 1 b 2 - b 1 c 2 d 2 = c 1 b 3 - b 1 c 3

8. Basic RL and RC Circuits

A First Course on Kinetics and Reaction Engineering. Class 19 on Unit 18

BU Macro BU Macro Fall 2008, Lecture 4

Vehicle Arrival Models : Headway

EECE251. Circuit Analysis I. Set 4: Capacitors, Inductors, and First-Order Linear Circuits

Appendix to Creating Work Breaks From Available Idleness

ON THE DEGREES OF RATIONAL KNOTS

Math 111 Midterm I, Lecture A, version 1 -- Solutions January 30 th, 2007

2002 November 14 Exam III Physics 191

Section 3.5 Nonhomogeneous Equations; Method of Undetermined Coefficients

Echocardiography Project and Finite Fourier Series

6.003 Homework #9 Solutions

KINEMATICS IN ONE DIMENSION

Guest Lectures for Dr. MacFarlane s EE3350 Part Deux

Math 334 Fall 2011 Homework 11 Solutions

Assignment 6. Tyler Shendruk December 6, 2010

Chapter 6. Systems of First Order Linear Differential Equations

IB Physics Kinematics Worksheet

Robotics I. April 11, The kinematics of a 3R spatial robot is specified by the Denavit-Hartenberg parameters in Tab. 1.

Math 2142 Exam 1 Review Problems. x 2 + f (0) 3! for the 3rd Taylor polynomial at x = 0. To calculate the various quantities:

Challenge Problems. DIS 203 and 210. March 6, (e 2) k. k(k + 2). k=1. f(x) = k(k + 2) = 1 x k

f(s)dw Solution 1. Approximate f by piece-wise constant left-continuous non-random functions f n such that (f(s) f n (s)) 2 ds 0.

Math Week 14 April 16-20: sections first order systems of linear differential equations; 7.4 mass-spring systems.

ψ(t) = V x (0)V x (t)

Chapter 10 INDUCTANCE Recommended Problems:

ENGI 9420 Engineering Analysis Assignment 2 Solutions

Chapter 2. Models, Censoring, and Likelihood for Failure-Time Data

Two Coupled Oscillators / Normal Modes

Reading from Young & Freedman: For this topic, read sections 25.4 & 25.5, the introduction to chapter 26 and sections 26.1 to 26.2 & 26.4.

Physics 1402: Lecture 22 Today s Agenda

Learning a Class from Examples. Training set X. Class C 1. Class C of a family car. Output: Input representation: x 1 : price, x 2 : engine power

Constant Acceleration

Lab 10: RC, RL, and RLC Circuits

Logic in computer science

18 Biological models with discrete time

Topic Astable Circuits. Recall that an astable circuit has two unstable states;

6.003 Homework 1. Problems. Due at the beginning of recitation on Wednesday, February 10, 2010.

Chapter 2. First Order Scalar Equations

Chapter 3 Boundary Value Problem

20. Applications of the Genetic-Drift Model

Bias in Conditional and Unconditional Fixed Effects Logit Estimation: a Correction * Tom Coupé

Transcription:

jian-jia.chen [ ] u-dormund.de lea.schoenberger [ ] u-dormund.de Exercise for he lecure Embedded Sysems Winersemeser 17/18 Wrien Exercise Shee 5 Hins: These assignmens will be discussed a E23 OH14, from 10:15 am - 11:45 am on 20. Dez. 2017. You are no obligaed o urn in he soluions. T i indicaes he period of ask τ i, D i is relaive deadline, and C i is WCET. 1 Schedulabiliy Analysis Consider he following parameers for periodic asks wih T i = D i under rae-monoonic scheduling: T i C i τ 1 5 1 τ 2 8 3 τ 3 9 2 Assume ha he asks shall be execued on a single core sysem. Which is he hyperperiod? Examine formally, if a schedule wih he given parameers exiss, and verify your resul. Wha are your findings? Why? Hyperperiod: 360 Criical insan: schedulable. Liu/Layland: 0.7972 0.7797, possibly no schedulable. 2 Scheduling of independen periodic asks The following ask diagram is given: Task 1 Task 2 0 5 10 15 20 25 30 35 40 Indicae he parameers of he asks (C i, T i = D i ). Which scheduling policy was possibly used? Why? Draw he diagram for he case ha he asks are ordered according o a rae monoonic scheduling policy. Wha do you noice? EDF RM schedule: Task 2 misses is deadline. Task 1 Task 2 0 2 4 6 8 10 12 14

3 Harmonic Task Sysems Consider he following parameers for periodic asks wih T i = D i : C i 0.2 2 2 1.5 1 14 28.8 T i 2 6 12 24 24 72 288 D i 2 6 12 24 24 72 288 U i 0.1 1/3 1/6 0.0625 0.0417 0.195 0.1 Assume he asks shall be execued on a single core sysem. Deermine formally if he rae monoonic schedule is feasible. Deermine formally if he earlies deadline firs schedule is feasible. RM: 0.9952 < 1, feasible, cf. Theorem of Kuo and Moc, es-chen-4.3.pdf, slide 29. EDF: 0.9952 < 1, feasible. 4 Criical Insan Theorem Explain he criical insan heorem for uniprocessor fixed-prioriy scheduling in your words. As menioned in he lecure, he criical insan heorem for uniprocessor fixed-prioriy scheduling is very fragile if he assumpions are no me. To apply he criical insan heorem, quie a few condiions have o be saisfied. Please indicae which of he following condiions are correc and which of hem are incorrec. If a condiion is incorrec, please correc i. The ask se consiss of only independen asks. The ask se mus be sricly periodic. The scheduling algorihm is fixed-prioriy preempive scheduling. Early compleion of jobs is no possible. A job has o spin ill is wors-case execuion ime if i finishes earlier. No ask volunarily suspends iself. Tha is, a job canno suspend iself during is execuion. The relaive deadline of a ask can be larger han is period. Scheduling overheads (conex swich overheads) are zero. All periodic/sporadic asks have zero release jier (he ime from he ask arriving o i becoming ready o execue). Incorrec. Incorrec. Incorrec.

5 Periodic Tasks Is he following program a periodic ask wih period T? Explain your answer. while (rue) sar := ge he sysem ick; perform analog-o-digial conversion o ge y; compue conrol oupu u; oupu u and do digial-o-analog conversion; end := ge he sysem ick; imetosleep := T-(end-sar); sleep imetosleep; end while No. The ask can be preemped/inerruped beween end and sleep. 6 Prioriy Inversion We are considering a sysem wih hree jobs J 1, J 2 and J 3. The prioriy of job 1 is assumed o be highes, he prioriy of job 3 is assumed o be lowes. These jobs become available as indicaed in he following diagram. Job J 3 execues 2 ime unis afer i becomes available and afer 4 ime unis of execuion ime. (J 3 runs for 2 ime unis firs and hen eners he criical secion. Is criical secion lengh is 2 ime unis.) Is oal execuion ime is 8 unis of ime. Job J 2 has a oal execuion ime of 25 ime unis. Job J 1 execues afer 2 unis of execuion ime and afer 5 unis of execuion ime. (J 1 runs for 2 ime unis firs and hen eners he criical secion. Is criical secion lengh is 3 ime unis.) Is oal execuion ime is 6 unis of ime. Wha is he schedule of he sysem if we use pre-empive, prioriy-based scheduling? Include calls o and. Mark ime inervals of prioriy inversion. J 1 J 2 J 3 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 prioriy inversion (direc only) prioriy inversion (direc and blocking) Wha is he schedule of he sysem if we use pre-empive, prioriy-inheriance proocol (PIP)? Include calls o and. Mark ime inervals of prioriy inversion.

J 1 J 2 J 3 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 prioriy inversion (direc and blocking) 7 PCP Example Draw he curren prioriy ceiling Π () of he sysem and he curren prioriy of he jobs in he wo examples of PCP (i.e., x axis wih respec o ime and y axis wih respec o he prioriy levels) given in he lecure (i.e., Pages 19 and 20 in es-chen-4.4.pdf). 8 Disribued PCP (DPCP) (advanced**) Consider a sysem wih muliple processors. A ask is saically assigned on one processor. One addiional processor, P 0, is allocaed as a synchronizaion processor. Tha is, all he criical secions are execued on processor P 0 by using PCP under he rae-monoonic prioriy assignmen. This proocol, called Disribued PCP (DPCP), was proposed by Raj Rajkumar in 1990. In he following concree example, we have hree asks, each of hem assigned on one processor and all he criical secions are proeced by using one binary semaphore. Therefore, muli-asking only akes place on P 0. Task τ 1 is on processor P 1, ask τ 2 is on processor P 2, and ask τ 3 is on processor P 3. In Tabelle 1, for a ask τ k, C k is he wors-case execuion ime (including he criical secion lengh), T k is he period, N k is he number of criical secions per job invocaion, and L k is he wors-case criical secion lengh (per criical secion). Noe ha early compleions are possible. To analyze wheher ask τ k can mee is deadline, we need o analyze is remoe blocking ime B k on P 0. In he above simple example, since here is only one ask per processor (excep P 0 ), we can hen simply validae wheher B k +C k T k. By using he criical insan heorem, Mr. Smar argues ha he addiional delay due o PCP on P 0 for ask τ k is upper bounded by L k (max j>k L j ) + k 1 i=1 Tk T i L i N i =. The firs erm L k (max j>k L j ) is due o he fac

ha each criical secion access can be blocked by a lower-prioriy ask. The second erm k 1 Tk i=1 T i L i N i is due o he inerference from he higher-prioriy asks under he criical insan heorem. Therefore, he concludes ha B 1 is upper bounded by 4, B 2 is upper bounded by 1 + 2 2 = 5, and B 3 is upper bounded by 0 + 2 2 + 4 2 = 12. Since C k + B k T k k = 1,2,3, he concludes ha his ask se is feasible under DPCP. However, here is a concree counerexample in Abbildung 1, showing ha ask τ 3 misses he deadline. Wha wen wrong in he above analysis? job release normal execuion criical secion waiing for criical secions P 0 : A q τ 2 τ 1 τ 3 τ 1 τ 3 τ 2 τ 1 τ 3 P 1 : τ 1 P 2 : τ 2 miss deadline P 3 : τ 3 0 2 4 6 8 10 12 14 16 18 20 22 24 26 Abbildung 1: An example schedule where τ 3 misses a deadline τ k P(τ k ) C k T k (= D k ) N k L k τ 1 P 1 6 10 1 2 τ 2 P 2 11 18 1 4 τ 3 P 3 8 20 3 1 Tabelle 1: Task parameers for he counerexample. You can imagine ha τ i suspends from P 0 when i is execued on P i. Therefore, he calculaion k 1 i=1 Tk T i L i N i is purely based on he criical insan heorem which does no hold when asks suspend hemselves.