Course syllabus

EDA223/DIT162 Real-Time Systems

Course responsible: Jan Jonsson

Official course information: [ EDA223, DIT162, TimeEdit ]

Organization

The course encompasses lectures, exercise sessions, special sessions and a laboratory assignment.

The lectures aim at introducing fundamental theories and concepts as well as a programming paradigm, and demonstrating how theory and paradigm are applied.

The exercise sessions focus on the specific topics covered during the main lectures. At each session, selected parts of the course contents are highlighted, and solutions to relevant problems are demonstrated.

The special sessions are a complement to the lectures and exercises. Here, it is possible to get an introduction to sound generation and music theory with applicability to the laboratory assignment. It also offers an opportunity to discuss solutions to exercise problems or old exam problems.

In the laboratory assignment the students (in small project groups) should implement the software for a music playing application with strict timing constraints.

At the end of the course the students document their laboratory assignment in a written project report.

Aim and content

An embedded system is a computer system designed to perform one or a few dedicated functions. It is embedded in the sense that it is part of a complete device, often including electrical hardware and mechanical parts. For reasons of safety and usability, some embedded systems have strict constraints on non-functional behavior such as computational delay and periodicity. Such systems are referred to as real-time systems. Examples of real-time systems are control systems for cars, aircraft and space vehicles as well as computer games and multimedia applications. This course is intended to give basic knowledge about methods for the design and analysis of real-time systems.

After the course the students shall be able to

  • Formulate requirements for embedded systems with strict constraints on computational delay and periodicity.
  • Construct concurrently-executing tasks (software units) for real-time applications that interface to hardware devices (sensors/actuators).
  • Describe the principles and mechanisms used for designing run-time systems and communication networks for real-time applications.
  • Demonstrate knowledge about the terminology used within the theory of scheduling and computational complexity.
  • Apply the basic analysis methods used for verifying the temporal correctness of a set of executing tasks.
  • Reason about advantages and disadvantages regarding the choice of software design and scheduling algorithm for a real-time system given certain performance requirements.

Due to the extremely high costs associated with late discovery of problems in embedded systems, it is important to follow a good design methodology during the development of the software and hardware. One means for that is to use a system architecture that offers good component abstractions and facilitates simple interfacing of components.

The system architecture philosophy dictates that the software of an embedded system is organized into multiple concurrently-executing tasks, where each task (or group of tasks) implements a specific functionality in the system. This approach allows for an intuitive way of decomposing a complex system into smaller software units that are simple to comprehend, implement and maintain. The software environment used in the course is based on the C programming language, enhanced with a software library that provides support for programming of concurrent tasks with timing (delay and periodicity) constraints. To that end, a main objective of the course is to demonstrate how the enhanced C programming language is used for implementing communication/synchronization between tasks, resource management and mutual exclusion. Since other programming languages uses monitors or semaphores to implement these functions, the course also contains a presentation of such techniques. In addition, the course demonstrates how to use low-level programming in C to implement interrupt-driven interaction with hardware devices. To demonstrate the general principles in real-time programming, the course also gives examples of how these techniques are implemented in other programming languages, such as Ada and Java.

In order to execute a program containing concurrent tasks there is a run-time system (real-time kernel) that distributes the available capacity of the microprocessor(s) among the tasks. The course shows how a simple run-time system is organized. The run-time system determines the order of execution for the tasks by means of a scheduling algorithm. To that end, the course presents techniques based on cyclic time-table based scheduling as well as scheduling techniques using static or dynamic task priorities. In addition, protocols for the management of shared hardware and software resources are presented. Since many contemporary real-time applications are distributed over multiple computer nodes, the course also presents topologies and medium access mechanisms for some commonly-used communication networks.

In real-time systems, where tasks have strict timing constraints, it is necessary to make a pre-run-time analysis of the system schedulability. The course presents three different analysis methods for systems that schedule tasks using static or dynamic priorities: utilization-based analysis, response-time analysis, and processor-demand analysis. In conjunction with this, the course also gives an account on how to derive the maximum resource requirement (worst-case execution time) of a task.

Important dates (tentative)

Tue Jan 16 : First lecture, 13:15 - 15:00 (in room HC3)
Mon Jan 22 : Deadline - registration to project group
Study week 3 : Loan equipment pick-up (compulsory attendance)
Study week 4 : First laboratory session (compulsory attendance)
Study week 8 : Final laboratory session (preliminary lab grade given)
Mon Mar 11 : Written exam, morning, campus Johanneberg
Exam week : Loan equipment return (compulsory attendance)
Fri Mar 15 : Deadline - submission of project report
Wed Apr 3 : Deadline - approval of project report (final lab grade given)

Examination

The student is evaluated through a final written exam (4.5 hec) and a compulsory laboratory assignment (3.0 hec).

The final grade, according to the scale Fail (U) or Pass (3, 4, 5), is given based on the individual grades for the written exam and the laboratory assignment.

Permitted aids at the written exam are the standard authorised aids (pencils, erasers, rulers) and a Chalmers-approved calculator.

Additional information regarding the written exam can be found on the Examination page in Canvas.

Additional information regarding the laboratory assignment can be found on the Assignment page in Canvas.

Your progress regarding the different examination objectives can be viewed via the Modules menu in Canvas.

Course literature

(LEC) Lecture notes. Department of Computer Science and Engineering, Chalmers, 2024. Mandatory reading.
Can be downloaded from the Lectures and Exercises pages in Canvas.
(TXT) Selected texts from archival journals, conference proceedings and books. Not mandatory reading, but useful for gaining both deeper and broader topic knowledge.
Can be downloaded from the Lectures page in Canvas.
(EXC) Exercise compendium. Department of Computer Science and Engineering, Chalmers, 2012.
Can be downloaded from the Resources page in Canvas.
(LAB) Development tools and tutorials related to the laboratory assignment.
Can be downloaded from the Resources page in Canvas.

What's New?

Changes taking effect during spring 2024:

  • Following the current recommendations all teaching and examination will take place on-campus.
  • The number of course participants is restricted to 56 Chalmers students and 7 GU students.
    Students in the MPCSN, MPHPC, MPEES and MPSOF master programmes have priority to this course.
    Other students who fulfill the prerequisites are admitted if seats are available.

Changes from previous years:

  • The written exam has a new grading procedure, encompassing a Basic part and an Advanced part (since 2022).
  • The work with the laboratory assignment can be partly be done at home using loan equipment (since 2021).
  • The course web pages are hosted by the Canvas system (since 2019).
  • The laboratory sessions take place at the Lindholmen campus (since 2019).
  • The number of course participants from Chalmers/GU is restricted (since 2018).
  • The final grade is based on the grades for the 'Examination' and 'Laboratory' course elements (since 2018).
  • The 'Laboratory' course element (Chalmers) uses the grading scale U, 3, 4, 5 (since 2018). 
  • The 'Laboratory' course element (GU) uses the grading scale U, G, VG (since 2018).
  • The laboratory assignment uses new hardware and development software (since 2017).