0% found this document useful (0 votes)
22 views66 pages

RTOS-Session4

The document discusses clock-driven scheduling for real-time operating systems, focusing on its structure, constraints, and implementation. It covers various aspects such as static scheduling, cyclic schedules, and the handling of aperiodic jobs, including techniques like slack stealing to improve response times. Additionally, it provides examples and pseudo code to illustrate the scheduling process and its effectiveness in meeting deadlines.

Uploaded by

purushotham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views66 pages

RTOS-Session4

The document discusses clock-driven scheduling for real-time operating systems, focusing on its structure, constraints, and implementation. It covers various aspects such as static scheduling, cyclic schedules, and the handling of aperiodic jobs, including techniques like slack stealing to improve response times. Additionally, it provides examples and pseudo code to illustrate the scheduling process and its effectiveness in meeting deadlines.

Uploaded by

purushotham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 66

SEWP ZG524

Real - Time Operating Systems

Clock Driven Scheduling

Purushotham BV
utham74@gmail.com
1
Clock Driven Scheduling
5.1 Notations and Assumptions
5.2 Static, Timer-driven Scheduler
5.3 General Structure of Cyclic Schedules
5.4 Cyclic Executives
5.5 Improving the Average Response Time of Aperiodic Jobs
5.6 Scheduling Sporadic Jobs
5.7 Practical Considerations and Generalizations
5.8 Algorithm for Constructing Static Schedules
5.9 Pros and Cons of Clock-driven Scheduling
5.10 Summary
2
5.1 Notations and Assumptions

• Clock driven scheduling is always applicable to a


system which is deterministic.
• This approach can be illustrated using a periodic
task model.
• Assumptions made are
– System has n periodic tasks and n is fixed.
– Task parameters are known priori, Inter release times are
negligibly small.
– Task Ti,k is ready for execution at release time ri,k.
• Task modeling can be made based on these
assumptions.
3
Notations and Assumptions (Contd.,)

• We refer to a periodic task Ti with phase φi, period pi,


execution time ei , and relative deadline Di by the 4-
tuple (φi, pi, ei, Di).
• For example, (1, 10, 3, 6) is a periodic task whose
phase is 1, period is 10, execution time is 3, and
relative deadline is 6.
• Both (10, 3, 6) and (10, 3) have zero phase. Their
relative deadlines are 6 and 10, respectively.

4
5.2 Static, Time-Driven Scheduler

• Aperiodic tasks are stored in a queue.

• Tasks ordering depends on the underlying application.

• Initially to ensure feasibility a static schedule is


constructed for off-line tasks.

• Static schedule is followed as long as no task exceeds


its allocated execution time.

• Off-line scheduling can be easily achieved using


complex scheduling algorithms.
5
Clock Driven Scheduling
• For Scheduling off-line we can use complex algorithms
• Run-time of the scheduling algorithm irrelevant
• Search a schedule that optimizes characteristic of the
system
• Example: a schedule in which the idle periods
accommodating aperiodic jobs
• But scheduling algorithm unimportant as long as resulting
schedule meets deadline
Example #1
• System with 4 independent periodic
tasks
• Phase and Deadline take default values
• Their utilizations ui = ei / pi are 0.25,
0.36, 0.05, and 0.1, respectively,
• Total utilization is 0.76.
• The hyper period of the tasks 20,
• We see that T1 starts execution at time
0, 4, 9.8, 13.8, and so on;
• T2 starts execution at 2, 8, 12, 18, and
so on.
• All tasks meet their deadlines.
Example #1 (Contd.,)
• Some intervals[ (3.8,4), (5,6),and (10.8,12)], are not used
by the periodic tasks.
• These intervals can be used to execute aperiodic jobs.
• It is advantageous to have the unused intervals scattered
more or less periodically in the schedule.
• If no aperiodic jobs are ready for execution during these
intervals, we can use the time to execute background
nonreal-time jobs or some built-in self-test job that checks
the status and monitors the health of the system
Example #2

• Consider a task set comprising of 5 tasks to be


scheduled on 4 processors.
• Parameters are T1=(5,1), T2=(6,1), T3=(11,2),
T4=(13,1), T5=(19,2)
• Task Utilizations are 0.20, 0.17, 0.18,0.08 and 0.11
respectively.
• Total utilization of the task set is 0.73 which is <= 1.

Gantt Chart Schedule 9


Implementing the Scheduler

• Scheduler is implemented using a timer.


– Interrupts are requested in a timely manner.
• H is taken as the hyper period of the system.
• N is the number of entries in the system.
• Interrupt wakes up the scheduler.

10
Pseudo code for Clock-Driven Scheduler

11
5.3 General Structure of Cyclic Schedules

• Instead of adhoc schedules


– Schedules with concrete structures are preferable.
– Make sure that the structure has the desired characteristics
– Cyclic schedules are have certain properties that make them
reliable and have the desired characteristics
• Gives two benefits:
– Scheduler can easily check for overruns and missed
deadlines at the end of each frame
– Can use a periodic clock interrupt, rather than
programmable timer

12
Frames and Major Cycles

• Restrictions imposed in clock driven scheduling


– Decisions are to be periodic.
– Time line is partitioned into frames.
– Each frame as a frame length or size f.
• Scheduler monitors the execution of frames.
• Constraints are incorporated to ensure that tasks are
released for execution.

13
Frame Size Constraints
• How to choose frame length?
– To avoid preemption and every jobs to start and complete
execution within a single frame: Choose frame size f,
f ≥ max(e1, e2, …, en) of every task (Equation 1)
– To minimize the number of entries in the cyclic schedule, the
hyper-period should be an integer multiple of the frame size ( ⇒f
divides the period pi evenly for at least one task):
∃i : mod(pi, f ) = 0 (Equation 2)
– The scheduler to check jobs complete by their deadline, should
be at least one frame boundary between release time of a job
and its deadline:
2*f – gcd(pi, f ) ≤ Di for i = 1, 2, …, n (Equation 3)
• All 3 constraints should be satisfied
Structure of a Cyclic Schedule

General structure of a cyclic schedule.

A constraint on the value of frame size.


15
Frame Size Constraints – Example
Question
• For three tasks: T1 (15, 1, 14), T2 (20, 2, 26), T3 (22, 3)
Find all possible frame sizes

Solution:
• As per Equation 1 ( 1st Constraint) , the frame size
should be greater than 3 ( larger than the execution time
of the 3 tasks)
• As per Equation 2 ( 2nd Constraint), the possible values
of frame size are 3,4,5,10,11,15,20,22
i.e. (floor(pi/f) – (pi/f)) = 0 or theoretically all possible
divisors of the various periods (15, 20 and 22) can be the
possible frame sizes.
Solution (Contd.,)
• As per Equation 3(3rd Constraint), only 3 , 4 and 5
satisfies the condition 2*f – gcd (pi, f ) ≤ Di
( or f ≤ Di is preliminary condition to satisfy the 3 rd
constraint)
Lets take f=5 and period =20, GCD(20,5)=5
Therefore 2*f – gcd(pi, f ) = 2*5-5=5 ≤ Di because 5 ≤20
Lets take f=11 and p=22 GCD is 11 and 2*11-11=11 is
greater than 22 and condition does not satisfy

Note: Every possible value of “f” should satisfy the


condition for all the period values
Job Slices
• Sometimes, a systems cannot meet all three frame size
constraints simultaneously.
• An example is the system T={(4,1),(5,2,7),(20,5)}.
• For Eq.(1) to be true, If f ≥ 5, but to satisfy Eq. (3) we
must have f ≤ 4.
• In this situation, solve by splitting T3 into T 3,1= (20, 1), T
3,2 = (20, 3) and T 3,3 = (20,1)

Other possible splits exist;


Explanation of Cyclic Schedule example
• Task (20,5) is divided into 3 slices with execution
times 1,3 and 1 respectively.
– Hence 3 subtasks are (20,1), (20,3) and (20,1)
• Resultant system will have 5 tasks.
• Hence preemptive schedule would not accommodate
tasks T1 and T2 together.

• Example – Preemptive cyclic schedule of T1(4,1),


T2=(5,2,7) and T3(20,5) with Task T3(20,5) being
divided into 3 slices

20
Explanation (Contd.,)
• You may question why we choose to decompose (20, 5) into
three subtasks.
• To satisfy Eq. (5.1), it suffices for us to partition each job in
the task into two slices, one with execution time 3 and the
other with execution time 2. However, a look at the schedule
in Figure shows the necessity of three slices. It would not be
possible to fit the two tasks (20, 3) and (20, 2) together with
T1 and T2 in five frames of size 4. T1, with a period of 4,
must be scheduled in each frame. T2, with a period of 5,
must be scheduled in four out of the five frames.
• (The fact that the relative deadline of T2 is 7 does not help.)
This leaves one frame with 3 units of time for T3. The other
frames have only 1 unit of time left for T3. We can schedule
two subtasks each with 1 unit of execution time in these
frames, but there is no time in any frame for a subtask with
execution time 2.
Steps to be Followed while
Constructing a Cyclic Schedule
• Cyclic schedule has the following constraints
– Choosing frame size.
– Partitioning tasks into slices.
– Placing slices in frames.
– Reduction of context switching and communication overhead.

22
5.4 Cyclic Executives
• Clock-driven scheduler modified to accommodate the
restriction that scheduling decisions are made only at
frame boundaries.
• The cyclic executive refers to a scheduler that
deterministically interleaves and sequentializes the
execution of periodic-tasks on a CPU according to a given
cyclic schedule.
• Each job slice is a procedure.
• The cyclic executive executes a single do loop.
• Starting from the beginning of each frame and executes
the slices scheduled in the frame.
• Cyclic executive mean a table-driven cyclic scheduler for
all types of jobs in a multithreaded system.
Cyclic Executives (Contd.,)
• It makes scheduling decisions only at the beginning of
each frame

• Deterministically interleaves the execution of periodic


tasks.

• It allows aperiodic and sporadic jobs to use the time


not used by periodic tasks.
Cyclic Executives (Contd.,)
Cyclic Executives (Contd.,)
• Table that drives the scheduler has F entries
• L(k) the names of the job slices that are scheduled in
frame k; (scheduling block)
• Cyclic executive executed by the clock interrupt that
signals the start of a frame:
– Determines the appropriate scheduling block for this frame
– Executes the jobs in the scheduling block in order
– Starts job at head of the aperiodic job queue running for
remainder of frame
• Less overhead than pure table driven cyclic scheduler,
since only interrupted on frame boundaries, rather than
on each job
5.5 Improving the Average Response Time of
Aperiodic Jobs
• Aperiodic jobs are scheduled in the background after
all jobs with hard deadlines completed
– Delays execution of aperiodic jobs in preference to periodic
jobs
– There is no advantage to completing a hard real-time job
early
– An aperiodic job is released due to an event,
– The sooner such a job completes, the more responsive the
system

• Minimizing response times for aperiodic jobs is a


design goal of real-time schedulers
Slack Stealing
• A way to improve the response times of aperiodic jobs is
by executing such jobs in advance of periodic jobs
whenever possible. This approach, called slack stealing
• Every periodic job slice must be scheduled in a frame
that ends no later than its deadline.
• Let the total time allocated to all the slices scheduled in
the frame k be xk. The slack (time) available in the frame
is equal to f − xk at the beginning of the frame.
• If the aperiodic jobs in queue at this time, the cyclic
executive can let aperiodic jobs execute for f − xk without
causing any job to miss its deadline.
Slack Stealing (Contd.,)
• An aperiodic job executes ahead of slices of periodic
tasks and it consumes the slack in the frame.
• After y units of slack time are used by aperiodic jobs,
the available slack is reduced to f − xk − y.
• The cyclic executive let aperiodic jobs to execute in
frame k if available slack f − xk − y > 0.
• If aperiodic job queue empty, it lets the periodic task
server to execute the next slice in the current block.
• The amount of slack remains the same during this
execution.
• As long as there is slack, the cyclic executive returns to
examine the aperiodic job queue after each slice
completes.
Example
• Figure shows the cyclic schedule of the periodic tasks.

• Three aperiodic jobs A1, A2,and A3 are released


• Their release times are 4, 9.5. and 10.5,
• Their execution times are 1.5, 0.5 and 2, respectively.

• By cyclic executive aperiodic jobs A1, A2 and A3


scheduled after periodic tasks
Example (Contd.,)
• The execution of A1 starts at time 7. It does not complete at
time 8 when the frame ends A1 is preempted. It is resumed
at time10 after both slices in the next frame complete. and
its response time is 6.5.
• A2 executes after A1 completes and has a response time
equal to 1.5. Similarly, A3 follows A2 and is preempted
once and completes at the end of the following frame. The
response time of A3 is 5.5.
• The average response time of these three jobs is 4.5.
Example (Contd.,)

• Figure shows what happens if the cyclic executive does


slack stealing.

• At time 4, the cyclic executive finds A1 in the aperiodic


job queue
• Calculate f − xk = 1 unit of slack. and lets A1 execute.
• At time 5, there is no more slack. It preempts A1 and lets
the periodic task execute in the frame
Example (Contd.,)

• At the beginning of the next frame, the available slack is 2. It resumes A1,
which completes at time 8.5.
• At the time, the first slice in the current block is executed, since the aperiodic
job queue is empty.
• Upon completion of the slice at time 9.5, the cyclic executive checks the
aperiodic job queue and finds A2 ready, and lets A2 execute.
• When the job completes at time 10, the cyclic executive finds the aperiodic job
queue empty and lets the periodic task server execute the next job slice in the
current block.
• At time 11, it finds A3 and lets the job execute during the last unit of time in
the frame, as well as in the beginning of the next frame. The job completes by
time 13.
• According to this schedule, the response times of the jobs are 4.5, 0.5, and
2.5, with an average of 2.5.
Implement Slack Stealing
• The initial amount of slack in each frame can be pre computed along
with the cyclic schedule and stored in the table.
• It is necessary to keep track of the amount of available slack and
update when consumes the slack using an interval timer.
• At the beginning of each frame, the cyclic executive sets the timer to
the value of the initial slack in the frame.
• The timer counts down whenever an aperiodic job executes ahead of
any slice in the current block.
• When the timer expires, indicating that there is no more slack,
• The cyclic executive preempts the executing aperiodic job and lets the
execution of the next job slice in the current block begin.
• This scheme is practical only when the temporal parameters of
periodic tasks are in orders of hundreds of milliseconds or seconds.
Average Response Time

• It has to be ensured that the response time of a system


of tasks at any instant does not exceed the average
response time.
• Average response time is computed from mean and
mean-square values of inter arrival times.
– E[x] is expected value of x
– U is total utilization of periodic tasks.
– 1-U refers to fraction of time available for aperiodic tasks.

35
Average Response Time (Contd.,)
• When tasks are scheduled on FIFO basis
  E[  i ]  
i na
W0 
W     
i 1   (1  U )   (1  U ) 2
[1  U A / (1  U )] 
• Where
 i E[  i 2 ] 
na
W0   
i 1  2 
• Behavior of average response time of some aperiodic
tasks as function of UA
• Average queuing time is inversely proportional to the
square of aperiodic bandwidth.
• Jobs in queue for ith periodic task
 E[ i ]   W0 
Wi    2 
 (1  U )   (1  U ) [1  U H / (1  U )][1  (U H  ui ) / (1  U )] 
36
Average Queuing Time v/s Total Average
Utilization

37
5.6 Scheduling Sporadic jobs

• Sporadic tasks are random in nature.


• Minimum release time and worst case execution times
are unknown apriori.
• Scheduling algorithm should handle sporadic tasks
separately.

38
Acceptance Test

• Sporadic tasks can be evaluated using an acceptance


test.
• Feasibility is one of the aspects checked during the
acceptance test.
• Based on acceptance results
– Task is accepted / rejected by the scheduler.
• Alerts are provided to a system
– Whether tasks will be scheduled on time or not.
• Assumption
– Minimum execution time is known at time of release.
• Task can be scheduled only if and only if
– Current slack time >= execution time.
39
EDF Scheduling of the Accepted Jobs
• EDF algorithm ensures optimality while scheduling
sporadic tasks.
• Scheduler queues accepted tasks.
– Tasks are queued in increasing order of deadlines.
– Sporadic tasks are inserted in the queue preserving the
order.

40
A Cyclic Executive with Sporadic and Aperiodic Task Scheduling Capability

41
Explanation of Example and Schedule

• At time 3 sporadic task S1(17,4.5) with execution time 4.5 and


deadline 17 is released.
– Acceptance test is performed at time 4.
• S1 must be scheduled in frames 2,3 and 4.
• At time 5, S2(29,4) is released. Frames 3 and 7 end before their
deadline.
– Acceptance test performed at time 8.
– Total amount of slack is 5.5.

42
Explanation of Example and Schedule

• At time 11, S3(22,1.5) is released.


– Slack available is 2 units for frames 4 and 5.
• At time 14, S4(44,5) is released
– Acceptance test is done at time 16.
– Scheduler finds only 4.5 before the deadline of S4.

43
Optimality of Cyclic EDF Algorithm

• Cyclic EDF is optimal


– Sporadic tasks are schedulable.
• If tasks perform schedulability tests at arbitrary times
– Cyclic EDF becomes non-optimal.
• Interrupt driven schedulers has a drawback
– Of increasing periodic time slices and delaying
schedules.
• In some cases cyclic EDF may become non-optimal
– When some sporadic tasks tend to get rejected.
• Hence for sporadic tasks cyclic EDF is an on-line
scheduler.

44
5.7 Practical Considerations and Generalizations

• Scheduler needs to take into account practical constraints


to effectively schedule tasks.
– These constraints need to be extended to
multiprocessor systems.
• Issues involved are addressed in forthcoming slides.

45
Handling Frame Overruns
• There are multiple reasons associated with a frame run.
– When a execution time parameter is valid for one set of data
values, its value may increase for a rare combination of similar
values.
– Transient hardware faults may increase frame overruns.
– A bug undetected during debugging and testing could pose a
problem.
• Digital controller is a typical example.
• Overruns can be handled by continuing to execute the
offending task.
• Postponing task executions can produce delayed
schedules.

46
Mode Changes

• Mode changes tend to modify system settings.


– System reconfiguration tends to take place.
• Periodic tasks tend to execute in a new mode and not in
the existing mode.
• When modes are switched
– System configuration needs to be rechecked.

47
Aperiodic Mode Changes

• When mode changes take place for tasks having soft


deadlines
– They are resolved by treating such tasks as aperiodic tasks.
– Once tasks begins execution schedule is modified for
improved speedup.
• Sometimes it may be better to discard aperiodic and
sporadic tasks rather than permitting them to execute.
• Another option is to have mode change task check to
ensure sporadic tasks complete their execution.

48
Source Code for Mode Changer

49
Sporadic Mode Change
• Sporadic tasks have hard deadline.
• 2 scheduling approaches
– Treat sporadic task as ordinary task and schedule
• provided task rejection feature is supported by application when mode
can not be changed.
– Using a computer controlled bulldozer to poll and select the
appropriate task.

50
General Workloads and Multiprocessor
Scheduling
• In some cases clock driven approach is applicable to varying
work load.
– Examples of such case include a bus arbitrator which interleaves
data transmission between different I/O devices.
• Here clock driven approach is applicable to mixed workloads
(tasks other than periodic tasks.)
• Constraint to be satisfied - all task parameters should be
known a priori.
– To achieve the above static schedule has to be developed offline.
– Precedent constraints among tasks with relative dependencies
have to be satisfied.
– It is easier to schedule such tasks on several processors using a
global clock.
– While scheduling such tasks clock drifts on processors need to
be ignored.
• E.g: Boeing 777 Airplane Information Management System (AIMS)
51
5.8 Algorithm for Constructing Static
Schedules
• To construct a static
schedule
– First choose a minor
frame length for a
set of periodic tasks.
– Tasks need to be
segmented satisfying
their deadline
constraints.
– Tasks should be non
preemptable in
nature.

Fig: A simple clock driven


multiprocessor schedule 52
Scheduling Independent
Preemptable Tasks
• A set of preemptable periodic tasks whose relative deadlines
are ≥ to their respective periods is schedulable if and only if
the total utilization is no greater than 1.
• Deadline constraints impose restrictions on the feasibility of
the schedule.
• Such schedules are developed iteratively.
• Algorithm involved is known as “iterative network-flow
algorithm” (INF).
• To apply the INF all possible frame sizes are to be determined.
– For example a task set T1(4,1), T2(5,2,7) and T3(20,5) has frame
sizes 2 and 4.
• INF computes the feasible cyclic schedule between these
frame sizes starting from the largest value i.e., 4.
53
Network-Flow Graph
• Algorithm is based on a network formulation strategy.
• Constraints are indicated by a network flow graph of
the system.
• Algorithm
– A task vertex Ji represents each task for i varies from 1 to n.
– Frame vertex j represents each frame (j varying from 1 to F).
– 2 special vertices named source and sink are identified.
– Directed edge (Ji,j) from a task vertex j if j can be scheduled in
frame j and capacity is frame size F.
– There is a directed edge from the source vertex to every task vertex
Ji and capacity is execution time ei of task.
– There is a directed edge from every frame vertex to the sink and
capacity of the edge is f. 54
Network-Flow Graph (Contd.,)

• Flow of an edge is non-negative and satisfies the


following constraints
– Flow is no greater than the capacity of the edge.
– When source and sink is involved
• Sum of inflows to the edge is equal to the sum of the
outflows from the edge.
– It can also be stated that sum of all the flows of all edges from
the source should be equal to the sum of all the flows into the
sink.
• Complexity of the algorithm is O((N+F)3.

55
Part of a Network-Flow Graph

56
Maximum flow and feasible
preemptive schedule.
• For the above graph maximum flow is at most
equal to the sum of the execution times of all
tasks to be scheduled in a major cycle.
• Set of flows from task vertices to frame vertices
gives the maximum flow.
– As seen from example T1(4,1), T2(5,2,7) and
T3(20,5) has frame sizes 2 and 4.
– Maximum flow of the graph is 18 which is the
makespan equal to the hyperperiod of all tasks.

57
Example illustrating network-flow
formulation

58
Maximum flow and feasible
preemptive schedule.
• For the above graph maximum flow is at most equal to
the sum of the execution times of all tasks to be
scheduled in a major cycle.
• Set of flows from task vertices to frame vertices gives
the maximum flow.
– As seen from example T1(4,1), T2(5,2,7) and T3(20,5) has
frame sizes 2 and 4.
– Maximum flow of the graph is 18 which is the makespan
equal to the hyperperiod of all tasks.

59
Generalization to Arbitrary Release Times
and Deadlines
• Network-flow formulation can easily be generalized to
develop schedules of independent tasks.
• Release times of tasks from 1 to N can be generalized to
create schedules with latest deadlines upto 2N-1.

60
Postprocessing
• Feasible schedule may not always meet constraints
imposed by cyclic schedule.
– Examples include precedence order of tasks and restrictions
on preemptions.
• Network-flow graph is created based on the assumption
that tasks are independent.
• This leads to wrong order of scheduling tasks.
• Schedule so developed can be transformed into a
schedule following precedence constraints by swapping
the time allocations.
• Optimality cannot be guaranteed in such schedule
transformations. 61
5.9 Pros and Cons of Clock-Driven
Scheduling
• Primary advantage of Clock-driven approach is its
simplicity.
• Factors involving complex dependencies, communication
delays, resource dependencies can be taken into account
while incorporating the same in a real time situation.
• Feasibility can be guaranteed only if there are no deadlocks
and unpredictable delays.
• Static schedule can be indicated by a table of start and
completion times.
• Tasks can be scheduled statically in different operation
modes.
• No concurrency control is required.
62
Pros and Cons of Clock-Driven Scheduling
(Contd.,)
• Precedence constraints and dependency issues are taken
care by the choice of the schedule.
• Context switching and communication overhead can be
kept low by choosing a large frame size.
• Releases of sporadic and aperiodic tasks are said to be
event-triggered.
• Clock driven approaches are time-triggered.
• In time-triggered systems, external events are queued and
polled periodically.
• Periods are integer multiples of the frame size.
• Design choice simplifies construction of static schedules
and eliminates waste in slack time. 63
Disadvantages of Clock-Driven
Approach
• System is rigid and brittle and incorporating flexibility is
cumbersome.
• Release times of all tasks are fixed as compared to priority
driven systems which have arbitrary release times.
• All combinations of periodic tasks must execute at the same
time and a priori knowledge of task parameters is
mandatory.
– Not suitable for applications that must be reconfigured on-line
and have a mix of periodic tasks and cannot be predicted prior
to beginning execution.
• Pure clock driven approach is not suitable for systems
containing both hard and soft real time applications.
64
5.10 Summary

• Clock-driven approach requires a priori knowledge of


task parameters to develop a cyclic schedule.
• Cyclic schedules are computed off-line and is stored as a
table for the scheduler at run time.
• Frame – size constraints need to be satisfied to obtain the
Cyclic schedules.
• Every task begins in a frame.
– Deadline constraints are verified by the frame size criteria.
• Recovery action is taken by the scheduler in a timely
manner for invalid schedules.
• Aperiodic tasks are scheduled in the background after
periodic tasks. 65
Summary (Contd.,)
• Response time can be improved by scheduling these tasks
in the slack time available in each frame.
– Average response time is also improved.
• Sporadic tasks can also be scheduled similar to aperiodic
tasks using the slack time.
• Sporadic tasks are accepted if and only if
– Total slack time of periodic times and existing sporadic tasks in
frames before their deadlines is greater than or equal to execution
time of Sporadic task S.
– Slack of every existing sporadic task has a later deadline of S and is
not less than the execution time of S.
• Sporadic tasks accepted are scheduled in EDF order during time
interval not used by periodic time slices. 66

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy