CE6

JOURNAL OF INFORMATION, KNOWLEDGE AND RESEARCH IN
COMPUTER ENGINEERING
SCHEDULING OF SPORADIC TASK SYSTEM USING
EARLIEST DEADLINE FIRST ALGORITHM
1
GIRISH S THAKARE,
2
DR. P R. DESHMUKH
1, 2
Department Of Computer Science & Engineering And IT,
Sipna’s College Of Engineering & Technology , SGB Amravati University,
Amravati, Maharashtra, India.
[email protected] ,[email protected]
ABSTRACT : Every real-time system consists of some way of executing the individuals’ task because task
scheduling is an important job in the design of the system. A common characteristic of many real-time systems
is that their requirements specification which includes timing information in the form of deadlines and the task
execution must complete before the deadline. Arrival patterns determine whether tasks will be treated as
periodic, sporadic, or aperiodic. Since now, we are considering scheduling of sporadic task with hard deadline
in the midst of periodic task. Earliest deadline first scheduling algorithm proves necessary and sufficient
conditions for the scheduling a sporadic task. This paper also demonstrate that these conditions are necessary
for the proper execution of any non-preemptive algorithm which removes unnecessary idle time of the
processor and therefore establish the optimality of the non-preemptive EDF algorithm.
KEYWORDS: Deadline Mechanism, Non-Preemptive, Sporadic Task Real-Time System.
1. INTRODUCTION
A real-time system is often modeled as a finite
collection of independent recurrent tasks, each of
which generates a infinite sequence of jobs. Every job
is characterized by some parameter as arrival time,
an execution requirement, and a deadline, and it is
required that a job completes execution between its
arrival time and its deadline. Different formal models
for recurring tasks place different restrictions on the
values of the parameters of jobs generated by each
task. One of the more commonly used formal models
is the sporadic task model [1, 8]. Each recurrent task
in this model is
characterized by three parameters: == (ei, di, pi)
with the interpretation that may generate an infinite
sequence of jobs with successive jobs arriving at least
ti
time units apart, each with an execution
requirement at most ci and a deadline di time-units
after its arrival time. A sporadic task system T is
comprised of a finite collection of such sporadic
tasks. Sporadic task systems in which each task is
required to have its relative deadline and period
parameters the same (di = ti for all i) are called
implicit-deadline task systems.
Fig.1 Priority Queue for Periodic, Sporadic and
Aperiodic task.
In the development of application programs it is usual
to map system timing requirements onto process
deadlines [2]. The issue of meeting deadlines
therefore becomes one of process scheduling, with
two distinct forms of process structure being
immediately isolated [3]:
A. Periodic Processes
B . Aperiodic Processes
In general aperiodic processes are viewed as being
activated randomly As aperiodic processes cannot
have hard deadlines. To allow worst case calculations
to be made there is often defined a minimum period
between any two aperiodic events. If this is the case
the process involved is said to be sporadic. Sporadic
tasks can arrive at the system at arbitrary points in
ISSN: 0975 – 6760| NOV 10 TO OCT 11 | VOLUME – 01, ISSUE - 02
Page 25
JOURNAL OF INFORMATION, KNOWLEDGE AND RESEARCH IN
COMPUTER ENGINEERING
time, but with defined minimum inter-arrival times
between two consecutive invocations. A sporadic task
T is characterized by its relative deadline, minimum
inter-arrival time and worst case execution time.
2 SPORADIC TASK SYSTEMS
In the sporadic task model [4] a task
= (ei, di,
pi) is characterized by a worst-case execution
requirement ei, a (relative) deadline di, and a
minimum inter-arrival separation pi (which is also
sometimes referred to as the period of the task). Such
a sporadic task generates a potentially infinite
sequence of jobs, with successive job-arrivals
separated by at least pi time units. Each job has a
worst-case execution requirement equal to ei and a
deadline that occurs di time units after its arrival time.
A sporadic task system is comprised of several such
sporadic tasks. In previous work both non-preemptive
and preemptive scheduling of such sporadic task
systems was considered. In preemptive scheduling, it
is assumed that an executing job may be preempted
— have its execution interrupted — at an arbitrary
instant to be resumed at a later point in time at no
additional cost or penalty; in non-preemptive
scheduling, by contrast, it is mandated that a job,
once it begins execution, is guaranteed exclusive
access to the processor until it has completed
execution. A sporadic task system is said to be
feasible if and only if it is possible to always schedule
all jobs that may be generated by this task system in
such a manner that all deadlines are met [4].
3. IMPLEMENTION
The scheduler perform an acceptance test on each
sporadic task upon its arrival. We assume that
acceptance tests are performed on sporadic task in the
EDF order. Once accepted , sporadic task are ordered
among themselves in the EDF order. In deadlinedriven system , they are scheduled with the periodic
tasks on the EDF basis. The slack stealer executes
before the sporadic task schedule to execute. The job
of the slack stealer is to postpone execution of
periodic tasks only when it is safe to do so. We now
present a method for static computation of slack in
EDF systems. Consider the three periodic tasks
T1(1,4), T2(2,6), T3(3,8) schedule by EDF , the
utilization U is calculated as follows,
U=0.95
and hence U≤ 1 i.e. 0.95≤ 1 Thus, {T1, T2, T3} is
schedulable under EDF.
Fig.2 Scheduling of Periodic task.
Slack Computation
Slack is computed at time 0 as follows
σ 1,1(0)=d1-e1
=4-1=3
σ 2,1(0)=d2-e2-r1
=6-2-1=3
σ 3,1(0)=d3-e3-e2-e2
=8-3-2-1=2
Hence we conclude that slack of the system at time 0
is ,
σ(0)=min{ σi(0)}
i.e. σ(0)=2. Considering system slack 2 units at time 0
periodic task missed its deadline.
Fig.3 Scheduling of Periodic task after slack stealer
execution at time 0.
Now consider slack computation at time tc is given
as
follows,
The slack of Si at time tc may be computed as:
σi (tc) = σi (0) - I(tc) - ST(tc) - Σdk > di ξk(tc),
where:
- I(tc) is the processor idle time since t = 0 (beginning
of the hyperperiod),
- ST(tc)is the time the slack stealer has been
executing since t = 0,
- ξk(tc)is the time the lower priority job Jk has been
executing since t = 0.
Consider again the same periodic task T1(1,4),
T2(1,2,6), T3(3,3,8) + two sporadic task S1(7.15.2)
and S2(2,20,1) . In the first hyperperiod H=8 task are
release 2 of T1 , 1 of T2 and 1 of T3 and their
deadline are
d11=4, d1,2=8
d21=7
d31=11
then,
d1=4,d2=7,d3=8,d4=11
the initial slack of 4 task as follows,
σ 1(0)=d1-e1=4-1=3
σ 2(0)=d2-e1-e2=7-1-2=4
σ 3(0)=d3-e1-e2-e3=8-1-2-2=4
σ 4(0)=d4-e1-e2-e3-e4=11-1-2-1-3=4
ISSN: 0975 – 6760| NOV 10 TO OCT 11 | VOLUME – 01, ISSUE - 02
Page 26
JOURNAL OF INFORMATION, KNOWLEDGE AND RESEARCH IN
COMPUTER ENGINEERING
the initial slack of the system is:
σ(0)=min{ σi(0)}=3
σ (7) = σ (0) - I(7) - ST(7) - Σdk > di ξk(7)
= 3-0-0-0=3
σ (7)=3
since σ (7)>0 , the slack stealer is schedule to execute
sporadic task S.
Acceptance test procedure
The acceptance test on the sporadic S(t,d,e) is simple
where t is the release time , d is deadline and e is
maximum execution time. The scheduler accept S if
its density e/(d-t) is no greater than 1-Δ, where Δ is
the density of all periodic tasks. Hence density of two
sporadic task S1(7.15.2) and S2(2,20,1) as follows,
Δ=0.95
Δ=0.05 density of S1=0.25 and S2=0.05
Hence the density of S1 is greater then 1-Δ and the
density of S2 is equal to 1-Δ and hence S2 is
schedulable.
[2] Peter Dibble “Sporadic Scheduling” 9 July 2005
[3] N. Ardsley A. Burns on REAL-TIME SYSTEM
SCHEDULING , Department of Computer Science,
University of York, UK.
[4]
Marko Bertogna and Sanjoy Baruah
“Uniprocessor Scheduling of Sporadic Task Systems
under Preemption Constraints”
[5] Damir Isovi´c and Gerhard Fohler, “Efficient
Scheduling of Sporadic, Aperiodic, and Periodic
Tasks with Complex Constraints” Department of
Computer Engineering
M¨alardalen University,
Sweden dic,[email protected]
[6] Mani Srivastava , RTOS Scheduling – II ,UCLA
- EE Department Room: 6731-H Boelter Hall Email:
[email protected] Tel: 310-267-2098 WWW:
http://www.ee.ucla.edu/~mbs
[7] Kevin Jeffay Donald F. Stanat , Charles U.
Martel On Non-Preemptive
Scheduling of
Periodic and Sporadic Tasks University of North
Carolina at Chapel Hill Department of Computer
Science ,University of California at Davis Computer
Science Division.
[8] MOK, A. K. Fundamental Design Problems of
Distributed Systems for The Hard-Real-Time
Environment. PhD thesis, Laboratory for Computer
Science, Massachusetts Institute of Technology,
1983. Available
as Technical Report No. MIT/LCS/TR-297.
Fig.4 Scheduling of Periodic and sporadic task at
time tc.
4. CONCLUSION
The sporadic task scheduling problem is critical in
real-time system. Based on the execution time and
deadline of each newly arrived sporadic job, decide
whether to accept or reject the job. Accepting the job
implies that the job will complete within
its
deadline, without causing any periodic task or
previously accepted sporadic job to miss its deadline.
This paper focus on the acceptance test of the
sporadic task as well as the slack computation based
on the density Δ of periodic task. if the condition
e/(d-t) ≤1- Δ task is accepted otherwise do not accept
a sporadic job if it is not possible to guarantee that it
will meet its deadline. Also σ (tc)>0 , the slack stealer
is schedule to execute sporadic task S.
5. REFERENCES
[1] BARUAH, S., MOK, A., AND ROSIER, L.
Preemptively scheduling hard-real-time sporadic
tasks on one processor. In Proceedings of the 11th
Real-Time Systems Symposium (Orlando, Florida,
1990), IEEE Computer Society Press, pp. 182–190.
ISSN: 0975 – 6760| NOV 10 TO OCT 11 | VOLUME – 01, ISSUE - 02
Page 27