78810 - Real Time Systems for Automation M

Academic Year 2020/2021

  • Docente: Paolo Torroni
  • Credits: 12
  • SSD: ING-INF/05
  • Language: English

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

FOREWORD

This page contains information about three 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)
  • 90374 - Lab of Real-Time Operating Systems M for the Master's degree in Advanced Automotive Electronic Engineering (RTLab)

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.

RTLab is a 3-CFU lab course focussing on real-time system programming.

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 (Andrea Melis fall, 30 hours)
  • Modulo 1 - Real Time lectures/exercises (Paolo Torroni, spring, 30 hours)

RTLab is organized with frontal lectures and (mainly) project work to be largely carried out autonomously.

RTSA/Modulo 3 concides with RTOS/Modulo 1.

The RTLab frontal lectures concide with RTOS/Modulo 2.

COURSE CONTENTS

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. Design and implementation of a resource manager.

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

Basic concepts. 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 = RTLab frontal lectures)

RTSA/Modulo 1: Linux shell. POSIX programming, process/thread creation, communication and synchronization. Resource access monitor.

RTSA/Modulo 2: Workbench development environment. System viewer. Programming with kernel modules. Real-time periodic task scheduling. Synchronization issues and resource access protocols.

Real-Time Lab project work (RTLab)

Design and implementation of a simple project in VxWorks.

Readings/Bibliography

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 and RTLab: 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

RTSA

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.

RTOS

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).

RTLab

Evaluation (pass/fail) is based on a presentation and discussion of lab assignments and project work.

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 virtuale. 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 some cut-off dates (only applies to Linux lab assignments - VxWorks lab assignments can be submitted at any time).

Lab project for RTLab

Possible project work topics will be made available in spring in the virtuale course web site. There are no cut-off dates for projects.

Official registration of the final grade

RTSA: after passing both parts, the student receives 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.

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

RTOS Lab: after uploading the assignments and project work on the virtuale web site, the student should contact me to make an appointment for the project discussion. The grade is registered after the discussion.

Teaching tools

Relevant learning material will be made available via virtuale.

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 virtuale 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 develop and deploy their real-time applications.

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

The lab software (Linux and VxWorks) can also be installed on the student's own computer. In this way, lab work can be carried out autonomously, without having to access the lab. It will also be possible to connect to lab workstations from outside of the university campus, during lab lecture hours.

Office hours

See the website of Paolo Torroni

SDGs

Quality education

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