You are on page 1of 5

Periodic Task Model

A set of jobs that are executed repeatedly at regular time intervals


can be modeled as a periodic task.
The periodic task model is a well known deterministic workload model.
It characterizes many traditional hard real time applications as digital control
,real time monitoring, constant bit rate voice/video transmission.
Each computation or data transmission that is executed repeatedly at regular
or semi regular intervals in order to provide a function of the system on a
continuing basis is modeled as a periodic task.

Definitions:
1. Each periodic task Ti is a sequence of jobs Ji,1, Ji,2, …, Ji,n.
1. The period pi of a task Ti is the minimum length of all time intervals
between release times of consecutive jobs in Ti.
3. The phase of a task Ti is the release time ri,1 of the first job Ji,1 in the task.
It is denoted by ϕi (“phi”).
4. The execution time ei of a task Ti is the maximum execution time of all
jobs in the periodic task.

Note:
At all times the period and execution time of every periodic task in the
system are known with reasonable accuracy .
In many published works the term periodic task refers to a task that is truly
periodic ,that is , inter release times of all jobs in a periodic task are equal to
its period.
This definition has led to the common misconception that scheduling and
validation algorithms based on the periodic task model are applicable only
when periodic task is truly periodic.
The accuracy of the periodic task model decreases with increasing jitter in
release times and variations in execution times.
So, a periodic task is an inaccurate model of the transmission of a variable
bit rate video, because of the large variation in execution times of jobs(i.e.
transmission times of individual frames.)
A periodic task is also an inaccurate model of the transmission of cells on
real time connection through a switched network that does not do traffic
shaping at every switch, because large release time jitters are possible.

Modeling Periodic Tasks

• The hyper-period of a set of periodic tasks is the least common


multiple of their periods: H = lcm(pi) for i = 1, 2, …, n
– Time after which the pattern of job release/execution times starts to repeat,
limiting analysis needed.

Periodic Tasks: Example

Max number of N jobs in each hyper period is equal to∑i=1 nH/pi.

Ex:
The length of a hyper period of three periodic tasks with periods 3,4 and 10 is 60.
The total number of jobs in the hyper period is 41.

The ratio ui = ei/pi is the utilization of task Ti


– The fraction of time a periodic task with period pi and execution time ei
keeps a processor busy.

• The total utilization of a system is the sum of the utilizations of


all tasks in a system: U = Σ ui.
Ex:-
1. If execution time of 3 periodic tasks are 1,1,and 3 and their periods are 3,4,
and 10 then their utilizations are 0.33,0.25,0.3.
1. The total utilization of these tasks is 0.88;these tasks can keep a processor
busy at most 88 percent of the time.

• We will usually assume the relative deadline for the jobs in a task.
is equal to the period of the task
– It can sometimes be shorter than the period, to allow slack time

A job in Ti that is released at t must complete Di units of time after t; Di is


the( relative ) deadline of the task Ti .
Aperiodic and Sporadic Tasks
• Many real-time systems are required to respond to unpredictable events.

• These are modeled as aperiodic or sporadic jobs.


– A sporadic job has a hard deadlines
– An aperiodic job has either a soft deadline or no deadline

• An aperiodic job has no deadline; a sporadic job has a deadline once


released.

• It is often possible to characterise the inter-arrival times for such jobs


according to some probability distribution.

• The presence of aperiodic and sporadic jobsgreatly complicates reasoning


about a system.

• Sporadic tasks make the design of a hard real-time system impossible,


unless some bounds can be placed on their inter-arrival times and relative
deadlines

Modeling Sporadic and Aperiodic Tasks

• A set of jobs that execute at irregular time intervals comprise a sporadic or


aperiodic task.
– Each sporadic/aperiodic task is a stream of sporadic/aperiodic jobs.

• The inter-arrival times between consecutive jobs in such a task may vary widely
according to probability distribution A(x) and
can be arbitrarily small.

• Similarly, the execution times of jobs are identically distributed random


variables with some probability distribution B(x). Sporadic and aperiodic tasks
occur in some real-time systems, and greatly complicate modeling and reasoning

Precedence Constraints and Dependencies

• The jobs in a task, whether periodic, aperiodic or sporadic, may be constrained


to execute in a particular order.
– This is known as a precedence constraint.
– A job Ji is a predecessor of another job Jk (and Jk a successor of Ji) if Jk
cannot begin execution until the execution of Ji completes.
• Denote this by saying Ji < Jk
– Ji is an immediate predecessor of Jk if Ji < Jk and there is no other job Jj
such that Ji < Jj < Jk.
– Ji and Jk are independent when neither Ji < Jk nor Jk < Ji.
• A job with a precedence constraint becomes ready for execution once when its
release time has passed and when all predecessors have completed.

Task Graphs

• Can represent the precedence constraints among jobs in a set J using a


directed graph G = (J, <); each node represents a job represented; a directed
edge goes from Ji to Jk if Ji is an immediate predecessor of Jk.

→(0,7] (2,9] (4,11] (6,13] (8,15] Independent


Feasible intervals periodic
Ο Ο Ο Ο Ο jobs P=2 D=7→
-------------------------------------------------------------------------------------------------------------------------

(2,5] (5,8] (8,11] (11,14] (14,17] Periodic jobs,


dependent
on immediate
predecessor
Ο ----------------------------->Ο ---------------------->Ο ---------------->Ο -------------->Ο
ϕ=2, p=3, D=3
-------------------------------------------------------------------------------------------------

Task Graphs: Dependencies & Constraints

• Normally a job must wait for the completion of all immediate


predecessors; an AND constraint.
– Unfilled circle in the task graph.

• An OR constraint indicates that a job may begin after its release


time if only some of the immediate predecessors have completed.
– Unfilled squares in the task graph.

• Represent conditional branches and joins by filled in circles.

• Represent a pair of producer/consumer jobs with a dotted edge.

• Use to visualize structure of real time systems.

Data Dependency

In a task graph data dependencies among jobs are represented explicitly by data
dependency edges among jobs .There is a data dependency edge from a vertex
Ji to vertex Jk in the task graph if the job Jk consumes data generated by Ji
or the job Ji sends messages to Jk. A parameter of an edge from Ji to Jk is the
volume of data from Ji to Jk .

You might also like