Unformatted text preview:

SchedulingWhat’s the problem?OutlineShop schedulingData-flow schedulingData-flow scheduling variantsReal-time schedulingRT scheduling variantsOS schedulingSlide 10RTOS functionsSlide 12The scheduling problemOff-line vs. on-line schedulingScheduling AlgorithmsStatic priority schedulingRate Monotonic SchedulingSlide 18Static Priority Schedule ValidationAudsley’s algorithmSolving implicit equationDynamic priorityWhat’s wrong with LL model?Computation ModelSlide 25Schedule ValidationValidation for Internal EventsValidation for External EventsBounding i-busy PeriodSystem: Network of CFSMsImplementationsEvents: SW to SWEvents: atomicity problemsSlide 34Events: HW to SWEvents: interruptsEvents: SW to HWEvents: SW to/from MPCoordinationExperimentsOpen ProblemsSlide 42Slide 43Data-flow graphsSchedule implementationSlide 46Slide 47Slide 48Data-flow scheduling goalsThroughput boundScheduling heuristicsInter-iteration constraintsList schedulingSlide 54Slide 55Slide 56Slide 57Slide 58Static data flowLoop schedulingLoop scheduling and code sizeBuffer sizeSlide 63Other scheduling modelsEE2491 SchedulingEE2492 What’s the problem?Have some work to do–know subtasksHave limited resourcesHave some constraints to meetWant to optimize qualityEE2493 OutlineOverview–shop scheduling–data-flow scheduling–real-time scheduling–OS schedulingReal-time schedulingRTOS generation– scheduling–CommunicationData-flow scheduling–pure –Petri netsEE2494 Shop schedulingSingle job, one timefinite and known amount of workmultiple resources of different kindoften minimize lateness–could add release, precedence, deadlines, ...SOLUTION: compute the scheduleAPPLICATION: manufacturingEE2495 Data-flow schedulingSingle-job, repeatedlyknown amount of work–simple subtasksmulti-processormax. throughput, min. latencySOLUTION: code generationAPPLICATION: signal processingEE2496 Data-flow scheduling variantsWork–data dependent (BDF, FCPN)Resources–many different execution units (HLS)Goal–min. code, min. buffers, min. resourcesEE2497 Real-time schedulingFixed number of repeating jobseach job has fixed work–job is a sub-taskprocessor(s)meet individual deadlinesSOLUTION: choose policy, let RTOS implement itAPPLICATION: real-time controlEE2498 RT scheduling variantsWork–sporadic or event-driven tasks,–variable (data dependent) work–coordination between tasks: –mutual exclusion, precedence, …Goal–event loss, input or output correlation, freshness, soft deadlines, ...EE2499 OS schedulingVariable number of random tasksknow nothing about sub-tasksprocessor + other computer resourcesprogress of all tasks, average service timeSOLUTION: OS implements time-slicingAPPLICATION: computer systemsEE24910 OutlineOverview–shop scheduling–data-flow scheduling–real-time scheduling–OS schedulingReal-time schedulingRTOS generation–Scheduling–CommunicationData-flow scheduling–pure –Petri netsEE24911 RTOS functionsEnable communication between software tasks, hardware and other system resourcesCoordinate software tasks–keep track which tasks are ready to execute–decide which one to execute: schedulingEE24912 OutlineImplementing communication through eventsCoordination:–classic scheduling results–reactive model of real-time systems–conservative scheduling analysis–priority assignmentEE24913 The scheduling problemGiven:–estimates on execution times of each task–timing constraintsFind:–an execution ordering of tasks that satisfies constraintsA schedule needs to be:–constructed–validatedEE24914 Off-line vs. on-line schedulingPlus side:–simpler–lower overhead–highly predictableMinus side–bad service to urgent tasks–independent of actual requestsEE24915 Scheduling Algorithmsoff-line (pre-run-time, static)–round-robin, e.g.– C1 C2 C3 C4 C1 C2 C3 C4 C1 C2 C3 C4 …–static cyclic, e. g.–C1 C2 C3 C2 C4 C1 C2 C3 C2 C4 C1 C2 …on-line (run-time, dynamic)–static priority–dynamic priority–preemptive or notEE24916 Static priority schedulingsynthesis:–priority assignment –RMS [LL73]analysis– Audsley 91EE24917 Rate Monotonic SchedulingLiu -Layland [73] consider systems consisting of tasks:–enabled periodically–with fixed run time–that should be executed before enabled again–scheduled preemptively with statically assigned prioritiesEE24918 Rate Monotonic Schedulinggiving higher priority to tasks with shorter period (RMS) is optimal–if any other static priority assignment can schedule it, them RMS can do it toodefine utilization as sum of Ei/Ti any set of n tasks with utilization of less than n(21/n-1) is schedulablefor n=2,3,…. n(21/n-1) = 0.83, 0.78, … ln(2)=0.69EE24919 Static Priority Schedule ValidationAudsley [91]:for a task in Liu-Layland’s model find its worst case execution timei i iik nrun time iWCET iperiod i period itimeiEE24920 Audsley’s algorithmlet Ei’s be run-times, Ti’s periods how much can i be delayed by a higher priority task k:–each execution delays it by Ek–while i is executing k will be executed ciel(WCETi/ Tk)WCETi = Ei + SUMk>i ciel(WCETi/ Tk)* EkEE24921 Solving implicit equationiteration–WCETi,0 = Ei –WCETi,n+1 = Ei + SUMk>i ciel(WCETi,n/ Tk)* Ekwill converge if processor utilization if less than 1EE24922 Dynamic priorityEarliest deadline first:–at each moment schedule a task with the least time before next occurrenceLL have shown that for their model, EDF schedules any feasible set of tasksEE24923 What’s wrong with LL model?Liu-Layland model yields strong results but does not model reactivity wellOur model:–models reactivity directly–abstracts functionality–allows efficient conservative schedule validationEE24924 Computation ModelSystem is a network of internal and external tasksExternal tasks have minimum times between executionInternal tasks have priorities and run times20101,2 5,2 3,22,1 4,1EE24925 Computation Model20101,2 5,2 3,22,1 4,1External task execute at random, respecting the lower bound between executionsExecution of a task enables all its successorsCorrect if no events are lostEE24926 Schedule ValidationTo check correctness:–check whether internal events can be lost –priority analysis–check whether external events can be lost –bound WCETEE24927 Validation for Internal


View Full Document

Berkeley ELENG C249A - Lecture Notes

Documents in this Course
Load more
Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?