Вы находитесь на странице: 1из 10

Ms Subuhi Firdaus

Ketan Ghai Dheerendra Singh Anubhav Singh Keshav Mahawer Amit Patel Ritesh Shukla

A7605308098 A7605308088 A7605308108 A7605308075 A7605308097 A7605308100

Types of Tasks
Periodic task
Triggered at fixed periods by a timer

Aperiodic task
Triggered by external interrupts

Sporadic task
Triggered by external interrupts, but with minimum inter-arrival time (MIT) between interrupts can be treated as a periodic task with period equal to MIT We typically assume periodic task model for schedulability analysis

The fixed priority scheduling algorithm

Very simple scheduling algorithm; every task i is assigned a fixed priority pi ; the active task with the highest priority is scheduled. Priorities are integer numbers: the higher the number, the higher the priority; In the research literature, sometimes authors use the opposite convention: the lowest the number, the highest the priority. In the following we show some examples, considering periodic tasks, and constant execution time equal to the period.

Example of schedule
Consider the following task set: 1 = (2, 6, 6), 2 = (2, 9, 9), 3 = (3, 12, 12). Task 1 has priority p1 = 3 (highest), task 2 has priority p2 = 2, task 3 has priority p3 = 1 (lowest).

Schedulability of Fixed-Priority Tasks


Identified several simple schedulability tests for fixed-priority scheduling: A system of n independent preemptable periodic tasks with Di = pi can be feasibly scheduled on one processor using RM iff U n(21/n 1) A system of simply periodic independent preemptable tasks with Di pi is schedulable on one processor using the RM algorithm iff U 1 [similar results for DM] But: there are algorithms and regions of operation where we dont have a schedulability test and must resort to exhaustive simulation Is there a more general schedulability test? Yes, extend the approach taken for simply periodic system schedulability

Fixed-Priority Tasks: Schedulability Test


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 algorithms which can exhibit anomalous behaviour [See also lecture 3] Use this as the basis for a general schedulability test: Find the critical instant when the system is most loaded, and has its worst response time Use time demand analysis to determine if the system is schedulable at that instant Prove that, if a fixed-priority system is schedulable at the critical instant, it is always schedulable

Note:
Some considerations about the schedule shown before: The response time of the task with the highest priority is minimum and equal to its WCET. The response time of the other tasks depends on the interference of the higher priority tasks; The priority assignment may influence the schedulability of a task.

Priority assignment
Given a task set, how to assign priorities? There are two possible objectives: Schedulability (i.e. find the priority assignment that makes all tasks schedulable) Response time (i.e. find the priority assignment that minimize the response time of a subset of tasks). By now we consider the first objective only An optimal priority assignment Opt is such that: If the task set is schedulable with another priority assignment, then it is schedulable with priority assignment Opt. If the task set is not schedulable with Opt, then it is not schedulable by any other assignment.

Optimal priority assignment


Given a periodic task set with all tasks having deadline equal to the period (8i, Di = Ti ), and with all offsets equal to 0 (8i, i = 0): The best assignment is the Rate Monotonic assignment Tasks with shorter period have higher priority Given a periodic task set with deadline different from periods, and with all offsets equal to 0 (8i, i = 0): The best assignement is the Deadline Monotonic assignment

Tasks with shorter relative deadline have higher priority For sporadic tasks, the same rules are valid as for periodic tasks with offsets equal to 0.

Example revised:
Consider the example shown before with deadline monotonic: 1 = (3, 6, 6), p1 = 2, 2 = (2, 4, 8), p2 = 3, 3 = (2, 10, 12), p3 = 1.

Fixed Priority Algorithms


Rate Monotonic (RM) Priorities based on Task period: smaller periods have higher priority.

Deadline Monotonic (DM) Priority based on task deadline: smaller relative deadline, higher priority.

if Di < Dk, then i > k No fixed priority algorithm is optimal Under special cases can achieve a utilization of 1: a set of tasks are simply periodic if for every pair of tasks Ti and Tk with pi<pk, pk=mpi, m an integer. (They are harmonic) for simply periodic, independent, preemptable tasks with Di pi, a set of tasks is schedulable on a uniprocessor system iff U 1. Among fixed-priority algorithms, DM is optimal if a set of tasks can be scheduled using fixed priorities then DM will produce a feasible schedule if Dk = xpk for all k and some constant x then RM is identical to DM.

Fixed Priority Scheduling

Each task is assigned a fixed priority for all its invocations

Pros:

Predictability Low runtime overhead Temporal isolation during overload

Cons:
Cannot achieve 100% utilization in general, except when task periods are harmonic Widely used in most commercial RTOSes and CAN bus

Two Schedulability Analysis Approaches

Utilization bound test


Calculate total CPU utilization and compare it to a known bound Polynomial time complexity Pessimistic: sufficient but not necessary condition for schedulability

Response Time Analysis (RTA)


Calculate Worst-Case Response Time Ri for each task Taui and compare it to its deadline Di Pseudo-polynomial time complexity Accurate: sufficient and necessary condition for schedulability

Many persons have contributed to make this project on Schedulability Tests for Fixed Priority Tasks. We would especially like to express our appreciation to Ms Subuhi Firdaus (Faculty,Amity University) for her unstinted support, encouragement and painstakingly and meticulous effort for us.

We acknowledge the help and cooperation received from all the faculty members of Amity University. Several colleagues and students have contributed directly and indirectly to the contents of this project, as they had given me numerous ideas. Their criticism gave me the much-needed hints about the areas that needed elaboration and amendments and also to present them with greater clarity. Finally, we wish to express my sincere thanks to all our family members, especially our Parents for their constant moral support and Encouragement. We would Welcome Constructive Suggestions to improve this project, which can be implemented in my further attempts.

Thanking you!

NAME
KETAN GHAI DHEERENDRA SINGH ANUBHAV SINGH KESHAV MAHAWER AMIT PATEL RITESH SHUKLA

ENROLLMENT NUMBER A7605308098 A7605308088 A7605308108 A7605308075 A7605308097 A7605308100

Вам также может понравиться