DVA455: Software Development
for Real-Time Systems
<Subsystem1> & <Subsystem2>
Students: <Student 1>
<Student 2>
Date: <YYYY-MM-DD>
Hints:
1. Replace all red text in brackets (<…>) with your answer, and change to black
2. Make sure that the text is understandable — write only as much as necessary
3. Draw nice images, use figure numbers and captions and explain them in the text
4. Remove additional red text instructions, for example this text.
Good luck!
Assignment 1: Requirements and High-level Design
<Subsystem 1>: <The short description of subsystem 1 provided by the teacher>
<Subsystem 2>: <The short description of subsystem 2 provided by the teacher>
<If you make any other assumptions about these subsystems, explain this here.>
1. Functions and Timing Requirements
Function 1: <e.g., Emergency stop>
<Description, assumptions, etc.>
Stimulus: <e.g., Emergency button>
Additional information needed: <…>
Response: <e.g. Stop the conveyor belt>
TR 1.1: <e.g., The conveyor belt must stop within 1 second after the emergency
button is pressed.>
Motivation: <Explain how you came up with this value…>
<TR 1.2: ...>
<Function 2: ...>
2. High-level Design
<Design diagram, including all tasks and the
data flow between them, and between tasks an
peripheral devices (sensors/actuators)>
Figure 1: The high-level design
Sensors
<E.g.:
Temperature sensors: Three temperature sensors placed in different parts of
the room to get a stable average temperature reading.
Door status sensor: …
>
Actuators
<E.g.:
Heater: The temperature is adjusted by a heater with three heating levels (off,
min, max).
Light: …
>
Tasks
T1: <Task name>
Activation: <Is the task activated periodically or after another task (with what
period or after which task)?>
Connected sensors: <Sensors connected to this task>
Connected actuators: <Actuators connected to this task>
Data inputs: <Data produced by some other tasks that this task needs>
Data outputs: <Data produced by this other task>
Description: <Short description of what the task does>
<T2: …>
Timing motivation
<For each timing requirement in Section 1, motivate why it is satisfied by this
design (the high-level design together with the periods and precedencies).>
TR 1.1: <Motivation considering the tasks involved in Function 1.>
<…>
Assignment 2: Task Parameter Assignment and
Schedulability Analysis
<If you were given specific feedback about things to change compared to
assignment 1, include that here.>
1. Real-time Task Parameters
Task Task name Period WCET Deadline Precedes
T1 ComputePosition 20 4 20 T2, T5
Figure 2: Task parameters
CPU utilization: <Calculations and result>
Motivation for the task parameters:
<Explain how you ended up with these parameters.>
2. FPS scheduling
<A short description and motivation for the priority assignment used, e.g. why
they ensure the precedencies.>
Task Task name Period WCET Deadline Priority
T1 ComputePosition 20 4 20 1
Figure 3: Task priorities
Schedulability analysis: <Describe the rationale behind the chosen analysis
type and present the calculations>
Verdict: The task set is FPS schedulable under the above priority assignment
since <…>.
If the initial task set is not schedulable, adjust the parameters to make it
schedulable, without jeopardizing the timing requirements. Describe what
adjustments you made to reach a schedulable system.
3. EDF scheduling
<If needed, adjust the deadlines. Motivate the deadlines, e.g. why they ensure
precedencies.>
Period WCET Adjusted
Task Task name
deadline
T1 ComputePosition 20 4 20
Figure 4: Adjusted task deadlines
Schedulability analysis: <Describe the rationale behind the chosen analysis
type and present the calculations >
Verdict: The task set is EDF schedulable since <…>.
If the initial task set is not schedulable, adjust the parameters to make it
schedulable, without jeopardizing the timing requirements. Describe what
adjustments you made.
4. Offline Scheduling
<Describe how you constructed the offline schedule and why it is a good
solution.>
<Offline schedule>
Figure 5: Offline schedule
Assignment 3: Resource Sharing and Communication
1. Shared resources
<Describe the shared resources.>
Shared Critical
Task Task name Period WCET Deadline Priority
Resource section
T1 <R1> <3>
<R2> <5>
T2 <None>
Figure 6: Shared resources and length of critical sections
Schedulability analysis: <Make a new response time analysis, taking blocking
into consideration>
Verdict: The task set is schedulable since <…>.
If the original task set is not schedulable, adjust the parameters to make it
schedulable, without jeopardizing the timing requirements. Describe what
adjustments you made.
2. Distributed systems
<Describe the architecture of the distributed system (how many nodes (ECUs)
and which sensors/actuators are connected to which node).>
<Describe the allocation of tasks to hardware nodes and list the resulting
network communication in Figure 8.>
Sends Message
Deadlin
Task Task name Period WCET Priority messag priority
e
e to
T1 <T5> <High>
<T6> <Medium>
T2 <None>
Figure 7: Network communication
Holistic/end-to-end schedulability analysis:
<Present your schedulability analysis for the tasks executing on the nodes and
their communication over the CAN bus>
Verdict: The task set is schedulable since <…>.
If the original task set is not schedulable, adjust the parameters to make it
schedulable, without jeopardizing the timing requirements. Describe what
adjustments you made.