by, - mälardalen university web viewthe system. s 1 describes the case when we have maximum ......

75
A STOCHASTIC ANALYSIS FRAMEWORK FOR REAL-TIME SYSTEMS UNDER PREEMPTIVE PRIORITY-DRIVEN SCHEDULING By, Muhammad Azhar [email protected] A thesis submitted in partial fulfillment of the requirements for the degree of M.Sc. in Intelligent Embedded Systems Malardalen University Sweden 2011 1

Upload: dangmien

Post on 06-Mar-2018

218 views

Category:

Documents


4 download

TRANSCRIPT

A STOCHASTIC ANALYSIS FRAMEWORK FOR REAL-TIME SYSTEMS UNDER PREEMPTIVE PRIORITY-DRIVEN

SCHEDULING

By,Muhammad Azhar

[email protected]

A thesis submitted in partial fulfillment of the requirements for the degree of

M.Sc. in Intelligent Embedded SystemsMalardalen University Sweden

2011

Supervised By,

Yue Lu, PhD Student

Research Group: Complex Real-Time Embedded SystemsEmail: [email protected]

Approved By,

Thomas Nolte, Postdoctoral Research Fellow

Research Group: Complex Real-Time Embedded Systems Email: [email protected]

1

Date _________________________________________________________

MALARDALEN UNIVERSITY SWEDEN

ABSTRACT

A Stochastic Simulation Framework for Real-Time Systems under Preemptive Priority-Driven Scheduling

By, Muhammad Azhar

Chairperson of the Supervisory Committee: Postdoctoral Fellow, Thomas

NolteSchool of IDT-

MRTC

This thesis work describes how to apply the stochastic analysis framework, presented in [1] for general priority-driven periodic real-time systems. The proposed framework is applicable to compute the response time distribution, the worst-case response time, and the deadline miss probability of the task under analysis in the fixed-priority driven scheduling system. To be specific, we modeled the task execution time by using the beta distribution. Moreover, we have evaluated the existing stochastic framework on wide range of periodic systems with the help of defined evaluation parameters.

In addition we have refined the notations used in system model and also developed new mathematics in order to

2

facilitate the understanding with the concept. We also have introduced new concepts to obtain and validate the exact probabilistic task’s response time distribution.

Earlier system model only supports the deterministic release time of a system job which is incomplete way to model a stochastic release time present in real time systems. Therefore, another contribution of this thesis is that we have extended the existing system model in order to deal with stochastic release time of a system job. Moreover, a new algorithm is developed and validated our extended framework where there are stochastic dependencies exist due to stochastic release time patterns.

3

ylu01, 06/02/11,
From my understanding, you did some implementation of the existing analysis framework, as well as some extension of introducing probabilistic task release time to the convolution process. But this is not about introducing new concepts here, unless we introduced new way of valiation.Answer! ( Worst Case Response time for stochastic distribution is defined as an extra parameter to validate the framework, see page 8 ), if we replace “to obtain and validate ” with “validate” only than I think its ok.
ylu01, 06/02/11,
On the page 183 in the seminal journal paper, it was written that “so that random release jitter are allowed…” So I think in the following analysis, it has been considered. This release jitter actually results in variability of task’s release time. If my understanding was incorrect, you have to correct me.Answer!(Random Release time in the semi journal paper only deals with the release jitter on time axis and does not support to a probabilistic distribution function on these time values.In our case we not only modeled the release time as a probability distribution function but also introduced an algorithm to find stochastic dependencies exist due to that probability function, see example-5 for more details )

TABLE OF CONTENTS

Topic Page

List of figures........................................................................8vList of tables...........................................................................vNotations...............................................................................viAcknowledgment..................................................................xiiIntroduction.........................................................................xiiiChapter 1................................................................................1

The Existing System Model.................................................1Modeling System Parameters...........................................1

Chapter 2................................................................................3Stochastic Analysis Framework...........................................3

Stochastic Response Time Computation Method..............3Probability of Task Missing/Meeting its Deadline.............6Deadline Miss to Meet Ratio.............................................7Stochastic System WCRT..................................................8Stochastic System Utilization Factor................................8

Chapter 3..............................................................................10Evaluation of Stochastic Analysis Framework ..................10

Steady-state Backlog Computation Method....................10Example Periodic System Task Set for Evaluation.........11Steady-state Release Time Backlog Evaluation..............12Stochastic Response Time Evaluation using RM Scheduling......................................................................14Evaluation of the Set of Systems using RM Scheduling..19

Chapter 4..............................................................................22Enhanced Stochastic Analysis Framework........................22

Enhanced System Model................................................22Stochastic Release Time, Probabilistic Dependency Algorithm (SRTPDA).......................................................24

Chapter 5..............................................................................26Evaluation of the Enhanced Stochastic Analysis Framework...........................................................................................26

Example System with Stochastic Release Time..............26Analysis of the example system using Proposed Algorithm........................................................................................28

4

Conclusion............................................................................31Bibiliography........................................................................32

5

LIST OF FIGURES

Number PageFIGURE 1: EVALUATION OF THE STEADY-STATE BACKLOG FOR SYSTEM S1 PRESCRIBED IN TABLE-1...............13FIGURE 2: EVALUATION OF THE STEADY-STATE BACKLOG FOR SYSTEM S2, PRESCRIBED IN TABLE-2..............13FIGURE 3: EVALUATION OF THE STEADY-STATE BACKLOG FOR SYSTEM S3, PRESCRIBED IN TABLE-3..............14FIGURE 4: EXECUTION TIME BETA PROBABILITY DISTRIBUTION WITH ALPHA=2 AND BETA=5 SHAPE PARAMETERS.

....................................................................................................................................16FIGURE 5: STEADY- STATE STOCHASTIC WORKLOAD DISTRIBUTION LOW PRIORITY JOBS Г 1& Г 2 PRODUCED

BY HIGHER OR EQUAL PRIORITY SYSTEM JOBS Гki ..................................................................16FIGURE 6: STOCHASTIC DISTRIBUTION OF PARTIAL RESPONSE TIME OF TASKτ 2.......................................17FIGURE 7: STOCHASTIC DISTRIBUTION OF FINAL RESPONSE TIME OF TASKτ 2..........................................17FIGURE 8: GRAPH SHOWS THE PROBABILITY OF MEETING THE DEADLINE FOR LOWER PRIORITY TASK τ 2AS AN

OUTCOME OF STOCHASTIC ANALYSIS.....................................................................................18FIGURE 9 : TRANSFORMATION OF THE DETERMINISTIC TASK PARAMETERS AFTER INTRODUCING STOCHASTIC

RELEASE TIME SUPPORT TO THE TASK MODEL FOR EXAMPLE DESCRIBED IN TABLE-5.........................27FIGURE 10: GRAPH SHOWS THE STOCHASTIC RELEASE TIME DEPENDENCIES RELATION IN TERM OF PROBABILITY

VALUES TO ANALYZE THE EFFECT OF STOCHASTIC RELEASE PATTERNS FOR TASKτ 2..........................30

6

LIST OF TABLES

Number PageTABLE 1: SYSTEM DESCRIPTION....................................................................................................11TABLE 2: DEFINITION OF SYSTEM JOBS AT RELEAST TIME INSTANCES ALONG WITH THE SYSTEM HYPERPERIOD T.

THE JOBS ARE MARKED IN PATTERN OF SINGLE/DOUBLE INDEX....................................................15TABLE 3: SYSTEM ANALYSIS.........................................................................................................19TABLE 4: ENHANCED NOTATIONS AND THEIR MEANINGS.....................................................................23TABLE 5: A TASK SET WITH STOCHASTIC RELEASE TIME.......................................................................26TABLE 6: NAMING THE SUB-SYSTEMS FOR STOCHASTIC RELEASE PATTERNS.............................................28TABLE 7: STOCHASTIC ANALYSIS BY USING [1].................................................................................29

7

NOTATIONS

CF(R ,∆ ,C ) Convolve form operator. It functions on two parameters. It is basically a modified form of convolution that is specially designed to consider the stochastic interference from higher priority tasks.Ris the partial stochastic response time distribution, C is the stochastic execution time distribution of the higher priority task that can cause interference to partial response time, and delta ( ) is the deterministic amount of non-inferences part among the both. It simply returns the convoluted result of only to the interference part of R∧C and leaves the reaming ( ) part as it is.

CSiStochastic execution time distribution of a taskτ i with a total probability of 1.

C simin Minimum deterministic value of a

stochastic execution time distribution of a taskτ i that has total probability of 1

C siavg Average deterministic value of a

stochastic execution time distribution of a taskτ i that has total probability of 1

C simax Maximum deterministic value of a

stochastic execution time distribution of a taskτ i that has total

8

probability of 1

Di Deterministic relative deadline, for each of the instance j, of a taskτ i.

Dij Precisely referenced deterministic deadline of a task τ irelative to its jobГ j.

∆ DELTA. It defines the difference in between two deterministic release time values in a periodic systemS.

f (x ; α , β) Beta probability distribution; wherexis the index to distribution and α ,βare the shape parameters.

f c k( x ) It defines the stochastic execution

time distribution of the kth or next higher priority job.

f CF(R ,∆, C)(x) Defines the discrete function for convolve form stochastic operation.

f R j( x ) It represents the stochastic partial

response time distribution function of a periodic job j .

f FR j(x ) It represents the stochastic final

response time distribution function of a periodic job j .

f FRi( x ) It represents the stochastic final

response time distribution function of a periodic taskτ i .

f SHRINK (W , ∆)(x) Defines the shrieked backlog stochastic distribution discrete function for shrink operation.

f wh(x) Represents the backlog stochastic

distribution function at previous 9

release time instance, relative to current release time backlogf w j

( x).

f w j( x) Represents the backlog of release

time stochastic distribution function at current release time instance.

f wk(x) Represents the backlog stochastic

distribution function at next release time instance, relative to current release time backlogf w j

( x).

Гh GHE. Single indexed periodic previous referenced jobh that has higher or equal priority to current job j executing on the system. All jobs are observed at release time instances.

Г j Single indexed periodic current referenced job.

Г ij Double indexed period current referenced job. The index i , jrepresents the ith task and the current job belongs to that task, respectively.

Г k Single indexed period next referenced jobk that has higher priority than the current periodic job jexecuting in the system. All jobs are observed at release time instances.

Г ki All high priority jobs that will be released next and can cause interference relative to current jobГ j

.

h It is the index referred to the higher or equal priority jobs behind the

10

current job that are still active.

i It is the index usually referred to the periodic taskτ i but it is used some time for general description (seeГ ki).

j It is the index referred to the current jobsГ j.

k It is the index referred to all higher priority jobs Г kithat can cause interference to the current lower priority jobsГ j.

λk LAMBDA. Deterministic release time of the next high priority periodic jobГ k.

λSiLAMBDA. Stochastic release time for periodic system jobГ j.

LCM Least common multiple.

Miss2 MeetD i

ratio Deadline miss ratio to dead line meat ratio of a taskτ i.

N Represents the integer index of last job in the sequence with respect to the release time pattern over a hyperperiodT .

Φ i PHI. Deterministic offset value from start of the hyperperiod to a periodic a taskτ i.

PMEET ij {Rij ≤Dij } means that PMISSijrepresents

the deterministic missing value probability of a job Г jthat is aggregated after the deadline Dij index of the response time

11

stochastic distribution function Rij until its length.

PMISSij {Rij>Dij } means that PMEET ijrepresents

the one minus, the deterministic meeting value of the probability of a job Г jthat is aggregated from initial index of the response time stochastic distribution function Rij to until its deadline Dij index.

RMEET ij

avg Average of the probability of meeting its deadline of all the jobsГ j belongs to a task τ j

RMISSij

avg Average of the probability of missing its deadline of all the jobs Г jbelongs to a task τ j

RS jStochastic response time of a job Г j .

RSijStochastic response time distribution of a job Г j belongs to taskτ j.

S Defines a system with periodic task set.

SHRINK (W ,∆) Shrink operator. It functions on two parameters. First one is stochastic parameterW and second is deterministic value∆. It performs two operations onW . Firstly it left shifts the Wby ∆amount and then it add the probability values with all negative indices at 0 index.

τ i TAU. Refer to an independent period task i in the periodic task systemS.

12

T Hyperperiod; it basically represents the least common multiple of the periodsT iof all periodic taskτ iin a periodic systemS .

T i Deterministic period value of a taskτ i

U smin Deterministic value of the minimum

utilization factor of a system with stochastic execution time distribution.

U savg Deterministic value of the average

utilization factor of a system with stochastic execution time distribution.

U smax Deterministic value of the maximum

utilization factor of a system with stochastic execution time distribution.

W General representation of a backlog.

W ( λ j) Stochastic backlog distribution at release timeλ j. It represents the workload in term of time instances of all previous high or equal priority jobs that are active.

W (λ jk ) Stochastic backlog distribution backlog at release time. Here sub indices; j∧k defines the job number at corresponding hyperperiod number respectively.

xn Refers to the last index of a stochastic distribution function.

ζ S jZETA. It is a phenomenon of stochastic interference faced by a

13

job Г jwith a partial stochastic response time RS j

by the higher priority job’s stochastic execution time CS j

up to the amount of deterministic interference delta among them.

14

ACKNOWLEDGMENT

I wish to take this opportunity to express my gratitude to my thesis supervisor which elected & motivated me towards the area of advance research at the institute. Thank you Yue Lu; for choosing such a beneficial opportunity of my interest that could have unknown without you, for your support in term of research articles you fed me, your valuable time for discussion, and your kind patience to bear me while discussions on the topic.

15

INTRODUCTION

Classical approach for response time analysis use pessimistic assumptions for the real-time task parameters in order to make the computation cost affordable. One of the assumptions is to model the execution time of real-time task as a worst-case value which always to be of greater value than what actually required. This assumption getting worst if it is used for several task instances and may lead to oversized real-time system.

Recently, researchers in the field have suggested modeling the execution time of a task as a discrete random variable instead of a single value as oppositely used in classical method [1]. This discrete stochastic execution time represents the collection of possible values, each one associated with a probability. The distribution of this discrete random variable can be obtained by analyzing real-time task behavior. This stochastic approach is proposed for periodic and independent task set in order to compensate the computation cost.

Our participation to the existing framework is in term of refined notations, and introduced new mathematics both for existing and our proposed algorithm. More precisely in mathematics; the probability miss/meet the deadline of a system task, and deterministic worst-case value for stochastic random response time is formally defined.

Furthermore, the existing system model only supported the deterministic release time which is now upgraded to stochastic release time. We have introduced an algorithm based on existing stochastic framework under fixed priority driven scheduling policy to find stochastic dependencies, in term of probability values, exist due to stochastic release time patterns.

The existing system model is presented in chapter-1. The stochastic analysis framework with refined notations is described in chapter-2 with proper notations. Chapter-3 involves the description and evaluation of the backlog

16

process and the existing stochastic analysis framework. The chapter-4 presents the enhancement in the existing stochastic framework in term of stochastic release time and describes the associated support in term of our proposed algorithm. Finally, we will validate our algorithm in chapter-5.

17

C h a p t e r 1

THE EXISTING SYSTEM MODEL

The system consists of a single processor with set of independent periodic tasks and a preemptive-priority driven scheduler. The task set is enumerated with respect to the release time of task instances/jobs over a hyper-period [7]. The release time of jobs considered as deterministic or we can say it is previously known to the system. Each job is assigned a priority P j which can be static or dynamic depending upon the scheduling policy used by the scheduler. The execution time of a task is modeled as a discrete random variable [1]. The jobs belongs to same task are considered to have a same discrete random execution time of their parent task. The jobs are assumed to be non-blocking hence they do not access the shared resources or critical section of the task.

Modeling System ParametersThe system is modeled as set of independent periodic task setS={τ i } with i=1,2,3 ,….N where N represents the number of the tasks in the system. Each task is

defined by four parameters; τ i={T i ,Φ i , Di ,C Si}, where T i represents the period

between two consecutive task instances, Φ i represents the offset of the first release

of the task instance relative to the systems hyper-period, Di defines the relative

deadline of the task which is same for all sibling task instances, andCSirepresents

the discrete random execution time of a system taskτ i.

Naturally, we are not allowed to definedCSito a specific probability distribution by

ourselves unless it represents the empirical behavior of execution time of all jobs Г i

belongs to system task τ i. This empirical behavior can be modeled as a probability

distribution function and is denoted by f C idefined in equation (1).

1

f C i ¿∆ P {CSi

=c } (1)

The above probability distribution function describes that any probability valueCSi

represents the probability magnitude c at ith index of the probability distribution,

wherei=1,2 , ,3∧soon. The probability distribution function f C i seems to be

unbounded by its index but it is possible to bound it by minimumC siminand maximum

C simaxexecution time probability values, as[Csi

min ,C simax]. Hence the probability function

f C i( .) can be completely described by a finite number of points.

Each system job is uniquely represented by a sub-index(i , j), where first sub index i tells us about the task number and the second sub-index j describes the job number belongs to taskτ i. The release time of system job Г ij is represented by Greek small letter lambda, with sub-index of task and job numbers respectively. The release time of λ ijis formally defined by equation (2); where j is an integer value and represents the job number.

λ ij=Φi+ j T i (2)

The jobs belongs to same task can have a different probability distribution function

hence overall response time RSi of a system task τ i represents the average

stochastic distribution of all jobs belongs toτ i. The difference of probability distributions exists among task instances is due to same or distinctive release time backlog distributions and/or amount of independent stochastic interference faced.

2

C h a p t e r 2

STOCHASTIC ANALYSIS FRAMEWORK

In this chapter we will discuss the existing stochastic analysis framework [1] by the help of system model presented in chapter-1. Furthermore we will also discuss the various measurement factors necessary to evaluate the final response time stochastic distribution of system task under analysis.

Stochastic Response Time Computation MethodThe stochastic framework initially discussed in [5] and improved in [2]. We will repeat here the basic algorithm with improved notations and introduced new mathematics in order to facilitate its understanding.

In order to simplify the notation for our computations, we will track each job independently by using single-index j instead of using double-index scheme as mentioned in previous chapter. We manage this sequence in ascending order with respect to release time of job traced along the system hyper-period. The hyper-period length is denoted byT which is the least common multiple of task periodsT i

belongs to systemSi. Formally the hyperperiod length is defined by (3).

T=LCM (T i) (3)

The stochastic response time of a job is the combination of three main factors; release time backlog, stochastic execution distribution, and the interference faced job from other high priority system jobs k that can preempt the current low priority job j. Mathematically we can model this phenomenon as presented in (4).

RS j=W (λ j)+CS j

+ζ S j(4)

3

Where RS j is the stochastic response time, W ( λ j)is the stochastic release time

steady-state backlog at deterministic release time instancesλ j,CS j is the stochastic

execution time distribution, and the ζ S j(zetaS j

) represents the phenomenon of

stochastic interference of jobГ j (will be discussed later in this chapter with the help of convolve form operator).

We can define the backlog W ( λ j) as a stochastic distribution function defined at

release time instancesλ jdue to all active (not finished yet) earlier jobs, indexed byk i, with equal or higher priority [6]. The response time is computed based on the system-level backlog at the beginning of each hyperperiod, i.e. the residual execution times of the jobs at those time moments the stochastic process of the system-level backlog is Markovian and its stationary solution can be computed [8]. In [5] Diaz initially introduced this method and considers the release time backlogs as a Markov-chain to produce system-level backlog at the end of each hyperperiod for the first high-priority job in the sequence. This is an iterative process, and for each next system-level backlog only needs to remember the solution of previous release time backlogs along the hyperperiod until we reach to a stationary system-level backlog. After we are reached with system-level steady-state backlog, all remaining release time backlogs assumed to be in steady-state as well. Our next task is to determine the release time backlog affecting each jobГ j in the system that is formally defined by (6).

First we need to define delta∆amount as a release time difference value of previous equal or higher priority jobs, used in next equation (6);

∆=(λk−λk−1), (5)

and,

4

W ( λk 0)=0

W ( λk 1)=SHRINK (W (λk−1)+Ck−1 , ∆) ,

with k i>k 0 ,∧Pk≥ P j

(6)

Here λk 0is the release time of the first job with priority greater than or equal to

the current jobP j and initially we have backlog distribution for first high-priority

jobW (λk 0 )equal to zero (6). This iterative solution starts with a zero backlog,

computes release time backlog for each high/equal priority job in the sequence released beforeГ j. Moreover, we noticed that each time it is required an addition

of two random variablesW ( λk−1)+C k−1 or in other words we can say it results in a convoluted distribution(random variable) sum as an outcome of two random variablesW ( λk−1)andC k−1. See back log analysis algorithm [4], simply shrink in [5], and convolve-shrink [6] operations with graphical interpretation to understand the concept in more appropriate way.

In general, the shrink function [1]SHRINK (W ,∆), defines by (7), takes two

parameters; the stochastic distribution of backlog f wh(x) as a random variable of the

previous higher/equal priority job Гh and a deterministic amount of the workload

defined by delta∆ produced to the current jobГ j. The SHRINK keyword represents that the function shrinks the spread of a random variable without affecting the total amount of probability values. As a result it produces stochastic backlog

distributionf w j( x )for the current jobГ j. This operation is performed by shifting f wh

( x )

left of∆amount and accumulates the all negative abscissas probability values at the 0th index. The graphical interpretation can be observed by an example given in [2], [4] and [5].

5

f SHRINK (W ,∆)(x)={ 0 if x<0

∑w=−∞

0

f w(x+∆) if x=0

f wh(x+∆) if x>0 },

(7)

Until this point, we have formally defined the partial response time stochastic

distribution function f R j( x )without considering the stochastic interferenceζ S j

caused

by upcoming higher-priority jobsГ ki. The final response time stochastic

distribution function [1][2] f FR j(x )is computed by (8).

RS j

[0 ,( λ j+1−λ j) ]=W ( λ j)+C S j

RS j

[0 ,( λk+1−λ j)]=CF (RS j

[0 ,(λ k−λ j)] ,(λk−λ j) ,CSk ) , for k> j

(8)

HereRS j

[0 ,( λk+1−λ j)] is the stochastic partial response time for the amount 0 to¿) before

the deadline of the current jobГ j has been reached, theCSkreferred to the execution time stochastic distribution function of next high priority job in the sequence, the λkis the next release time after λ j or we can sayλk=λ j+1, and

finally the index kdefines the index of upcoming high-priory job in the sequence.

(λk+1− λ j)≥D j (9)

The above equation defines the iterative limit which is until the deadline D jof the current job j .

The convolve form operation [1][2] is defined to deal with stochastic interferenceζ j caused by higher priority jobs in the system. It is formally defined by (10).

6

f CF(R ,∆ , C)(x)={ ¿ f R (x) if x≤∆

∑i=∆+1

f R j(i). f c k

( x−i ) if x>∆}’ (10)

The f CF(R ,∆ , C) step function takes three parameters; a random variableRwhich

defines the partial stochastic response time f R j( x )of jobГ j under consideration,

second random variable C that is the stochastic execution time f c k( x )of the next

interfering high priority jobГ k, and the amount of interference∆ which is the

difference of the release times of next high-priority job Г kand the job under

analysisГ j. The subscript CF is the abbreviation of Convolve-form and defines a modified form of convolution. Graphically, it convolves only the interfering part of

the bothf R j( x ) and f c k

( x ) and leaves the remaining part of f R j( x )unchanged.

The graphical interpretation of the mathematics defined above by (8) through (9) is presented in [4] with a suitable example, referred by split-convolve-merge procedure.

Probability of a Task Missing/Meeting its DeadlineThe probability of a job/task instance meeting the deadline of a system job is defined by accumulating the probability values at xkbefore the index k of the final

response time probability distribution functionf FR j(x ). The sub-indexkindexxk

represents the deadline Dijof the jobГ ij. From the example in [2] we got the idea and formally defined the probability value of meeting the deadline of a job, as given by (11):

PMEET ij{Rij≤ Dij }={ ¿1 if Dij≥ xn

∑x=Dij

f FRij(x ) if Dij< xn}, (11)

7

Here sub-index i corresponds to taskτ i and j represents the jobГ ij.The PMEET ijis the

deterministic value of a job’s probability of meeting its deadline Dij, Rijrepresents

the final stochastic response f FRij( x ) of a job Г ij, and xn referred to the final index of

f FRij( x ).

The probability of missing deadline of a system jobГ ij by using the axiom of total probability given in [10], which says that the total probability of an event is equals to 1. Formally we define the probability of job’s missing its deadline by (12):

PMISSij{Rij>Dij}=1−PMEET ij

{Rij≤ Dij }, (12)

The probability of meeting the deadline Di of a task τ iis computed by averaging [1]

the meeting deadline probability of all task instances belongs to task τ i in the system. It is formally defined by (13):

PMEET i{Rij ≤Di }=

1N ∑

j=1

N

PMEET ij{R ij≤D ij} ,

(13)

Here PMEET iis the deterministic value of the probability of meeting the deadline Di

of a taskτ i, andN is the total number of jobs belongs to taskτ i.

By using axiom from [10] of total probability, we can determine the probability of missing the task deadline, formally defined by (14):

PMISSi{Rij ≤Di }=1− 1

PMEET i{Rij≤ Di }

, (14)

Deadline Miss to Meet RatioIt is another way to analyze the stochastic response time of a task under consideration. It represents the ratio of the probability of missing to probability of meeting a task’s deadline. Mathematically this is presented by (15):

8

Miss2MeetD i

ratio=PMISSi

{Rij ≤Di }PMEET i

{Rij≤ Di },with j=1,2,3 ,…N

(15)

Here sub-index i corresponds to taskτ i, Miss2MeetD i

ratiodefines the deadline miss to

meet ratio, PMISSi{Rij ≤Di }andPMEET i

{Rij ≤Di }represents the probability of miss and meet

of a system taskτ i respectively.

Stochastic System WCRTThe worst case response time (WCRT) can be defined from final stochastic

response time f FRi( x )distribution, as formally defined by 16.

WCRT i={∑x=0

k ≤1

k=k+¿ f FRi(x ) , if 1∈ f FRi

( x ) ¿ length ( f FRi( x ) ) , else case}, (16)

Where k accumulates the probability values of final response time distribution f FRi( x )

started from initial index x =0 to until the value of the accumulated sum reaches to 1(k ≤1). The index valuex at probability value of k=1 is actually the WCRT of respective taskτ i because we are reached at the maximum probability of meeting the task’s deadline. On the other hand if we are unsuccessful to meet the deadline or unable to achieve the maximum value of cumulative probability of k=1 then the length of the final response time is the WCRT of the respective taskτ i .

Stochastic System Utilization FactorThe deterministic value of the stochastic distribution for system utilization factor represents the overall system utilization [7][6]; min, max, or average as a deterministic value, for a given task set with a stochastic execution timeCSrandom distribution function.

9

The minimum deterministic stochastic utilization factor [6] of the stochastic system is defined by considering the minimum possible execution time of a stochastic system with a task setτ i. It is formally defined by (17):

U smin=∑

i=1

N C simin

T i

,(17)

Here subscript s referrers to stochastic, min represent the minimum value, N is the

total number of tasks in the system, and C siminrepresent the minimum stochastic

execution distribution of the task τ iwith a time period ofT i.

The maximum deterministic stochastic utilization factor [6] of the stochastic system is defined by considering the maximum possible execution time of a stochastic system with a task setτ i. It is formally defined by (18):

U smax=∑

i=1

N C simax

T i

(18)

Here subscript s referrers to stochastic, the maxkeyword represent the maximum

value, N is the total number of tasks in the system, and C simaxrepresent the maximum

possible stochastic execution distribution of the task τ iwith a time period ofT i.

The average case deterministic stochastic utilization factor of the stochastic system is defined by considering the weighted average value of the execution time of a stochastic system with a task setτ i. It is formally defined by (19):

U savg=∑

i=1

N C siavg

T i

,(19)

10

Here subscript s referrers to stochastic, max represent the maximum value, N is the

total number of tasks in the system, and C siavgrepresent the average deterministic

value of stochastic distribution of the task τ iwith a time period ofT i.

11

C h a p t e r 3

EVALUATION OF EXISTING STOCHASTIC FRAMEWORK

In this chapter we discuss the backlog computation in term of system utilization and evaluate the stochastic analysis framework discussed in chapter 3 with the help of a simple example for fixed priority (RM) scheduling policy.

Steady-state Backlog Computation MethodThe backlog existent at the instance in which the job is released due to workload cause by previous jobs with greater or equal priority [6]. We want to compute the backlog W ( λ j) at release timeλ jas we have discussed in previous chapter. We want to make sure that the backlog at release time should be stable at system-level, so that it can be used further for stochastic response time computations.

Here we have stability issue with the backlog at release times and it precisely depends upon the system utilization factor. In simple words we can say that a stable/steady-state backlog represents the same stochastic distribution over and over along the hyperperiod for respective release time instances(λ j).

A real-time system can be classified into three distinctive classes based on average (19) and maximum (18) stochastic utilization factors [6]:

U smax≤1 ;the steady-state of the release time stochastic distribution will

exactly reach after the first hyperperiod.

U smax>1∧U s

avg<1 ; the convergence of release time backlog stochastic

distribution towards a steady-state is possible and it depends upon these

utilization factors. Generally we can say that as U savgapproaches to one the

system gets worst utilization factor values, and we are required more

12

iterations to reach the steady-state of system-level of release time

stochastic backlogW (λ j ).

U savg>1 ; the systems having their average stochastic utilization factor

greater than one. Actually in this case system tasks demands more resources than that of what really present in the hardware. Hence the

convergence of W (λ j )in this scenario is not possible. On the other hand; we

can iterate the computation process for release time system-level backlog W (λ j )up to some extent over the hyperperiodT . However, this unstable

behavior cannot be trusted for e stochastic response time computation for further stages.

Example Periodic System Task Set for EvaluationWe are basically inheriting the example described in [1] which used a random discrete probability distribution f (x; α , β) [9] as a stochastic execution time

distributionf c ij, where xis the index, and α∧β are the shape parameters of the

distribution. We usedf ( x ;2,5 ); α=2 and β=5 for our analysis.

The beta probability distribution is chosen here for our analysis is because it usually referred by the real-time community to model the task execution time for stochastic response time analysis.

Our system model is designed to cover all three categories mentioned in last section. The systemS1describes the case when we have maximum stochastic system

utilization factor isU smax≤1, system S2 represents the case when maximum system

utilization factor is greater than one but we have average system utilization less

than 1, and systemS3 is an unstable system and the backlog as we haveU savg>1. Each

of the categories consists of two tasks with separate execution time beta distributions. The beta distribution for the stochastic execution time parameterx

13

specifically represents the time interval here. Figure-1 depicts the beta distribution stochastic execution time. For more details see Table-1.

Table 1: System Description

Case Si

τ i CS

Φ i T i Di U smin U s

avg U smax

U smax≤1 S1

τ1 f (0 :19 ;2,5 ) 20 40 --0.0417

0.3026

0.9167

τ 2 f (0 :24 ;2,5 ) 50 60 90

U smax>1&

U savg≤1

S2

τ1 f (0 :19 ;2,5 ) 20 40 --0.0417

0.3410

1.083τ 2 f (0 :34 ;2,5 ) 50 60 90

U savg>1 S3

τ1 f (0 :79 ;2,5 ) 20 40 --0.0417

1.0392

3.5000

τ 2 f (0 :89 ;2,5 ) 50 60 90

Steady-state Release Time Backlog EvaluationIn this section we will evaluate our system model defined in last section and shown

the result of the release- time steady-tate backlogW (λ j ). The steady-state can be

identified, by evaluating the difference for the first high priority job W (λ j )in the

sequence at previous and current hyperperiod [2]. If the difference of release time

back log W (λ j ) at kand (k−1 )hyperperiod tends to zero than we are reached to a

steady-state. The figure-1,2,3 shows the results after evaluation of all the systemsSi.

14

We have identified that the systemS1 , & S2 are acceptable but S3 is not suitable candidate for computing the steady-state stochastic response time. The reason for S3 is that we cannot compute the steady-state system backlog for such systems having average system utilization factor of greater than 1.

In coming sections we will evaluate both systemsS1 , & S2 for stochastic response time computations for fixed priority driven task scheduling policy such as RM.

15

Figure 1: Evaluation of the steady-state backlog for system S1 prescribed in Table-1

The upper graph in the figure-1 describes the amount of difference of backlog

computations over system hyperperiodT

with respect to hyper period number k. The trend identifies that the steady-state

of the backlog distribution jobГ11 has

been reached at k=2nd hyperperiod, because we found the backlog difference of value 0 sudden after the 2nd iteration which shows the stability of the system with maximum system utilization less than 1.

The below part of the figure-1 defines the trend of cumulative distribution function

f W 1over time. The graph describes the

relation of steady-state and probability

distribution values of f W 1.The trend shows

that it reaches the steady-state at discrete time value of 2 where a total probability value of 1 is achieved.

16

Figure 2: Evaluation of the steady-state backlog for system S2, prescribed in Table-2.

The upper graph in the figure-2 describes the amount of difference of backlog computations

over system hyperperiodT with respect to

hyper period number k. The trend identifies that the steady-state of the backlog

distribution jobГ11 has been reached at

k=150th hyperperiod, because we found the backlog difference exact 0 value, sudden after the 150th iteration which shows the stability of the system with average system utilization less than 1.

The below part of the figure-1 defines the

trend of cumulative distribution functionf W 1

over time. The graph describes the relation of steady-state probability distribution values of

f W 1over discrete time interval. The trend shows

that it reaches the steady-state at discrete time value of 757 where a total probability value of 1 is achieved.

17

Figure 3: Evaluation of the steady-state backlog for system S3, prescribed in Table-3.

The upper graph in the figure-3 describes the amount of difference of backlog

computations over system hyperperiodT

with respect to hyper period number k. The trend identifies that the steady-state of the

backlog distribution jobГ11 is limitless. We

iterated the backlog computations even until k=150th hyperperiod but we still found the backlog difference of values 0.0029. Theoretically, we can never reach to the steady-state because the system with average system utilization is greater than 1.

On the other hand this makes our believe more strong that the cumulative probability distribution function until discrete time value of 2000 has probability of 0.999999931661959.

Over all we marked the system S3 as unstable system and we cannot compute the steady-state stochastic response time for such systems.

Stochastic Response Time Evaluation Using RM SchedulingIn this section we follow the example system S2 to present our analysis to evaluate the stochastic framework by using fixed priority RM scheduling policy. We will describe the internal computations process evaluation with the help of various results.

First of all we defined the job release times along the system hyperperiod T, to mark the job sequence. The result is presented in table-2.

18

The figure-4 shows the discrete stochastic execution time beta distribution

functionsCS1 j,CS2 j

for system task set τ1 & τ 2. All system jobs will use the same

execution time distribution function belongs to their parent task.

At previous section in figure-2 we have discussed the results of steady-state of the system identified by a base job i.e. the first high priority job in the sequence along the hyperperiod. Now we will show our results about how much workload is faced by the low priority task instances Г2& Г5at steady-state of the system. See figure-5 for analysis.

Figure 6 depicts the partial & final response time comparison based on the method presented in chapter-3. b distribution results for system S2. Figure-7 shows the cumulative probability distribution function of the final response time distribution in order to observe miss & meet probability of the system.

At the end of this section we provided the results for a range of systems and manipulated them for various parameters using RM scheduling policy.

Table 2: Definition of system jobs at releast time instances along with the system hyperperiod T. The jobs are marked in pattern of single/double index.

Siτ i CS

Φ i T i Di

Job release times along the hyperperiod T

λ1=20 λ2=50 λ3=60 λ4=100 λ5=120

S2

τ1 f (0 :19 ;2,5 ) 20 40 -- Г1/Г11 Г3/Г12 Г 4/Г13

τ 2 f (0 :34 ;2,5 ) 50 60 90 Г2 /Г21 Г5/Г 22

19

Figure 4: Execution time beta probability distribution with alpha=2 and beta=5 shape parameters.

In our system model we have defined the

execution time CSi of a task τ i as a discrete

random variable [1] for our stochastic response time distribution computation procedure. The Beta distribution. We have

defined individual beta distribution CS1∧CS2

for both of the periodic tasks τ1&τ 2. The

graph at left shows distribution trend on discrete time steps accordingly.

We have chosen the length of execution time in such a way such that both low priority jobs

Г2∧Г 5 can face interference by higher

priority jobs of task τ1for both EDF & RM

scheduling policies.

20

Figure 5: Steady- state stochastic workload distribution low priority jobs Г1

& Г2 produced by higher or equal priority system jobs Г ki .

This figure depicts the steady-state backlog

probability distribution functions f w2( x ) &

f w5( x ) for the low priority task instances of

the task τ 2 defined in the system S2 . This

work load is basically due to the previous

same or higher priority job sequencesГ ki.

The graph at the left side shows these functions at steady-state of the system. The figure relates the probability values along vertical and discrete time interval on horizontal axis. This relation describes that

at time instancexwe have corresponding

f w j( x ) value of the probability of the work

load. The both distributions are more concentrated on the origin and decays rapidly along the +ve axis. For example at the time instance 1 we have 0.9 parts of

workload present for low priority job Г5

which is approximately 0.001 at time instance 14. This concentration shows that

Г5required 90% of the CPU time initially and

1% later at 14 to settle down its load.

21

Figure 6: Stochastic distribution of partial response time of taskτ 2.

This figure shows the stochastic distribution

function of partial response timef R2( x ) of taskτ 2.

This is computed by adding two stochastic

distributions; the backlog f W 2(x ) and the execution

time f C2( x )of task 2. Random variable addition of

two stochastic variables is basically a convolution in spatial/frequency domain.

The higher magnitude of probabilistic concentration of the distribution of partial

response time of task τ 2 (figure-6) is present at the

origin. The analysis shows that τ 2has more

chances to meet its dead line.

After final stochastic response time distribution we can exactly measure the probability of meeting the deadline, and other parameters which we have discussed in the description of figure-7.

22

Figure 7: Stochastic distribution of final response time of taskτ 2.

This figure shows the stochastic distribution

function of final response timef FR2( x ) of taskτ 2.

This is computed by adding two stochastic distributions; the partial response time stochastic

distribution f R2( x ) and the amount of stochastic

interferenceζ S jfaced by taskτ 2. Random variable

addition of two stochastic variables is basically a convolution in spatial/frequency domain. The higher magnitude of probabilistic concentration

of the distribution of final response time of task τ 2

(figure-7) is present at the origin. The analysis

shows that τ 2has more chances to meet its dead

line. This concentration can be measured, until

the deadline of the system taskτ i, called

probability of meeting the deadline. In our case

we have task τ 2 which has 90 time samples. This

ratio of the distribution probability (after to before the deadline) of missing to meeting the

deadline of the taskτ 2is empirically calculated

51.332267629550186e-015, which is seems to be negligible in case of soft real time system.

23

Figure 8: Graph shows the probability of meeting the deadline for lower Priority task τ 2as an outcome of stochastic analysis.

This figure shows the cumulative probability distribution final response

timef R2( x ) of taskτ 2. The vertical bars

show the amount of the probability at each discrete time instance.

We found that the probability value of meeting the deadline of a task is increased rapidly as time approaches until its deadline and shows steady behavior after the deadline of a task it becomes constant. Before the deadline the rapid increase of probability in meeting the task’s deadline is due to the amount of free slots available for a task to utilize, as it approaches to its deadline, oppositely the probability of free slots decreased in a same manner.

In our case we have task parameters as defined in table-2, and we are

analyzing the lower priority taskτ 2. We

are reached the probability of meeting the deadline of exactly-1 at deterministic time value of 47 which reflects the fact that this particular system is able to meet its dead line until time value of 47, and indirectly we can say that this is worst case deterministic time value of the lower priority task under analysis. Refer table-3 for detailed analysis of various set of systems.

24

Evaluation of the Set of Systems using RM SchedulingIn this section we will produce a range of systems and present the evaluation of their stochastic final response time distribution based on various parameters defined in chapter-2. The stochastic response time calculations are performed by fixed periodic priority driven scheduling policy (RM). We have classified the systems according to three utilization factors as prescribed by (17), (18), and (19). See evaluation results in table-3, as given below:

Table 3: System Analysis

RM fixed Priority Driven Scheduling policy with deadline is later than the period to consider more stochastic

interference

Si

τ i CS

Φi T i Di U smin U s

avg U smax k PMEET 2

PMISS2MISSD2

ratio

WCRT 2

S1

τ1 f (0 : 9;2,5 ) 2040

--

0.0417

0.1852

0.5002 1 0 0 15

τ 2 f (0 :14 ;2,5 )5060

90

25

S2

τ1 f (0 : 9;2,5 ) 2040

--

0.0417 0.208

70.58

2 1 0 0 20

τ 2 f (0 :19 ;2,5 )5060

90

S3

τ1 f (0 : 9;2,5 ) 2040

--

0.0417 0.232

30.667

2 1 0 0 25

τ1 f (0 :24 ;2,5 )5060

90

S4

τ1 f (0 : 9;2,5 ) 2040

--

0.0417 0.256

00.750

2 1 0 0 30

τ1 f (0 :29 ;2,5 )5060

90

S5

τ1 f (0 :29 ;2,5 )2040

--

0.0417 0.303

10.9166

2 1 0 0 29/

PMEET 2<1

τ1 f (0 : 9;2,5 ) 5060

90

S6

τ1 f (0 :29 ;2,5 )2040

--

0.0417 0.326

41.000

2 1 0 0 34

τ1 f (0 :14 ;2,5 )5060

90

S7

τ1 f (0 :29 ;2,5 )2040

--

0.0417 0.349

91.08

3 1 0 0 39

τ1 f (0 :19 ;2,5 )5060

90

S8

τ1 f (0 :29 ;2,5 )20 4 --

26

0 0.0417 0.373

51.1666

3 1 0 0 47

τ1 f (0 :24 ;2,5 )5060

90

S9

τ1 f (0 :39 ;2,5 )2040

--

0.0417 0.515

91.6666

3 0.999997

0.000003

0.00003 259/

PMEET 2<1τ1 f (0 :39 ;2,5 )50

60

90

S9

τ1 f (0 :39 ;2,5 )2040

--

0.0417 0.563

41.8333

4 0.999956

0.000044

0.000044 394/

PMEET 2<1τ1 f (0 : 49 ;2,5 )50

60

90

S10

τ1 f (0 :39 ;2,5 )2040

--

0.0417 0.611

0532.000

4 0.999639

0.000361

0.000361 454/

PMEET 2<1τ1 f (0 :59 ;2,5 )50

60

90

S11

τ1 f (0 :39 ;2,5 )2040

--

0.0417 0.658

62.1667

5 0.998042

0.001958

0.001961 649/

PMEET 2<1τ1 f (0 :69 ;2,5 )50

60

90

S12

τ1 f (0 :39 ;2,5 )2040

--

0.0417 0.706

22.3333

6 0.992692

0.007308

0.007362 884/

PMEET 2<1τ1 f (0 :79 ;2,5 )50

60

90

S13

τ1 f (0 :39 ;2,5 )20 40

--

0.04 0.9781 0.2187 1159/

27

17 0.7538

2.5000

7 22 8 0.22367 PMEET 2<1τ1 f (0 :89 ;2,5 )50

60

90

Above in table-3 we have evaluated 12 different settings of our basic system model (table-2).The final column shows the WCRT (16)/ the probability of meeting the deadline, of taskτ 2. As the results shows that we can broadly classify these systems as hard and soft periodic real time systems. Generally we have average system utilization is less than one or we can say the system is stable and computable for stochastic response time distribution. Systems S1to S8excluding S5 have their probability of meeting the deadline of lower priority task τ 2exactly equals to one and the remaining system set pretend to have the probability of meeting their deadline is less than one. As a result the former systems can be classified as a hard and later as soft priority driven real-time systems.

28

C h a p t e r 4

ENHANCED STOCHASTIC ANALYSIS FRAMEWORK

We have introduced a new method based on [5] in response to support arrival time as a stochastic random variable. In this chapter we presented the enhancements in system model and our algorithmic support in order to address the dependencies exist between stochastic random release time and system execution time. As an outcome of our analysis, we will define these dependencies in the form of a stochastic dependency probability function representing the probability of miss/meet a deadline for each of the case defined by release time stochastic distributions.

Enhanced System ModelWe inherit all the notations and specifications from our base system model [1][5] as we have discussed in chapter-1. We need some simple modifications in system parameters. The deterministic release time λ jof a job Г j is now changed to

stochasticλS j

CASE. The letter represent to stochastic, is the job number in the

system along up to the hyperperiod , and CASE; represents an option marked as a combination of binary string of 0 and 1’s started from most significant bit to least significant bit, and it is used to index the number of combinations of stochastic release time patterns for system tasks. The total number of options/cases/subsystems can be determined by the help of (19), formally defined as follows:

CASE=∏i=1

N

length(λSi) , (19)

29

Here N describes the total number of tasks in the system, i is an index to taskτ i, and the length function provides the amount of discrete time intervals of stochastic

release timeλSi. For example we have two periodic tasks N=2, each task has its

stochastic release time length of 3 in result we have 2*3 or 6 combinations or cases in total.

The probability of meeting/missing the deadline for each of the CASEcan be mapped as a discrete probability function, formally defined by (20) & (21) respectively.

f PMEETi

(CASE )=λSijk

CASE0 . PMEET i

CASE0 , λSijk

CASE2 .PMEET i

CASE2 ,………. , λSijk

CASE N .PMEET i

CASEN ¿ (20)

Here Nis used to define the index or case number for each of the taskτ i,λSijk

CASE(x) is

the deterministic magnitude gathered by multiplication of the stochastic release

instances involved in the in theCASE, and PMEET i

CASE defines the deterministic value of

the probability of meeting the deadline gathered by stochastic framework. Same as (20), we have formal definition for stochastic release time dependency function or probability missing the deadline for each case, given by (21).

f PMISSi(CASE )=λSijk

CASE0 . PMISSi

CASE0 , λSijk

CASE1 .PMISSi

CASE1 ,………. , λSijk

CASE N .PMISSi

CASEN (21)

The motivation for changing deterministic release time to stochastic corresponds to the change in task offsets for each CASE for the set of system jobs, see example of figure-9 for details and table-6. More over there are only some notations changed due to their sub-system/case scope, such as; task time period, task offset, job’s deadline, System release time backlogs, stochastic interference to the low priority task, and stochastic partial & final response time. The modified notations and their meanings are presented in table-4.

30

Table 4: Enhanced notations and their meanings.

Existing Notation NewNotation Comments

-- CASE

Defines the stochastic release time pattern in the form of a binary number, for a system task set in order to define the dependencies exist among system task set, corresponding to stochastic release instances.

λ ij ,∨ λ j λSijk

CASE

Represents the Stochastic release time random variable. CASE defines the combination of release time instances of a task group under observation; The sub index ijk represents the task, job and index of release time instance respectively.

Di DS ijk

CASE

Represents the Deadline in existence of Stochastic release time random distribution that is fixed for each CASE. The CASE key word defines the combinations of release time instances of a task group under observation; The sub index ijk represents the task, job and index of release time instance respectively.

фi фS ijk

CASE

Represents the Phase Offset in existence of Stochastic release time random distribution that varies for each CASE or release pattern. The CASE keyword defines the combination of release time instances of a task group under observation; The sub index ijk represents the task, job and index of release time instance respectively.

T i T Sijk

CASE

Represents the Time Period in existence of Stochastic release time random distribution that is fixed for each CASE. The CASE keyword defines the combination of release time instances of a task group under observation; The sub index ijk represents the task, job and index of release time instance respectively.

T T CASE

Represents the Hyper Period of the task-set in existence of Stochastic release time random distribution that is fixed for each CASE. The CASE keyword defines the combination of release time instances of a task group under observation.

-- f PMEETi

(CASE ) Represents a probability function as an outcome for deadline meet deterministic probabilities for each case inside the system. This function basically represents the dependencies among the stochastic release time, steady-state backlog and stochastic

31

execution time.

-- f PMISSi(CASE )

Represents a probability function as an outcome for deadline miss deterministic probabilities for each case inside the system. This function basically represents the dependencies among the stochastic release time, steady-state backlog and stochastic execution time.

f C j(x ) or CS f C j

(x ) or CS

Stochastic Execution time, remains with same notation, because the execution time would be same for each notation.

f R j(x ) f R j

CASE(x)

Represents a probability function of output partial response time probabilities, it is same as previous [1], but for our algorithm we are going to represent for each case belongs to system S.

f FR j(x) f F R j

CASE(x) Represents a probability function of output final response time, for each case presented in system S.

Stochastic Release Time, Probabilistic Dependency Algorithm The algorithm introduced here is the optimized form of stochastic analysis framework presented in [5] in order to support the stochastic release time. We will compute the discrete probability function of meeting /missing the deadline in order to show the dependencies exist in the form of probability values for each release pattern or cases (19). The algorithm steps are given below:

1) Define and calculate the total number of N cases or release patterns for the system task set by using (19).2) Name all these cases in the form of a binary index or /CASE in a sequential way and compute the task parameters for each of the CASE, such as; relative offsetфS ijk

CASE, relative deadlineDS ijk

CASE, release instance with probability, relative time periodT Sijk

CASE, and relative hyperperiod T CASE .

32

3) Compute the deterministic value of the probability of deadline miss/meet for each of the case by using existing stochastic analysis approach [1]. The probability of the stochastic release time at k-th instance is than multiplied with the probability of meet/miss (13)/(14) the deadline of corresponding CASE. 4) The outcome of probability values computed for each CASE in the previous step actually represents the release time stochastic dependency probabilities without considering the magnitudes of the deterministic patterns of release patterns defined for each CASE. The functions (20) & (21) actually serve the purpose to distribute the probability values according to the magnitude of the release time patterns defined in each CASE. This stochastic release time dependency is the relation that defines the amount of probability values (meet/miss) on all possible release patterns in the stochastic distribution for a defined task set.

33

C h a p t e r 5

EVALUTION OF ENHANCED STOCHASTIC ANALYSIS FRAMEWORK

In this chapter we will present the computations for proposed method discussed in chapter-5. We will take the help of a simple example with stochastic release time to facilitate the concept of probabilistic dependency among the stochastic release time pattern/cases.

Example System with Stochastic Release TimeWe have chosen a periodic system model with two tasks and scheduled with Rate monotonic scheduling policy in order to evaluate our algorithm. We have supposed the equal probability function U [0 :N ] to represent the stochastic parameters for

exampleU [ 0 :4 ]defines the probability equal probability value of 15over the discrete

interval [0:4]. The same distribution is used for stochastic release time for simplicity reasons for each task in the system.

After analyzing the example system it is found that there is a relation between stochastic release time and task offset’s. The task offset only varies as per length amount of the stochastic release time. In the example system (table-5) the length of

stochastic release time λSijk

CASE is equals to 2 which in turn cause the variation in the

offset value by two points and on the other hand it is deterministic for each case in the system. Other corresponding example system parameters are given in table-5.

Table 5: A task set with stochastic release time

Si τ i CS λSijk

CASE фS ijk

CASE DS ijk

CASE T Sijk

CASE T CASE

S1

τ1U[0:4]

U[1:2] [5:6] 10 10

20τ 2

U[0:9]

U[1:2]

[10:11] 20 20

34

The figure-9 depicts shows the transformation of the system with deterministic release time to stochastic release time. We can observe that how the individual task parameters such as, delaine, period, offset, are getting changed from deterministic to a constant dynamic range of integer values.

35

Figure 9 : Transformation of the deterministic task parameters after introducing stochastic release time support to the task model for example described in table-5.

This figure explains the behavior of the system when we introduced the stochastic release time support to the existing priority driven stochastic analysis framework [1]. The graph relates the probability values along vertical axis and the discrete time values along horizontal axis. The stochastic release time is shown in red/green vertical bars of length equals to 2 and having equal probability value of ½ at each discrete time.

We have observed that the phase offset of a task is variable and it changes in accordance of each stochastic release pattern/case. This absolute value of change in offset is equals to the length of release time here in our case the length of stochastic release time is 2 which is actually a right shift in the system task’s release time from their base/first release time. The phenomena can be observed by graph, for example here the phase offset is

varying in between 5 to 6 forτ1and 10 to

11 for taskτ 2, here they are changing two

points from their base value of 5 and 10 respectively. Other task parameters such as time period, deadline and hyperperiod remains unchanged.

The stochastic release time can be transformed to deterministic release patterns by dividing the main systems into subsystems of fixed offset. Now the question is how many sub systems are

36

required to transfer this system with stochastic release patterns into the deterministic subsystems/cases. The amount of CASES is defined by (19). In our case we have total number of task

N=2, length of CS1and CS2

is both equals to

2. So we have total 2*2 or 4 cases to have stochastic dependency of release time on this specific system model.

Analysis of the Example System using proposed Algorithm In this section we will evaluate the example system of table-3 with our proposed algorithm. The motivation is to find the stochastic distribution function that would help us to correlate the risk involved by stochastic release time with their corresponding probabilities. The evaluation is given by the help of steps, mentioned in our algorithm (see chapter-4), are as follows:

1) The first step is to find the combinations of release patterns of stochastic release time. In our system we have length of the stochastic release time for both of the tasks are equals to 2. By using 19; which shows we have 4 combination of release patterns in total to analyze for probability of meeting/missing for the low priority taskτ 2 ' s deadlines.

CASE=∏i=1

N

length ( λS i)=length (λS1 ) .length ( λS1 )=(2 ) . (2 )=4

2) We have CASE variable equals to 4 of release time patterns of binary names, to name sub-systems with all possible deterministic offset to the task set. The deterministic release patterns with system and task parameters are provided

37

in table-6 as follows. To understand how we have assigned the deterministic parameters for our subsystems/cases, just interpret 0 as red vertical bar and 1 as green vertical bar, see figure-9 for reference.

Table 6: Naming the sub-systems for stochastic release patterns

Si CASE τ i CS λSijk

CASE фS ijk

CASE T Sijk

CASE DS ijk

CASE T CASE

S1

0 0τ1

U[0:4] RED 5 10 10

20τ 2

U[0:9] RED 10 20 20

0 1τ1

U[0:4] RED 5 10 10

20τ 2

U[0:9]

GRN 11 20 20

1 0τ1

U[0:4]

GRN 6 10 10

20τ 2

U[0:9] RED 10 20 10

11τ1

U[0:4] RED 6 10 10

20τ 2

U[0:9] RED 11 20 20

3) The third step is to compute the probability of meeting/missing the low priority task deadline using existing stochastic analysis framework [1] to represent the stochastic dependency function for release time patterns.

Table 7: Stochastic Analysis by using [1]

Si CASE τ i CS λSijk

CASE фS ijk

CASE T Sijk

CASE DS ijk

CASE T CASE kCASE PMEET 2

CAS E PMISS2

CASE

S1 0 0 τ1 U[0:4]

RED 5 10 10 20 4 0.99961

0.000039

38

τ 2U[0:1

4] RED 10 20 20

0 1τ1

U[0:4] RED 5 10 10

20 4 0.99961

0.000039τ 2

U[0:14]

GRN 11 20 20

1 0τ1

U[0:4]

GRN 6 10 10

20 4 0.99998

0.000002τ 2

U[0:14] RED 10 20 10

1 1τ1

U[0:4] RED 6 10 10

20 4 0.99961

0.000039τ 2

U[0:14] RED 11 20 20

We found that the release time pattern 10 reflects the release time dependency with a probability difference of 0.000037(0.9998-0.99961) as a net amount. This means that release patterns with offset 6 for task-1 and 10 for task-2 is suitable system configurations. This analysis can be extended to some practical stochastic distribution by analyzing the practical system configuration.

4) The 4th and final step is to define the amount of stochastic dependency corresponds to magnitude of the stochastic release time patterns. Here in this simple example we have uniform magnitudes for each of the release time pattern k of task2, hence for each case we will have the same probabilities as in previous step. By using (20) we have;

f PMEET2

(CASE)=λS2 jk

CASE00 .PMEET 2

CASE00 , λS2 jk

CASE01 . PMEET 2

CASE01 , λS2 jk

CASE10 . PMEET 2

CASE10 , λS2 jk

CASE11 .PMEET 2

CASE 11 ,

in our case we have same magnitude of 1 for all 4 release time patterns for task τ 2, as given follows:

λS2 jk

CASE00=λS2 jk

CASE 01=λS2 jk

CASE10= λS2 jk

CASE11=(0.5 )+(0.5 )=1

39

The amount of probabilities PMEET 2

CASE for task τ 2 for all 4 cases is given in table-7.

Hence net outcome function of probability of meeting the deadlinef PMEETi

(CASE )

of task τ 2 under stochastic release time deterministic contribution is given as follows (see figure-10):

f PMEET2

(CASE)=1∗0.99961 ,1∗0.99961 ,1∗0.99998 ,1∗0.99961

In the Same way we can compute the stochastic release time dependency

function for probability of missing task deadlinef PMISS2

(CASE ).

Figure 10: Graph shows the stochastic release time dependencies relation in term of probability values to analyze the effect of stochastic release patterns for taskτ 2.

This figure presents the release time dependencies at horizontal and corresponding probability values are mapped at vertical axis .We have analyzed that the CASE‘10’ presents the optimal value of the probability of

meeting the deadline of task τ 2 on set of

4 possible cases.

Here in the figure horizontal index 1 represent the case 00, 2 maps to case 01, 3 defines case-10 and 4 provides information about case 11.

40

CONCLUSION

We are dealing with the probability values of 0 to 1 in our complex computation process including iterative convolution shrink, and addition form operators. These computations are performed on stochastic distributions of various lengths depending upon the overall system utilization factor. The main focuses are on the steady-state backlog iterative process which may be move towards worst condition as the average system utilization approaches to one. In worst case the steady-state backlog distribution may contains several thousand values which are equally distributed among 0 and 1. These numerical numbers are very small and may leads to accuracy problem due to rounding-off the computation introduced by the machine. We face this situation while calculating the total probability value of meeting and missing the deadline from the stochastic response time distribution in some of similar situation mentioned above. We found that this total probability value of the response time stochastic distribution is greater than one at up to 6th

decimal place. This problem can be tackle by using more precise computation machine.

The computations were difficult to understand due to improper notations for the mathematics. We enhanced the notations and make them proper with sub index to task and job numbers.

The method is enhanced for stochastic support to the existing deterministic release time in order to address the model with more practical approach.

41

BIBLIOGRAPHY

[1] J.M.Lopez, J.L.Diaz, J.Entrialgo, and D.Garcia. Stochastic analysis of real-time systems under priority-driven scheduling. Springer Science & Business Media, April 2008.

[2] K.Kim, J.L.Diaz, and L.L.Bello. An Exact Stochastic Analysis of Priority-Driven Periodic Real-Time Systems and its Approximations. IEEE Transactions on Computers, Vol 54, No. 11, November 2005.

[3] J.L.Diaz, and J.M.Lopez. Some Notes on Stochastic Analysis using EDF Scheduling. Technical Report, http://www.atc.uniovi.es/research/SNSAUES07.pdf, September 2007.

[4] K.Kim, J.L.Diaz, L.L.Bello, J.M.Lopez, C.G.Lee, D.F. Garcia, S.L.Min, O.Mirabella. An Exact Stochastic Analysis of Priority-Driven Periodic Real-Time Systems. Thesis Report, http://www.atc.uniovi.es/research/AESA04.pdf, 2005.

[5] J.L.Diaz, D.F. Garcia, K.Kim, C.G.Lee, L.L.Bello, J.M.Lopez, S.L.Min, O.Mirabella. An Exact Stochastic Analysis of Priority-Driven Periodic Real-Time Systems. Proceedings of the 23rd IEEE Real-Time Systems Symposium (RTSS’02), 2002.

[6] J.L.Diaz, J.M.Lopez, D.F.Garcia. Stochastic Analysis of the Steady-State Backlog in Periodic Real-Time Systems. Technical Report, UNIVERSITY OF OVIEDO, Computer Science Department, , May 2003.

[7] Q.Li, C.Yao. Real-Time Concepts for Embedded Systems. CMP Books, ISBN: 1-57820-124-1, Jan 2003.

[8] S.Manolache, P.Eles, and Z.Peng. Real-Time Applications with Stochastic Task Execution Times. Springer, ISBN: 13-978-1-4020-5509-6, 2007.

[9] Wikipedia®. Beta distribution. http://en.wikipedia.org/wiki/Beta_distribution, May 27, 2007, 3:40 AM.

[10] NIST SEMATECH. 1.3.6.1. Probability distributions. http://itl.nist.gov/div898/handbook/eda/section3/eda361.htm, May 28, 2007, 10:40 AM.