Schedulability of Fixed Priority Tasks with Short Response Time
In this section, we have discussed the following topics: - Schedulability of fixed priority tasks with short response time: (time demand analysis, critical instant) - Schedulability Test for Fixed Priority Tasks with Arbitrary Response Time: busy intervals -General Schedulability Test : General Time-Demand Analysis Method, and - Practical Factors.
Summary
In this section, we have discussed the following topics: - Schedulability of fixed priority tasks with short response time: (time demand analysis, critical instant) - Schedulability Test for Fixed Priority Tasks with Arbitrary Response Time: busy intervals -General Schedulability Test : General Time-Demand Analysis Method, and - Practical Factors.
Things to Remember
- Critical Instant: The response time of a job Ji,k in Ti has the maximum possible value if the k-th period, which begins when Ji,k is released, is a peak frame and this peak frame begins at the same time as a peak frame in every high-priority task.
- To determine whether a task can meet all its deadlines:
<!-- [if !supportLists]-->– <!--[endif]-->Compute the total demand for processor time by a job released at a critical instant of the task and by all the higher-priority tasks as a function of time from the critical instant.
<!-- [if !supportLists]-->– <!--[endif]-->Check whether this demand can be met before the deadline of the job.
3. Busy Intervals: A level-busy interval (t0, t] begins at an instant t0 when
- All jobs in Ti released before the instant have completed.
- <!--[endif]-->A job in Ti is released.
4. Practical Factors: Non-preemptable, Self-suspension, Context switch, Tick scheduling
MCQs
No MCQs found.
Subjective Questions
Q1:
How can you use network to authenticate user?
Type: Short Difficulty: Easy
Q2:
how to configure global user authentication and authorization?
Type: Short Difficulty: Easy
Q3:
How to configure external service to authenticate user?
Type: Short Difficulty: Easy
Videos
No videos found.

Schedulability of Fixed Priority Tasks with Short Response Time
Schedulability of fixed-priority tasks with short response time
The fixed priority algorithms are predictable and do not suffer from scheduling anomalies. The worst case execution time of the system occurs with the worst case execution time of the jobs, unlike dynamic priority algorithm which can exhibit anomalous behavior. Pseudo-polynomial time schedulability test can be used for the tasks scheduled according to the fix priority algorithms. In this, the response times of the jobs should be smaller than or equal to their respective periods and the total utilization should be less than or equal to 1. It means, every job completes execution before the next job if the same task is released.
The above fact can be used for general schedulability test of fixed-priority tasks with short response time. The methods used for the test are,
- Find the critical instant when the system is most loaded and has its worst response time.
- Use time demand analysis to determine whether the system is schedulable at that instant.
- Prove that if a fixed priority system is schedulable at the critical instant then it is always schedulable.
Time Demand Analysis
The time demand analysis is used to determine the system behavior at the critical instant. For each job Ji,e released at a critical instant if Ji,e and all higher priority tasks complete executing before their Di, then the system can be scheduled. To prove this we can compute the total demand for processor time by a job released at a critical instant and all the higher priority tasks as a function of time from the critical instant. A test is conducted to check whether this demand can be met before the deadline.
Consider one task Ti at a time starting from highest priority and working down to lowest priority. Consider a job Ji in Ti where the release time are 0 of that job is a critical instant of Ti. At time t0 + t for t>=0, the processor time demand wi for this job and all the higher priority jobs released between t0 and t

Where, ei = execution time of job

Compare the time demand wi(t) with the available time t then
- If wi(t) <=t, then the job Ji meets its deadline.
- If wi(t)>t, for all 0<=t<=Di then the task may not complete by its deadline and the system may not be scheduled using a fixed priority algorithm.
The above two cases are sufficient conditions but not necessary condition. We can use this method to check that all the tasks can be scheduled if they are released at their critical instant and we can conclude that the entire system can be scheduled.
Consider three tasks T1 = (3, 1), T2 = (5, 2) and T3 = (10, 2) scheduled according to rate monotonic algorithm. The total utilization U = 0.933. For these tasks, we can draw a graph for time demand function as shown below:

The time demand function is a staircase function. The steps in the time demand for a task occurs at multiples of the period for higher priority task. The value of wi(t) and t linearly decreases from a step until the next step. In the figure, the time demand function w1(t), w2(t) and w3(t) are not above the timeline t at their deadlines. Therefore, all the tasks in the system meet their deadlines and can be feasibly scheduled.
Critical Instant
A critical instant of a task Ti is a time instant in which
- The job in Ti released at this instant has the maximum response time of every job in Ti is equal to or less than the relative deadline Di of Ti and
- The response time of the job released at the instant is greater that Di if the response time of some jobs in Ti exceeds Di.
Therefore, a critical instant for a job is the worst case release time for that job taking into account all jobs that have higher priority. It means, the job released at the same instant as all jobs that have higher priority are released and must wait for all those to complete before it executes. The response time of a job in Ti released at a critical instant is called the maximum (possible) response time and is denoted by wi.
The schedulability test involves checks each task, in turn, to verify that it can be scheduled when started at a critical instant. If it is schedulable at all critical instants, then it will work at other times as well.
Now, we can say that a critical instant of a task Ti is a time instant such that:
If Wi,k<=Di,k for every Ji,k in Ti, then the job released at that instant has the maximum response time of all jobs in Ti and Wi=Wi,k.
Else if,
∃Ji,k:Wi,k>Di,k
Then the job released at that instant has response time > D where Wi,k is the response time of job.
THEOREM
In a fiÂÂÂÂÂxed-priority system where every job completes before the next job in the same task is released, a critical instant of any task Ti occurs when one of its job Ji,c is released at the same time with a job in every higher-priority task, that is, ri,c =rk,lk for some lk for every k =1,2,...,i −1.
Schedulability Test for Fixed Priority Tasks with Arbitrary Response Time
Busy Intervals
Consider a term level-πi busy interval. A level-πi busy interval (t0,t] begins at the instant to when
- All the jobs in Ti released before the instant have completed and
- A job in Ti is released.
The interval ends at the first instant t after t0 when all the jobs in Ti released since t0 are completed. It means, in the interval [t0, t], the processor is busy all the time executing jobs with priorities πi or higher. All the jobs executed in the busy interval are released in the interval and at the end of the interval, there is no backlog of jobs to be executed afterwards. Therefore, while computing the response time of jobs in Ti, we can consider every level-πi busy intervals.
Consider the schedule of three tasks T1 = (2, 1), T2 = (3, 1.25) and T3 = (5, 0.25)
Using the RM algorithm, the timing diagram is as follows:

General Schedulability Test
The general schedulability test is described below. It relies on the fact that when determining the schedulability of a task Ti in a system in which the response times of jobs can be larger than their respective periods, it still suffices to confiÂÂÂÂÂne our attention to the special case where the tasks are in phase. However, the first job Ji,1 may no longer have the largest response time among all jobs in Ti. Consequently, we must examine all the jobs of Ti that are executed in the first level-πi busy interval. If the response times of all these jobs are no greater than the relative deadline of Ti, Ti is schedulable; else, Ti may not be schedulable.
General Time-Demand Analysis Method
Test one task at a time starting from the highest priority task T1 in the order of decreasing priority. To determine whether a task Ti is schedulable, let us assume that all the tasks are in phase and the first level-πi busy interval begins at time 0.
While testing whether all the jobs in Ti can meet their deadlines (that is, whether Ti is schedulable), consider the subset Ti of tasks with priorities πi or higher.
- If the first job of every task in Ti completes by the end of the fiÂÂÂÂÂrst period of the task, check whether the first job Ji,1 in Ti meets its deadline or not. Ti is schedulable if Ji,1 completes in time. Else, Ti is not schedulable.
- If the fiÂÂÂÂÂrst job of some task in Ti does not complete by the end of the first period of the task, do the following:
- Compute the length of the in phase level-πi busy interval by solving the equation
1.png)
iteratively, starting from
3.png)
until t(l+1) = t(l). The solution t(1) is the length of the level-πi busy interval.
- Compute the maximum response times of all ⌈t(l)/pi⌉ jobs of Ti in the in=phase level- πi busy intervals in the manner described below and determine whether they complete in time.
Ti is schedulable if all these jobs complete in time; else, Ti is not schedulable.(Liu 141-142)
Sufficient Schedulability Condition for RM and DM algorithm Schedulable Utilization of RM Algorithm when Di = Pi
Theorem
A system of n independent, preemptable periodic tasks with relative deadlines equal to their respective periods can be feasibly scheduled on a processor according to the RM algorithm if its total utilization U is less than or equal to
URM(n) =n(21/n −1)
_as_a_function_n._.png)
Example,
T1 = (1.0, 0.25), T2 = (1.25, 0.1), T3 = (1.5, 0.3), T4 = (1.75, 0.07), and T5 = (2.0, 0.1).
Utilizations are: 0.25, 0.08, 0.2, 0.04, and 0.05
Total utilization = U = 0.62
URM (5) = 0.743
Practical Factors
It includes the following:
- Non-preemptable
- Self-suspension
- Context switch
- Tick scheduling
Lesson
Priority-Driven Scheduling of Periodic Tasks
Subject
Real Time System
Grade
IT
Recent Notes
No recent notes.
Related Notes
No related notes.