Beruflich Dokumente
Kultur Dokumente
Lecture 05
Instructor: Dr. Khurram Bhatti
Assistant Professor
khurram.bhatti@itu.edu.pk
1
Real-time Embedded Systems
§ Fixed Priority Servers
§ Task Systems
§ Homogeneous Task Systems: Where all computational
activities are of the same type (Periodic for instance)
§ Aperiodic Tasks:
§ Tasks do not have a period parameter. No prior knowledge of
their arrival to the system designer.
§ Sporadic Tasks:
§ Tasks are not released at strict periodic intervals of time. The
parameter Period indicates the minimum inter-arrival time
between two successive jobs
4 Dr. M. Khurram Bhatti Embedded Systems, Spring’19, ITU, Lahore
2
Real-time Embedded Systems
§ Fixed Priority Servers
§ Hybrid Task Systems
§ Periodic Tasks:
§ Periodic tasks are time-driven and execute critical control activities
with hard timing constraints
§ Aperiodic Tasks:
§ Aperiodic tasks are usually event-driven and may have hard, soft,
or non-real-time requirements depending on the specific
application.
3
Real-time Embedded Systems
§ Fixed Priority Servers
§ Hybrid Task Systems
§ Schedulability of Hybrid Systems
§ Off-line guarantee of event-driven aperiodic tasks with
critical timing constraints can be done only by assuming a
maximum arrival rate for each critical event
4
Real-time Embedded Systems
§ Fixed Priority Servers
§ Hybrid Task Systems
§ Background Schedulability –Example
§ Two periodic tasks to be scheduled under RM such that
U=0.73 (which is less than U(2) < 0.83)
5
Real-time Embedded Systems
§ Fixed Priority Servers
§ Hybrid Task Systems
§ Background Schedulability –Example
6
Real-time Embedded Systems
§ Fixed Priority Servers
§ Hybrid Task Systems
§ Servers
§ The server is scheduled with the same algorithm used for
scheduling other periodic tasks
7
Real-time Embedded Systems
§ Fixed Priority Servers
§ Hybrid Task Systems
§ Polling Servers (PS)
§ Polling Server is an algorithm in which, server task appears at
regular intervals to serve the pending Aperiodic jobs (if any)
To Do:
• Run T1 & T2 with RM
8
Real-time Embedded Systems
§ Fixed Priority Servers
§ Hybrid Task Systems
§ Polling Servers (PS) –Example (RM schedule)
9
Real-time Embedded Systems
§ Fixed Priority Servers
§ Hybrid Task Systems
§ Polling Servers (PS) –Example-2 (RM schedule)
3
1 6
8
4 10
2 1 3
1 5 11
2
2 7
8
3 9
Aperiodic Jobs
1 2 3
1 6 11
10
Real-time Embedded Systems
§ Fixed Priority Servers
§ Hybrid Task Systems
§ Polling Servers (PS) –Schedulability analysis
§ Schedulability test for Periodic Tasks is the same as under RM
11
Real-time Embedded Systems
§ Fixed Priority Servers
§ Hybrid Task Systems
§ Polling Servers (PS) –Guarantees for Aperiodic jobs
§ In order to possibly perform an online guarantee of Aperiodic
tasks, RESPONSE TIME Analysis of Aperiodic jobs can be
used!
§ Since, in the worst case, the job can wait for at most one
period before receiving service, if Ca ≤ Cs , the request is
completed within two server periods.
2Ts ≤ Da
23 Dr. M. Khurram Bhatti Embedded Systems, Spring’19, ITU, Lahore
§ Hence, it is guaranteed if
12
Real-time Embedded Systems
§ Fixed Priority Servers
§ Hybrid Task Systems
§ Polling Server (PS) Limitations
§ PS is generally low or intermediate priority task
13
Real-time Embedded Systems
§ Fixed Priority Servers
§ Hybrid Task Systems
§ Deferrable Servers (DS)
§ In DS, the capacity or Budget is maintained until the end of the
period
14
Real-time Embedded Systems
§ Fixed Priority Servers
§ Hybrid Task Systems
§ Deferrable Servers (DS) –Example-1
§ At time t = 1, when T1 is completed, no Aperiodic requests are pending. Hence, the processor
is assigned to task T2.
§ However, the DS capacity is not used for periodic tasks, but it is preserved for future Aperiodic
arrivals.
§ Thus, when the first Aperiodic request arrives at time t = 2, it receives immediate service.
§ Since the capacity of the server is exhausted at time t = 4, no other requests can be serviced
before the next period.
§ At time t = 5, Cs is replenished at its full value and preserved until the next arrival.
§ The second request arrives at time t = 8, but it is not served immediately because T1 is active
and has a higher priority.
3
1 5
8
4 12
1 2 3
1 7 10
15
Real-time Embedded Systems
§ Fixed Priority Servers
§ Hybrid Task Systems
§ Deferrable Servers (DS) –Exercise (RM schedule)
2
2 5
8
3 10
3 3 1
2 7 11
16