100% found this document useful (1 vote)
102 views

Rtes Lab Assignments

The document provides 10 questions related to real-time scheduling and analysis using the Cheddar simulation software. The questions cover topics like priority-driven scheduling with preemption vs non-preemption, schedulability analysis of task sets using EDF and LLF, and modeling shared resources using protocols like PIP and PCP.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
102 views

Rtes Lab Assignments

The document provides 10 questions related to real-time scheduling and analysis using the Cheddar simulation software. The questions cover topics like priority-driven scheduling with preemption vs non-preemption, schedulability analysis of task sets using EDF and LLF, and modeling shared resources using protocols like PIP and PCP.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

RTES LAB

Instruction :

Each one of you Choose any two from the following questions and solve using cheddar
simulation software and intrepet the output and upload the same.

Q1

For the task graph show below show that a priority driven schedule with non-preemption will
produce a better schedule than priority driven schedule with pre-emption

All tasks are aperiodic with a deadline of 12. All tasks except for J5 release at 0. J5 releases at
4. The priority of jobs is such that J1 has a higher priority when compared to J2 has a higher
priority when compared to J3 and so on. The scheduling is done on a processor which has dual
identical cores with jobs migratable at any point in time.
Q2
Show that the following tasks table is schedulable using EDF on a mono-core processor, if pre-
emption is allowed but is not schedulable if pre-emption is not allowed. All tasks are aperiodic.

J1 J2 J3

r 0 2 4

e 3 6 4

d 10 14 12

Q3
Show that the following tasks table is schedulable using LLF but not using EDF on a dual-core
processor. All tasks are aperiodic.

J1 J2 J3

r 0 0 0

e 1 1 5

d 1 2 5

Q4
Show that the following tasks table causes indeterminism due to the execution time – when
scheduled using EDF. All tasks are periodic

R d e
J1 0 10 5
J2 0 10 2-6
J3 4 15 8
J4 0 20 10
Q5
Show that the following tasks are not schedulable using either EDf/LLF on a tri-core processor.
All tasks are periodic and preemptable. Migration is not possible between a Job.

A B C D E

 0 0 0 0 0

e 1 1 1 6 6

p 2 2 2 8 8

Q6

For the following Task set and scheduling algorithms – submit the screen shot of the schedule
generated by Cheddar – with proper interpretations and conclusions regarding the schedule
generated.

Q7

Consider two periodic tasks with the following parameters :


Task T1 : Period=Deadline=31, Capacity=8, Start time = 0
Task T2 : Period=Deadline=30, Capacity=8, Start time = 2

Prioritie are assigned according to Rate Monotonic.


T1 and T2 require the access to the shared resources R1 and R2 as follows:
T1 needs R1 from the 2nd unit of time of its capacity upto the 8th (included).
T2 needs R1 from the 6th unit of time of its capacity upto the 8th (included).
T1 needs R2 from the 4th unit of time of its capacity upto the 8th (included).
T2 needs R2 from the 2nd unit of time of its capacity upto the 8th (included).

Assume that both R1 and R2 apply PIP (Priority Inheritance Protocol).


Edit a Cheddar model for such software architecture and compute the
scheduling simulation during the 30th first units of time (button ).
Compute again the scheduling simulation during the 30th units of time with
the PCP resources.
• Show in the time lines when T1 and T2 lock and unlock R1 and R2.
• Say when the priorities of the tasks change due to PCP.
• Compare those results with the PIP Protocol.

Q8.
Create a scheduler uf.sc that will assign highest static priority to task with the least CPU
utilization and compare it against the behaviour of a rate monotonic scheduler for any task set
example from class or from your textbook.

Q9
Create a scheduler critical.sc that will schedule a task that is critical immediately, else it uses
RMS and compare it against the behavior of a rate monotonic scheduler for the following task
set. If there are multiple critical tasks – then RMS is applied within them. Under what
circumstances will this scheduler work better than RMS – show such a task set example.

Q10
We consider two periodic tasks, synchronous and with deadline on request : tasks T1 and T2.
They are defined as follow:

• Task T1 : Capacity = 4, Deadline = Period = 8, Start time = 0


• Task T2 : Capacity = 5, Deadline = Period = 10, Start time = 0
• Priority are assigned according to Rate Monotonic.

1. Open the model for exercice 2: ex2_base.xmlv3. It consists of a processor composed


of one core.
2. Edit this Cheddar model for the task set running on the processor.
3. Edit the core to host a preemptive fixed priority scheduler.
4. With Cheddar, compute a scheduling simulation for the feasibility interval (button
).
5. From this simulation, what are the worst case response times of each task? Can we see
missed deadlines?
6. Change you Cheddar model in order to use a preemptive EDF instead (value
Earliest_Deadline_First_Protocol for the Scheduler type attribute). Do again questions
2 and 3.
7. Compare both analysis results. What can you see? Is it surprising?
8. Change again your model: now we consider a preemptive EDF with the same task
sets, but you must add now an aperiodic task. We do not require that the deadline of
this aperiodic task must be met. To define such aperiodic task, change the value for
the attribute Task Type (see. figure 5):
o Periodic task T1: Period=Deadline=8, Capacity=4, Start time = 0
o Periodic task T2: Period=Deadline=16, Capacity=8, Start time = 0
o Aperiodic task T3: Deadline=15, Capacity=4, Start time = 0
9. Compute again the scheduling simulation for the first 30th units of time (button ).
What can you see now?
10. What can we conclude about the suitability of EDF for critical real-time systems? Is it
the case with fixed priority scheduling?

Q11
We consider two periodic tasks, synchronous, with deadline on request: tasks T1 and T2.
They are defined as follow:

• Task T1: Period=Deadline=9, Capacity=4, Start time = 0


• Task T2: Period=Deadline=8, Capacity=3, Start time = 0

We investigate now another scheduling policy: LLF (Least Laxity First). This policy selects
the task to run amoung the ready tasks according to a dynamic priority called 'laxity'. Li(t),
the laxity of a task i at time t can be computed by Li(t)= Deadline - remaining(t) where
remaining(t) is the remaining capacity of the task at time t.

1. Open the model for exercise 3: ex3_base.xmlv3. It consists of a processor composed


of one core.
2. Edit a Cheddar model for the task set running on the processor.
3. Edit the core to host a preemptive EDF scheduler.
4. With Cheddar, compute a scheduling simulation for the feasibility interval (button
).
5. From this simulation, what are the worst case response times of each task? Can we see
the missed deadline?
6. Change your Cheddar model in order to use a LLF policy instead (value
Least_Laxity_First_Protocol for the Scheduler type attribute). Do again questions 2
and 3.
7. What can we see about the results produced by both those scheduling policies? What
are the common points and differences?
8. Conclude about the choice between those two scheduling policies.

Q12

We now see a Cheddar model with two shared resources. We assume two periodic tasks with
the following parameters :

• Task T1: Period=Deadline=31, Capacity=8, Start time = 0


• Task T2 :Period=Deadline=30, Capacity=8, Start time = 2
• You should notice that those tasks are not synchronous ; indeed, they have a different
value for their Start time attribute.
• Prioritie are assigned according to Rate Monotonic.
We use a fixed priority preemptive scheduling policy for such task set.

T1 and T2 require the access to the shared resources R1 and R2 as follows:

• T1 needs R1 from the 2nd unit of time of its capacity upto the 8th (included).
• T2 needs R1 from the 6th unit of time of its capacity upto the 8th (included).
• T1 needs R2 from the 4th unit of time of its capacity upto the 8th (included).
• T2 needs R2 from the 2nd unit of time of its capacity upto the 8th (included).

We also assume that both R1 and R2 apply PIP (Priority Inheritance Protocol).

1. Open the model for exercise 5: exo5_base.xmlv3. It consists of a processor composed


of one core and the task set described above.
2. Edit a Cheddar model for resources R1 and R2
3. Compute the scheduling simulation during the 30th first units of time (button ).
4. Look for in the time lines where T1 and T2 lock and unlock R1 and R2.
5. What can you see? Is it surprising? Explain.
6. We now apply the PCP protocol (Priority Ceiling Protocol in the Figure 8). For such a
purpose, you have to update both R1 and R2. PCP works as follows:
o A ceiling priority is assigned to each resource. This priority is equal to the
highest priority level of the task accessing the resource. This ceiling priority
can be computed automatically by Cheddar if specified in the resource
component definition.
o A task which blocks another with a higher priority level, must run the critical
section with the priority of the blocked task (inheritance priority as PIP).
o When a task tries to lock a resource, the task is blocked if its priority is not
higher than all the ceiling priorities already allocated by other tasks. This is a
new blocking condition which is specific to PCP.
7. Compute again the scheduling simulation during the 30th units of time with the PCP
resources.
8. Show in the time lines when T1 and T2 lock and unlock R1 and R2.
9. Say when the priorities of the tasks change due to PCP.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy