Real-Time Systems

Credits
6
Types
Specialization complementary (Computer Engineering)
Requirements
  • Prerequisite: CI
  • Prerequisite: SO
Department
ESAII
A system is called real-time when it interacts with the real world (physical process) within temporal requirements. In a Real Time System (RTS) the answer must not only be correct but must arrive at the right time or the system is considered to have failed. This is the case of the activation of the airbag or ABS in a car to give two critical examples, but also that of a robot that has to catch a ball in flight. At the end of the course the student will understand the difference between a fast and a real time system, as well as the distinction between a hard, soft or critical real time system. He will know how to analyze, design and implement systems based on microcomputers with requirements of time criticality, reliability and cost.

Teachers

Person in charge

  • Antonio Camacho Santiago ( )

Others

  • Enric X. Martin Rull ( )
  • Joan Aranda López ( )
  • Joan Climent Vilaró ( )
  • Manuel Vinagre Ruiz ( )

Weekly hours

Theory
1
Problems
1
Laboratory
2
Guided learning
0.4
Autonomous learning
5.6

Competences

Technical Competences

Common technical competencies

  • CT5 - To analyse, design, build and maintain applications in a robust, secure and efficient way, choosing the most adequate paradigm and programming languages.
    • CT5.6 - To demonstrate knowledge and capacity to apply the fundamental principles and basic techniques of parallel, concurrent, distributed and real-time programming.

Transversal Competences

Reasoning

  • G9 [Avaluable] - Capacity of critical, logical and mathematical reasoning. Capacity to solve problems in her study area. Abstraction capacity: capacity to create and use models that reflect real situations. Capacity to design and perform simple experiments and analyse and interpret its results. Analysis, synthesis and evaluation capacity.
    • G9.3 - Critical capacity, evaluation capacity.

Technical Competences of each Specialization

Computer engineering specialization

  • CEC1 - To design and build digital systems, including computers, systems based on microprocessors and communications systems.
    • CEC1.1 - To design a system based on microprocessor/microcontroller.
  • CEC2 - To analyse and evaluate computer architectures including parallel and distributed platforms, and develop and optimize software for these platforms.
    • CEC2.3 - To develop and analyse software for systems based on microprocessors and its interfaces with users and other devices.
    • CEC2.5 - To design and implement operating systems.
  • CEC3 - To develop and analyse hardware and software for embedded and/or very low consumption systems.
    • CEC3.1 - To analyse, evaluate and select the most adequate hardware and software platform to support embedded and real-time applications.
    • CEC3.2 - To develop specific processors and embedded systems; to develop and optimize the software of these systems. 

Objectives

  1. To understand the concept of real-time system
    Related competences: G9.3, CEC3.1,
  2. To determine when to use a real-time system.
    Related competences: G9.3, CEC3.1, CT5.6,
  3. Clearly identify the need for online planning
    Related competences: G9.3, CEC3.1,
  4. To identify the need to use a RTS
    Related competences: G9.3, CEC3.2, CEC3.1,
  5. To plan a cyclical scheduler
    Related competences: CEC2.3, CEC3.2, CEC1.1, CT5.6,
  6. To understand the function of the stack in a microprocessor
    Related competences: CEC2.3, CEC3.2, CEC1.1, CT5.6,
  7. Disassemble a process from the stack of a microprocessor
    Related competences: CEC2.5, CEC3.2, CT5.6,
  8. Migrate a real-time operating system to a specific microprocessor
    Related competences: G9.3, CEC2.3, CEC2.5, CEC3.2, CEC1.1, CT5.6,
  9. To understand the time slots into a RTS to implement bandwidth servers
    Related competences: CEC2.5, CT5.6,
  10. To observe the advantages of using a RTS using examples
    Related competences: CEC2.3,

Contents

  1. Introduction to real-time systems
    Explanation of different examples in which the analysis and use of real-time techniques becomes essential
  2. Real-time systems "Passive" or without computing capability
    Examples of real-time systems that do not have computing capability to be able to solve possible concurrency problems. - Real-time networks
    - elevators
    - batteries
    - Crossroads or train tracks
    - Other examples that broaden the student's vision
    - Optimal planning
  3. Active real-time systems, or with computing capability
    Online scheduling and preemption.
    -Optimal Schedulers
    -Rate Monotonic
    -Deadline Monotonic
    -Earliest Deadline First
  4. Implementation of an RTOS in a microprocessor
    Details to consider when migrating or deploying a real-time operating system on a microprocessor
  5. High level systems. Bandwidth servers
    Implementation of bandwidth servers
  6. Multi-core in real-time systems
    Introduction to real-time systems in systems with more than one microcontroller

Activities

Activity Evaluation act


I can't I solve this problem?

This activity will highlight the advantages and disadvantages of scheduling concurrent tasks without prior planning. Specifically a problem will be selected and solved (as far as possible), throughout the solution we will see how RTS techniques appear naturally.
Objectives: 4 1
Contents:
Theory
1.5h
Problems
1h
Laboratory
3h
Guided learning
0h
Autonomous learning
1h

Cyclic scheduler and the difficulties of planning by hand.

The easiest way to schedule a set of tasks is to use cyclic planning, but is this the best solution from a design point of view?. In this activity we will highlight the difficulties we may encounter in generating a cyclical executive. In this same activity we will highlight some needs for the use of a RTOS.
Objectives: 4 5 2 3
Contents:
Theory
2.5h
Problems
1.5h
Laboratory
6h
Guided learning
0h
Autonomous learning
4h

Introduction to arduino, the platform for the rest of the course

Activity aimed at introducing the student to the secrets of arduino. This will be the platform we will use for the rest of the course.
Objectives: 6
Contents:
Theory
1h
Problems
0h
Laboratory
3h
Guided learning
2h
Autonomous learning
5h

Remove a task from the runtime stack and relocate it. Introduction to RTOS

In this activity we will suspend the execution of a process and completely remove it from the execution stack. We will then reinsert it into the stack and restart execution at the point where we left it. In this way we open the door to understand the operation of the RTOS suspend/resume task state
Objectives: 6 7
Contents:
Theory
2h
Problems
1h
Laboratory
5h
Guided learning
0h
Autonomous learning
10h

FreeRTOS, a RTOS for multiple architectures. Migration of an RTOS on the Arduino Mega.

In this activity we will open, analyze, and understand a RTOS .
Objectives: 8
Contents:
Theory
3h
Problems
2h
Laboratory
8h
Guided learning
0h
Autonomous learning
39h

Examples of application: control of a DC motor

In this activity we will take a classic example of control, controlling a DC motor and see how using an RTOS significantly simplifies implementation and maintenance.
Objectives: 10
Contents:
Theory
0h
Problems
0h
Laboratory
4h
Guided learning
0.5h
Autonomous learning
2h

Band servers

In this activity we will see the ways in which it is possible to implement a bandwidth server on a built-in device such as arduino
Objectives: 9
Contents:
Theory
3h
Problems
0h
Laboratory
0h
Guided learning
0h
Autonomous learning
0h

Knowledge test

Knowledge test
Objectives: 4 5 6 7 8 9 10
Week: 2
Type: assigment
Theory
0h
Problems
0h
Laboratory
0h
Guided learning
0.5h
Autonomous learning
5h

Knowledge test

Knowledge test

Week: 6
Type: assigment
Theory
0h
Problems
0h
Laboratory
0h
Guided learning
0.5h
Autonomous learning
5h

Knowledge test

Knowledge test

Week: 8
Type: assigment
Theory
0h
Problems
0h
Laboratory
0h
Guided learning
0.5h
Autonomous learning
5h

Knowledge test

Knowledge test

Week: 14
Type: assigment
Theory
0h
Problems
0h
Laboratory
0h
Guided learning
0.5h
Autonomous learning
5h

Mini-project

Brief research work, implementation, deepening, ... related to the RTS

Theory
0h
Problems
0h
Laboratory
6h
Guided learning
5h
Autonomous learning
6h

Teaching methodology

The teaching methodology will be of a deductive nature. The approach will always be the same:
- propose a problem
- try to solve it
- add the necessary pieces of theory to be able to solve properly

The teaching laboratory of the department at the FIB will be the place where both practice and theory are developed.

Evaluation methodology

The evaluation of the subject will be done by means of exams, laboratory practices and mini-project, being able to pass the subject without having to do a final exam. The evaluation is done as follows:
- Theory 50%
- Lab practices 25%
- Mini-project 25%

Theory: there will be two online exams, CT1 and CT2, each counting 25% (on the overall grade of the subject)
Laboratory practices: there will be several deliveries, each counting equally on the overall grade of the subject
Mini-project: a brief and free choice work will be developed to delve into some aspect related to real-time systems

The final NF grade will be:
NF = CT1 (25%) + CT2 (25%) + PR (25%) + MP (25%)

Competence "G9.3 - Critical ability, assessment ability" will be assessed based on the tasks performed in the theory and problem classes, as well as on the tasks performed in the laboratory practices. In any case it has no weight in the final note of the subject.

Bibliography

Basic:

Previous capacities

regarding Designing Microcomputer Based Systems:
Understand the structure of microcomputers, their assembly language and their input interface management capabilities

regarding Operating Systems:
Know the basics of process management, memory management and input / output.