2 views

Uploaded by Malu Mohan

- Test Bank
- Problemas Resueltos de Vhdl
- How to Use Trello
- 13(a) Explain the Banker’s Algorithm for Deadlock Avoidance With an Illustration. _ Bituh
- Open Gallery in a Lightbox? - Squarespace Answers
- Thor
- An Airline Reservation Application
- Faculty Loading for 1st Trimester 16-17
- gre
- Mail Merge Flowchart - Tanhueco.docx
- EAV
- Study on Real-time Operating System and its Scheduling Procedures
- ANALISI DESKRIPTIF
- Tabel2 penting
- Course Plan
- Sec 4 2008 SA1 Biology Bm
- 102 期中3a
- Tabel frequensi
- Output
- DISTRIBUSI FREKUENSI DATA KHUSUS.docx

You are on page 1of 7

Ci

i

Lectures: Periodic Task Scheduling Luca de Alfaro, 2002-04

Di

Terminology:

i: i-th task Ti: period of i-th task Di: relative deadline of i-th task i : phase (relative start time) of i-th task Ci: computation time of i-th task

Quality of schedule

Response time Ri,j = fi,j ri,j Critical instant: the time at which, if a task is released, it will have the largest response time. Absolute jitter:

Start: maxj (si,j ri,j) minj (si,j ri,j) Finish: maxj(fi,j ri,j) minj (fi,j ri,j)

fi,j

jT

i,j: instance j of task i ri,j: release time of instance j of task i si,j: start time of instance j of task i fi,j: finish time of instance j of task i

Assumptions

A1: The tasks are periodic, period = Ti A2: All instances have the same worst-case execution time Ci A3: All instances have the same relative deadline Di = Ti A4: All tasks in the set of tasks are independent

(We will relax these conditions later)

More assumptions

The tasks do not suspend themselves on I/O All overheads in the kernel are assumed to be 0.

Processor Utilization

Processor utilization For a set of periods and an algorithm A, let Uub(,A) be the upper bound of the processor utilization factor for tasks with to be schedulable by A. Let Ulub = min Uub(,A) If U < Ulub, we know that the tasks are schedulable!

Assign priority to process i proportional to the rate 1/Ti Summary:

Optimal with respect to all fixed-priority algorithms n tasks are guaranteed schedulable if U n(21/n 1). For n , n(21/n 1) ln 2 0.69

v

Critical instant

The critical instant occurs when all the tasks are released simultaneously.

v v

Approximate: n tasks are guaranteed schedulable if U n(21/n 1). Precise: n tasks are guaranteed schedulable iff, for all 1 i n, we have Ri Ti, where Ri is the worstcase response time.

The worst-case response time for a job occurs when it is released simultaneously with all higherpriority (shorter-period) jobs. The worst-case response time can be computed either from a schedule (as above), or with an equation we will present later.

We study the case of two processes, with T1 < T2. RM assigns P1 > P2. We will show this is better than P2 > P1. Clearly, if a generic algorithm uses a different order than RM, there must be at least two processes that are assigned priorities in reverse order wrt. RM.

1 2 Maximum utilization: C1 + C2 T1

v v

Analysis

By non-RM: C1 + C2 T1 By RM: (F+1)C1 + C2 T2 (1) (2)

FT1

T2

We show (1) implies (2): rewriting (1), FC1 + FC2 F T1 FC1 + C2 F T1 (F+1)C1 + C2 F T1 + C1 (F+1)C1 + C2 F T1 + C1

v FT1 T2 Case 2: F = b T2 / T1 c, C1 T2 F T1 Schedulable if FC1 + C2 F T1

Analysis

By non-RM: C1 + C2 T1 By RM: FC1 + C2 F T1 FC1 + FC2 F T1 FC1 + C2 FC1 + FC2 F T1 (1) (3)

n processes sharing CPU: n(21/n 1) When n : ln 2 0.69 Calculus check: n (21/n 1) = n (e(ln 2)/n 1) n (1 + (ln 2)/n 1) ln 2 as n

Theorem: A set {1,...,n} of periodic tasks is schedulable with EDF iff

Proof: if i=1n Ci/Ti 1 then schedulable We prove instead: If not schedulable, then i=1n Ci/Ti > 1

missed

t1

t2

Let t2 be when the missed deadline occurs, and let [t1,t2] be the longest interval of continuous utilization before t2, such that only instances with deadlines less than t2 are executed in [t1,t2].

Precise: n tasks are guaranteed schedulable iff U 1.

Note: we cannot possibly do better than EDF! So why is RM used? Because it's simpler: we don't need to tell the processor the deadlines. It relies on simpler processor scheduling mechanisms.

missed

t1

t2

Periodic tasks with deadlines shorter than the period Task deadlines shorter than the period

Two approaches: Deadline monotonic (DM), derived from rate monotonic. EDF. As usual, EDF is optimal.

Di Ti Di: deadline of task i, relative to period: Di < Ti Deadline monotonic algorithm: assign highest priority to the process with the smallest relative deadline Di. i

Naive approach: reduce the problem to RM, and check

Schedulable iff Ri Di for all tasks Ji, where Ri is the worst-case response time. v v

How can we compute the worst-case response time? Method 1: by drawing a schedule when all processes are released simultaneously.

We can write the worst-case response time as Ri = C i + I i where Ri is the response time, and Ii is the interference to task i due to tasks having priorities higher than that of i. I I I

Ri

Ri

We want the least fixpoint. Think at it as Ri = F(Ri). Note that F is monotonic and leftcontinuous. Solution: Ri = x. F(x) = limn Fn (0). (compute by iteration)

For all i, compute the response time Ri = x. F(x) by iteration. Check that Ri Di. Note: when computing the k-th estimate Rki of Ri, we have that either Rki = Rk-1i, or that Rki Rk-1i Cmin, where Cmin = min1 j n Cj.

When the deadline is shorter than the period, we can also use EDF. As usual, EDF turns out to be better than DM (similarly to EDF vs. RM when the deadlines are equal to the periods). The drawback of EDF is that it needs priorities to be changed dynamically.

Cp(0,L): the amount of processing that is requested in [0,L], and that must be completed (has deadline) before L.

EDF Schedulability

Theorem: A set of periodic tasks is schedulable by EDF iff, for all L 0: L Cp(0,L) Proof: the theorem is proved by showing that the above is equivalent to the formulation based on utilization we showed before.

L + Ti Di

Note that we need to check that L Cp(0,L) only for values of L that:

correspond to some deadline (since thats where Cp may increase) are smaller than the hyperperiod H = i=1n Ti are no larger than the busy period (additional optimization, see Buttazzo)

J1 : (C1=2,T1=6,D1=5) J2 : (C2=2,T1=8,D1=4) J3 : (C3=4,T1=12,D1=8) Hyperperiod: H = mcm(6,8,12) = 24. Deadlines H:

4 (J2), 5 (J1), 8 (J3), 11 (J1), 12 (J2), 17 (J1), 20 (J2 and J3), 23 (J1).

CP(0,4) = C2 = 2 2 CP(0,5) = CP(0,4) + C1 = 4 5 CP(0,8) = CP(0,5) + C3 = 8 8 CP(0,11) = CP(0,8) + C1 = 10 11 CP(0,12) = CP(0,11) + C2 = 12 12 CP(0,17) = CP(0,12) + C1 = 14 17 CP(0,20) = CP(0,17) + C2 + C3 = 20 20 CP(0,23) = CP(0,20) + C1 = 22 23 Schedulable!

- Test BankUploaded byjerkamusen
- Problemas Resueltos de VhdlUploaded byVictor Jesus Sanz Flores
- How to Use TrelloUploaded byBenjie Palaroan Jr
- 13(a) Explain the Banker’s Algorithm for Deadlock Avoidance With an Illustration. _ BituhUploaded byNagendra Reddy
- Open Gallery in a Lightbox? - Squarespace AnswersUploaded byAntonio Almeida
- ThorUploaded byBradley C. Reyes
- An Airline Reservation ApplicationUploaded byAdio odunola
- Faculty Loading for 1st Trimester 16-17Uploaded byジュエル セインツ
- greUploaded bynallamilli monish
- Mail Merge Flowchart - Tanhueco.docxUploaded byStef Tanhueco
- EAVUploaded byMili Castillo
- Study on Real-time Operating System and its Scheduling ProceduresUploaded byEditor IJTSRD
- ANALISI DESKRIPTIFUploaded byhamid3bhs
- Tabel2 pentingUploaded byPeby Rajo Mangindo
- Course PlanUploaded bytrpsiva
- Sec 4 2008 SA1 Biology BmUploaded byEvonna Lau
- 102 期中3aUploaded byWeng Yan
- Tabel frequensiUploaded byMardha Tillah
- OutputUploaded byTris Ramadhan Zarkoni
- DISTRIBUSI FREKUENSI DATA KHUSUS.docxUploaded bynasiroh
- publikasi_07.11.1740Uploaded byBudi Sumawijaya
- Warp ColUploaded byGilmer Calderon Quispe
- Selection Sort AnalysisUploaded bySaket Thakkar
- 3_RALKuantUploaded bysafira
- ActionSoft Guide.docxUploaded byDwellerwarrior
- TranscriptUploaded byDev Bhunia
- EJERCICIOUploaded bygabriel
- System ConvonUploaded byAshutosh Kaul
- 2019_04_10 notesUploaded byCristy Balubayan Nazareno
- mock testUploaded byajayrana424

- EIT IDC Electrical Power System FundamentalsUploaded byMoeed Iqbal
- Fwf Mmtc e LetterUploaded byMalu Mohan
- CH8-E3-E4 EWS-Landline & Mobile VASUploaded byMalu Mohan
- Ch1 e3 e4 Ews Ngsdh ConceptsUploaded byMalu Mohan
- thermalUploaded byPatel Ashok
- 1820-02141300013SUploaded byMalu Mohan
- Nguyen Than Fiberoptic2Uploaded byMalu Mohan
- Ch4Uploaded byMalu Mohan
- Synchronous Digital Hierarchy (SDH)Uploaded bykunj bihari rajpoot
- 1 IntroductionUploaded byMalu Mohan
- EC2042 Embedded and Real Time Systems Lecture Notes (1)Uploaded byPraveen Chellapandian
- Bi Directional InverterUploaded byMalu Mohan
- pq99Uploaded byMalu Mohan
- Harmonic Wavelet AnalysisUploaded byMalu Mohan
- 1213-10011-1-PBUploaded byMalu Mohan
- Lecture5 Frequency Bodenyquist2Uploaded byMalu Mohan
- Finite State MachineUploaded byKulwant Nagi
- Lect12 - Software QualityUploaded byMalu Mohan
- verilog_tutorialUploaded bySanjay Bedudoori
- Power Quality LunchandLearnUploaded byMalu Mohan
- Heartbeat and Temperatire Monitoring SystemUploaded byMalu Mohan
- SpreadSpectrum.ppt_0.odpUploaded byMalu Mohan
- Tutorialv0_3Uploaded byMalu Mohan
- 03 Linked ListsUploaded byAnonymous V7P5fNQI
- 76760766 E Book Scheduling in Real Time SystemsUploaded byMalu Mohan
- Notice that the L293D supports two DC motors.docxUploaded byMalu Mohan
- Install Ns2 on Windows7Uploaded byMalu Mohan
- Mips DatapathUploaded byKaran Kampani

- COUNCELLING SYSTEM.pdfUploaded byPrajwal Kulkarni
- Derby DevUploaded byОжигов Евгений
- Getting Started RFC2544Uploaded byDorinel Ionascu
- netb-mod6aUploaded byprasv
- Lab12 MonteCarlo StudentUploaded byTai Zhou
- Registry tricksUploaded bysudheer92
- c-Unit 8Uploaded byshabbeersks
- Investor PitchUploaded byIsmail
- 88415482-Sandeepani-verilogUploaded byadi_risingsun
- Tf Idf AlgorithmUploaded bySharat Dasika
- Openswitch Opx Admin Guide r210Uploaded bySilvio Cadete
- 176783 CMDB7.6.04 AdministratorsGuideUploaded byRuben Moreno Figueroa
- Blog Skins 367221Uploaded byAtikah Sabri
- EN13201 Manual EngUploaded byczlee88
- Form DesignerUploaded byCarlos N. Porras
- First German Reader for Cooking Bilingual for Speakers of English Beginner Elementary (A1 A2)Uploaded byvadimzn
- 5 Ssh Hardening TipsUploaded byalbert r. carnier guedes
- Scanner WeldROVER.enUploaded byBiju_Pottayil
- Ejemplos TablasUploaded byRodrigo Meza
- Visual FoxproUploaded byDSunte Wilson
- BS-MA-MSc-MCom-MBAUploaded byMian Sajjad
- IC Simple Invoice Template 8857Uploaded byRylie Rivera
- Flood Alert System using Radio Frequency CommunicationUploaded byHazwan Arip
- graphing bellwork 1Uploaded byapi-290657090
- Bps 05411Uploaded bydusan345
- PP38_ITS_1212_Printeer_CLX-6260FD_6260FR_6260FW_BR-0Uploaded byciphard
- Star NX-1500TMUploaded byKST5
- 317357_1Uploaded byThanh Nguyễn Thái
- CSU_ARIS_Modelling_Standards_and_Conventions_Manual_V1_0.pdfUploaded byKetan Pradhan
- History,Edp HandoutUploaded byapi-27149177