You are on page 1of 6

Homework 3

CAP536 – Real Time Software and Systems

DOA:21March 2011 DOS: 29th March 2011 Test: 31st March 2011

Part-A

QES2: With the help of example compare static and dynamic systems.

ANS: There are two types of systems: static and dynamic.


In a static system, the outputs depend only on the present values of the
inputs, whereas in a dynamic system the outputs depend on the present
and past values of the inputs [Botta, Bahill, and Bahill, 2006]. In
computer design, these two basic types of systems are called
combinational and sequential. Combinational systems do not require
memory devices; hence they are called memory less. Sequential
systems require memory to capture the state behavior. In combinatorial
systems, the output depends only on the present inputs, whereas in
sequential systems the output depends on the sequence of previous
inputs. In mechanical engineering, these two types of systems are called
static and dynamic. Static systems are described with algebraic
equations and the outputs depend only on the present values of the
inputs, whereas dynamic systems are described with differential or
difference equations and the system behavior depends on the history of
the inputs. This paper only considers dynamic systems.

A dynamic system is a system that is constantly changing, like the


human body system. A static system is a system in where there is no
change, like the solar system.
Dynamic systems tend to become static or attain a state of equilibrium.
e.g.
if a car is assumed to be a dynamic system, then it requires fuel to
continue moving forward or else it would come to a stop and become
static.

QES2: Write down various factors which are used to measure the
optimality and non-optimality of EDF and LST Algorithms

ANS: EDF optimality


The original proof provided by Dertouzos [Der74] shows that EDF is
optimal
in the sense of feasibility. This means that if there exists a feasible
schedule
for a task set J, then EDF is able to find it. The proof can easily be
extended
to show that EDF also minimizes the maximum lateness. This is more
general
because an algorithm that minimizes the maximum lateness is also
optimal in
the sense of feasibility. The contrary is not true.
Using the same approach proposed by Dertouzos, let a be the schedule
produced
by a generic algorithm A and let GEDF be the schedule obtained by the
EDF
algorithm. Since preemption is allowed, each task can be executed in
disjointed
time intervals. Without loss of generality, the schedule a can be divided
into
time slices of one unit of time each. To simplify the formulation of the
proof,
let us define the following abbreviations:
G{t) identifies the task executing in the slice [t,t -{- \)}
E{i) identifies the ready task that, at time t, has the earliest deadline.
tE{t) is the time (> t) at which the next slice of task E{t) begins its
execution in the current schedule.
If cr / (JEDF^ then in a there exists a time t such that a{t) 7^ E{t). As
illustrated in Figure 3.4, the basic idea used in the proof is that
interchanging
the position of a{t) and E{t) cannot increase the maximum lateness. If
the
^ [a,b) denotes an interval of values x such that a < x < b
QES3: Write down various problems in predicting timing behaviours of a job.

ANS: The Big five factors are openness, conscientiousness, extraversion,


agreeableness, and neuroticism (OCEAN, or CANOE if rearranged). The
neuroticism factor is sometimes referred to as "emotional stability". Some
disagreement remains about how to interpret the openness factor, which is
sometimes called "intellect". Each factor consists of a cluster of more specific
traits that correlate together. For example, extraversion includes such related
qualities as gregariousness, assertiveness, excitement seeking, warmth,
activity and positive emotions.

The Big Five factors and their constituent traits can be summarized as:
Openness – (inventive/curious vs. consistent/cautious). Appreciation for art,
emotion, adventure, unusual ideas, curiosity, and variety of experience.

Conscientiousness – (efficient/organized vs. easy-going/careless). A tendency


to show self-discipline, act dutifully, and aim for achievement; planned rather
than spontaneous behaviour.

Extraversion – (outgoing/energetic vs. solitary/reserved). Energy, positive


emotions, surgency, and the tendency to seek stimulation in the company of
others.

Agreeableness – (friendly/compassionate vs. cold/unkind). A tendency to be


compassionate and cooperative rather than suspicious and antagonistic
towards others.

Neuroticism – (sensitive/nervous vs. secure/confident). A tendency to


experience unpleasant emotions easily, such as anger, anxiety, depression,
or vulnerability.

Part-B

1. Is EDF really a dynamic priority scheduling algorithm? Explain with the help of
example.

ANS: EDF is a classic dynamic embedded realtime

multi-task scheduling algorithm. In an

embedded soft real-time system, the deadline

missing ratio is an important metric to evaluate

system performance. When an embedded soft realtime

system is overloaded, EDF algorithm is not

effective. Considering the unsteadiness and

unpredictability of a practical task running

environment due to the unsteadiness of network

communication and the time estimation deviation, it


is necessary to introduce Fuzzy concept and theory

to the scheduling field of embedded soft real-time

application systems. In fuzzy scheduling model, all

task‘s criticality and deadline distance are described

with Fuzzy set. In our scheduling algorithm, a task’s

scheduling priority is gotten by looking up the

inference rule table with its Fuzzy deadline distance

and Fuzzy criticality patterns. By comparing to

traditional EDF algorithm to FUZZY EDF

Algorithm FUZZY EDF Algorithm will have the less

miss dead line ratio.

EDF algorithm is a dynamic algorithm that does


not require processes to be periodic. Whenever process
needs the CPU time, it announces its presence and its
dead line. If a soft real-time system is overloaded, the
distribution of miss deadline ratio is not rectangular in
the EDF scheduling system. The usually scene is some
tasks have many miss deadlines and some tasks have
not any miss deadlines. Thus, many tasks may have
noticeable degradation in quality of service when the
real-time system is overloaded. So we should have a
mechanism to distribute the miss deadlines uniformly
among all tasks.

Fig1: Output Of TRADITIONAL EDF Algorithm


Considering the unsteadiness and unpredictability
characteristics of the practical tasks’ running
environment, it is necessary to employ the fuzzy control
theory to dynamically adjust the priority of each task. In
the Fig1 the miss dead line ratio of the task is 66.6%
under overload conditions.
2. Prove that major cycle of a set of tasks ST={T1, T2, T3, .......Tn} is LCM{P1,
P2, P3, ......Pn } even when the tasks have arbitrary phasing.

ANS:
Consider the following set of periodic real-time tasks to be scheduled by a cyclic scheduler: T 1 =
(e1=1, p1=4), T2 = (e2=2, p2=5), T3 = (e3=5, p3=20). Determine a suitable frame size for the task set.
Solution:
Using the first constraint, we have F ≥ 5.
Using the second constraint, we have the major cycle M = LCM(4, 5, 20)
= 20. So, the permissible values of F are 5, 10 and 20.
Checking for a frame size that satisfies the third constraint, we can find
that no value of F is suitable. To overcome this problem, we need to split
the task that is making the task-set not

schedulable. It is easy to observe that the task T3 has the largest


execution time, and consequently due to constraint 1, makes the
feasible frame sizes quite large.
We try splitting T3 into two or three tasks. After splitting T3 into three
tasks, we have:
T3.1 = (20, 1, 20), T3.2 = (20, 2, 20), T3.3 = (20, 2, 20).
The possible values of F now are 2 and 4. We can check that now after
splitting the tasks, F=2 and F=4 become feasible frame sizes.
It is very difficult to come up with a clear set of guidelines to identify the
exact task that is to be split, and the parts into which it needs to be split.
Therefore, this needs to be done by trial and error. Further, as the
number of tasks to be scheduled increases, this method of trial and error
becomes impractical since each task needs to be checked separately.
However, when the task set consists of only a few tasks we can easily
apply this technique to find a feasible frame size for a set of tasks
otherwise not schedulable by a cyclic scheduler.

You might also like