Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

Name :-Prayat Hegde

Email:-phegde@uncc.edu

ITCS 6010/8010

Real-Time Embedded Systems

Homework 3
1. (15 points) Consider the task set shown in the table below.
T
1
2

5
3

P
10
12

D
8
12

Res
[C; 2 [A;1] ] from 0, 1
[B;1] from 1
[C;1] from 2

2
3

Construct the schedule and indicate


resource allocations for the time interval
0 to 20 using the Rate Monotonic (RM)
3 1
15
13
2
scheduling paradigm in conjunction with
4 0 24
22
5
[A;2 [B;1] ] from 1,2
the Stack Resource Protocol (SRP) for
[C;1] from 4
resource arbitration. Use the timeline
provided below for your solution. Indicate system ceiling values in the last row of the
timeline.
Ans
T1

T2

T2

C|A

C
C

T3
T4

T2
T3

T4

A|B

2 1

Sys
Ceil

C|A

T3

T3
T4

10

11

12

13

14

15

16

17

18

19

20

2. (30 points 9 + 6 + 15) Consider the task set shown below.


T1 (6, 1), T2 (10, 1), T3 (14,3)
Assume that a periodic server S (4, 1) is added to the system.
Assume the following aperiodic job arrivals:
A1: arrives at time 6 and has execution time of 2
A2: arrives at time 9 and has execution time of 1
A2: arrives at time 14 and has execution time of 3
a. Assuming S is a polling server, construct a schedule for the time interval 0-20 using
the Rate Monotonic (RM) scheduling policy.
Ans
S
T1

A1
T1

T2

A1

T1

A3

T1

T2

T3

A2
T1

T2
T3

T3

T3

10

11

12

13

T3

T3

14

15

T3
16

17

18

19

20

Name :-Prayat Hegde


Email:-phegde@uncc.edu
b. If S is a deferrable server, is the system schedulable under the Rate Monotonic (RM)
scheduling policy?
Ans

Deferrabe server S(4,1)


es=1 ps=4
Case T1
T1(t)=ei+es+ceil(t-es)/ps] x es
=2+ceil[(t-1)/4] x 1
Considering t=3
We get
T1(3)=2+1 =3
Therefore T1 is schedulable
Case T2
T2(t)=e2 + es + ceil(t-es)/ps] x es +ceil[t/6] x 1
=2+ ceil[(t-1)/4] x 1 +ceil[t/6] x 1
Considering t=4
We get
T2(4)=2+1+1=4
Therefore T2 is schedulable
Case T3
T3(t)=e3 + es + ceil(t-es)/ps] x es +ceil[t/6] x 1 +ceil[t/10] x 1
=4+ ceil[(t-1)/4] x 1 +ceil[t/6] x 1 +ceil[t/10] x 1
Considering t=9
T3(9)=4+2+2+1 = 9
Therefore T3 is schedulable
The system is schedulable under RM.

Name :-Prayat Hegde


Email:-phegde@uncc.edu
c. Assuming S is a deferrable server, construct a schedule and indicate the server budget
for the time interval 0-20 using the Earliest Deadline First (EDF) scheduling policy.
Use the last two rows in the table to indicate the budget assuming each row is 0.5 units
in height (as an example, a green line has been shown at budget level 1).
Ans
S

A1

T1

T1

T2

A1

A2

T1

1
1
.5
0

A3

T1

T2

T3

A3
T1

T2
T3

T3

T3

10

11

12

13

T3

T3

14

15

T3
16

17

18

19

20

You might also like