78810 - Real Time Systems for Automation M

Course Unit Page


This teaching activity contributes to the achievement of the Sustainable Development Goals of the UN 2030 Agenda.

Quality education

Academic Year 2019/2020

Learning outcomes

The course covers the fundamentals of modern real-time operating systems. Arguments that are addressed in the course are architecture, organization, and functionalities of modern operating systems, task management and resource allocation, mechanisms and tools for synchronisation and concurrent programming, characteristics of real-time operating systems and main scheduling algorithms for hard real-time periodic processes. A part of the course is also devoted to supervised lab activity, with a focus on Linux and RTAI. At the end of the course students master all the fundamental aspect of informatics that are instrumental for the design and control of automatic systems.

Course contents


This page contains information about two different courses:

  • 78810 - Real Time Systems for Automation M for the Master's degree in Automation Engineering (RTSA)
  • 85728 - Real-Time OS M for the Master's degree in Advanced Automotive Electronic Engineering (RTOS)

RTSA is a12-CFU stand-alone course, consisting of lectures, exercises and lab sessions (120 hours).

RTOS is a 6-CFU series of lectures and exercises (60 hours), which does not include any lab, and is half of a 12 CFU integrated course called HARDWARE-SOFTWARE DESIGN OF EMBEDDED SYSTEMS M I.C. The other half is called Architectures and Firmware and is held in spring by Luca Benini.

RTSA is held by Paolo Torroni and is organized in three modules:

  • Modulo 1 - Operating systems lectures/exercises and lab (fall, 78 hours)
  • Modulo 2 - Real Time lab (spring, 12 hours)
  • Modulo 3 - Real Time lectures/exercises (spring, 30 hours)

RTOS is held by two different lecturers and is organized in two modules:

  • Modulo 2 - Operating systems lectures/exercises (Marco Prandini, fall, 30 hours)
  • Modulo 1 - Real Time lectures/exercises (Paolo Torroni, spring, 30 hours)

RTSA/Modulo 3 concides with RTOS/Modulo 1.


Operating Systems (RTSA/Modulo 1)

Overview and system structures. Processes and threads. Scheduling. Memory management. I/O systems.

Basics of Concurrent Programming (RTSA/Modulo 1)

Process synchronisation and deadlocks. Software tools. Resource manager design and implementation.

Hard Real-Time Task Scheduling (RTSA/Modulo 3 = RTOS/Modulo 1)

Basic concepts. Scheduling anomalies. Aperiodic task scheduling. Clock-based and priority-based scheduling of periodic tasks. Resource access protocols.

Operating Systems Lab (RTSA/Modulo 1) and Real-Time Lab (RTSA/Modulo 2)

Linux shell. POSIX programming, process/thread creation, communication and synchronization. Resource access monitor. Workbench development environment. System viewer. Programming with kernel modules. Real-time periodic task scheduling. Synchronization issues and resource access protocols.

DISCLAIMER: the information provided here about course content, bibliography, teaching methods, etc., are the sole responsibility of the teaching staff. The course organization in modules, the odd numbering of modules, and the bizarre fact that the information regarding two different courses from two different degrees (RTSA and RTOS/Modulo 1) must share same web page, as well as the structure of such a web page, are not, in any way, the responsibility of the teaching staff.


RTSA/Modulo 1

  • Abraham Silberschatz, Peter B. Galvin, Greg Gagne. Operating System Concepts, 9th Edition. International Student Version. Wiley 2013. ISBN: 978-1-118-09375-7. Editions 8 or 10 are equally good.
    Chapters 1 — 9 & 13

RTSA/Modulo 3 and RTOS/Modulo 1

RTSA/Modulo 1 and RTSA/Modulo 2

All modules

  • Lecture slides, description of lab activies, software, past exams and all teaching material made available via the Insegnamenti On Line portal

Teaching methods

RTSA and RTOS: Presential lectures covering theory and exercises, meant to be highly interactive

RTSA only: Supervised lab sessions on Linux with POSIX programming. Real-time application development with Eclipse+CDT and VxWorks/Workbench. Deployment on virtual target or physical target such as BeagleBone or Rasberry Pi.

Assessment methods


The exam aims at assessing the student's knowledge and skills in the course topics and it consists of three independent parts:

  • Part I: Operating Systems and Process Synchronization
  • Part II: Real-Time Scheduling
  • Part III: RTSA Lab

There is a separate written exam for each of Part I and Part II. Part III is assessed by way of Lab assignments.

The results of either part do not have any impact on the results of the other parts, and the three parts can be taken in any order. The final grade is 90% from the written exams and 10% from the lab assignments.


Students from the AAEE degree only have to take Part II: Real-Time Scheduling, in the form of a written exam. No lab is required (but all interested students are welcome to attend and submit their assignments too, in exchange for a 10% extra bonus).

Written exams

The written exams consist of open questions and design/analysis exercises.

Optionally, students who have passed the written exam may request to take an oral exam. The oral exam may be on just one part of the exam, or on the whole syllabus. The impact of the oral exam is up to +/- 3 points on the final grade (if it is taken on just one part, it may have a smaller impact).

Lab assignments

Throughout the course, there will be programming exercises to be submitted, using personal accounts, via IOL. Students who cannot attend the lab can still work either from home (for the operating systems lab in spring, which uses free software) or from the lab whenever the lab is not occupied by other courses or exams, and submit their assignments any time before the cut-off dates.

There will be two/three cut-off dates per year.

Official registration of the final grade

RTSA: Once a student has passed all parts, the student will receive a communication with the final grade. Shortly afterwards such a grade is written on the official record, unless the student explicitly requests to take an oral exam.

It is not possible to retake a passed written exam indefinitely. Requests to retake successful written exams will be considered on a case-by-case basis. The grade obtained after an oral exam is always written on the official record.

RTOS: the official registration will be made after passing all three modules of the HARDWARE-SOFTWARE DESIGN OF EMBEDDED SYSTEMS M I.C..

Teaching tools

Relevant learning material will be made available via IOL.

Lecture slides will be made available before class. Annotated lecture slides will also be made available, containing the annotations taken by the lecturer during class, as well as some past exams, if available.

The IOL web site will also contain description of lab activities and information about assignments.

A significant part of the software used in the lab is open source. All software will be made available in the lab to students enrolled in this course, even outside of lab sessions, as far as lab resources permit.

In the lab, students can use the VxWorks development environment and physical target kits (BeagleBone Black boards plus accessories) to develp and deploy their real-time applications.

A limited number of copies of the adopted textbooks and other relevant textbooks are available at the library.

Office hours

See the website of Paolo Torroni