Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 21

Réseaux Informatiques et Systèmes Embarqués (MRISE)

PRESENTATION N°10
RTOS

Presented By: Supervised By:


Mehdi AMMOU Mr. Abdelbaki. El Belrhiti El Alaoui

1
SUMMARY
1. DEFINITION OF RTOS
2. TASK CHARACTERISTICS
3. CLASSIFICATION OF SCHEDULING
ALGORITHMS

2
1. DEFINITION OF RTOS
REAL TIME OPERATING SYSTEM (RTOS)
IS A TYPE OF OPERATING SYSTEM USED IN EMBEDDED SYSTEMS.
GENERAL PURPOSE OS SUCH AS WINDOWS TRIES TO MAINTAIN THE PC
RESPONSIVE TO THE USER.
HOWEVER AN RTOS GUARANTEE PREDICTABLE EXECUTION OF
THE TASKS.
RTOS SYSTEM COMPLETES TASKS WITHIN THE DEADLINE IN A
PREDICTABLE MANNER.
3
HENCE, SAFETY CRITICAL AND MISSION CRITICAL
EMBEDDED SYSTEMS USE THIS TYPE OF OPERATING
SYSTEMS. SIMILARLY, IT HAS VERY LESS MEMORY
FOOTPRINT WHEN COMPARED WITH A GENERAL
PURPOSE OS.

4
1. PREEMPTIVE MULTITASKING DESIGN PARADIGM
FOR MORE COMPLEX REAL-TIME APPLICATIONS, ESPECIALLY THOSE WITH A CODE BASE THAT
IS PROGRESSIVELY ENHANCED WITH EACH RELEASE, THE PREEMPTIVE MULTITASKING
DESIGN PARADIGM IS SUPERIOR.
THIS DESIGN PARADIGM MAKES RESPONSE TIMES TO EACH REAL-TIME EVENT RELATIVELY
INDEPENDENT OF EACH OTHER. AS A RESULT, NEW FUNCTIONS CAN BE ADDED WITHOUT
DISRUPTING EXISTING HARD REAL-TIME ONES.

5
2. MANAGE COMPLEXITY

YOUR PROJECT BECOMES MORE MANAGEABLE IF IT IS DECOMPOSED INTO INDEPENDENT THREADS OR PROCESSES WHILE USING
OS SERVICES SUCH AS MESSAGE QUEUES, MUTEXES, SEMAPHORES, AND EVENT FLAGS TO COMMUNICATE AND SYNCHRONIZE.

6
3. MORE EFFICIENT USE OF CPU RESOURCES WHILE MANAGING
THE POWER

THE POWER CONSUMPTION PROFILE IS CONTROLLED BY THE PERIODIC EXIT


AND THEN RE-ENTERS TO THE LOW POWER STATE TO PROCESS TICK
INTERRUPTS. FURTHERMORE, IF THE FREQUENCY OF THE TICK INTERRUPT IS
TOO HIGH, THE ENERGY AND TIME CONSUMED ENTERING AND THEN EXITING
A LOW POWER STATE FOR EVERY TICK WILL OUTWEIGH ANY POTENTIAL
POWER SAVING GAINS

7
3. MORE EFFICIENT USE OF CPU RESOURCES WHILE MANAGING
THE POWER

8
DIFFERENT KINDS OF RTOS AVAILABLE FOR
DEVELOPERS

9
HARD REAL TIME:

IN HARD RTOS, THE DEADLINE IS HANDLED VERY STRICTLY. THIS MEANS THAT A GIVEN TASK MUST START EXECUTING AT A SPECIFIED, SCHEDULED TIME, AND MUST BE COMPLETED
WITHIN THE ASSIGNED TIME DURATION. (MEDICAL CRITICAL CARE SYSTEM, AIRCRAFT SYSTEMS, ETC.)

10
FIRM REAL TIME:

 THIS TYPE OF RTOS ALSO NEEDS TO FOLLOW DEADLINES. HOWEVER, MISSING A DEADLINE
MAY NOT HAVE A BIG IMPACT BUT COULD CAUSE UNDESIRED EFFECTS, LIKE A HUGE
REDUCTION IN THE QUALITY OF A PRODUCT. (VARIOUS TYPES OF MULTIMEDIA
APPLICATIONS.)

11
SOFT REAL TIME

ACCEPTS SOME DELAYS FROM THE OPERATING SYSTEM. IN THIS TYPE OF RTOS, THERE IS A
DEADLINE ASSIGNED FOR A SPECIFIC JOB, BUT A DELAY FOR A SMALL AMOUNT OF TIME IS
ACCEPTABLE. SO, DEADLINES ARE HANDLED SOFTLY BY THIS TYPE OF RTOS. (ONLINE
TRANSACTION SYSTEM AND LIVESTOCK PRICE QUOTATION SYSTEMS FOR EXAMPLE)

12
 FOR EXAMPLE,

IN A MISSILE TRACKING SYSTEM, IF THE MISSILE IS DELAYED, IT MAY MISS ITS INTENDED
TARGET.
THE TIMING CONSTRAINTS IN A SOFT REAL-TIME SYSTEM ARE NOT AS STRINGENT.
THE RESULT OF A CALCULATION CAN STILL BE USEFUL IF IT DOES NOT MEET ITS TIMING
DEADLINE. AUDIO STREAMING IS AN EXAMPLE OF A SOFT REAL-TIME SYSTEM. IF A PACKET
OF DATA IS LATE OR LOST, THE QUALITY OF THE AUDIO IS DEGRADED, BUT THE STREAM MAY
STILL BE AUDIBLE.

13
Standards

RTOS can comply with rigorous standards

The POSIX standard is the reference in this area

• POSIX comes from the UNIX world.

• The POSIX 1003.1b standard covers aspects


standardization of interfaces and services for real-time applications. There
are others (1003.1d, 1003.1j), but are not used.

14
CLASSIFICATION OF
SCHEDULING ALGORITHMS:
with hard or soft constraints
✓ Strict: No tolerance for timing faults.
Preemptive or non-preemptive. A preemptive scheduler:
✔ Allows the execution of a task to be interrupted in favor of another with higher
priority. The interrupted task changes to the ready state.
✓ Requires tasks to be preemptible.
✔ Non-preemptive algorithm can induce temporal faults that preemptive could
avoid.
Centralized or Distributed
✓ Distributed: A local scheduler at each site plus, possibly, a global scheduler in
charge of making them collaborate.

15
Classification of scheduling algorithms :
offline or online (with or without preemption)
✓ Offline scheduling:
❖ Task processing sequence is known before execution.
❖ Requires the establishment of rules that impose an order a
priori → Control of all the parameters !!!).
Very effective, but static.
Solution to manage periodic tasks, for example.
✔ Online scheduling:
Decides at any time which task to perform.

16
A scheduler is offline
if the scheduling decisions are made prior to the running
of the system. A table is generated that contains the
necessary scheduling decisions for use during the run-
time.An online scheduler makes scheduling decisions
during the run-time of the system. It can be either static
or dynamic. The decisions are based on both process
characteristics and the current state of the system.

17
Fig. 2.3 Real-time tasks characterization.

Real-time tasks characterization. 18


Tasks Classification

Tasks are classified according to


three axes. Periodic
Aperiodic
Sporadic tasks

19
Dependent/Independent tasks

In a typical real time systems, if tasks need to cooperate to


complete their missions we call them dependent tasks otherwise
they are called independent tasks.

20
RÉFÉRENCES:

HTTPS://WWW.FREERTOS.ORG/IMPLEMENTATION/A00008.HTML
HTTPS://ZERYNTH.COM/BLOG/WHAT-IS-RTOS-AND-WHY-YOU-SHOULD-USE-IT-FOR-YOUR-IOT-APPLICATIONS/#

HTTPS://BLOG.KNOLDUS.COM/OPENSOURCE-SOFTWARE-VS-FREE-SOFTWARE-VS-FREEWARE-SOFTWARE/#WHA
T-IS-FREE-SOFTWARE

HTTPS://WWW.EETIMES.COM/POSIX-IN-REAL-TIME/

HTTPS://NICOLAS.NAVET.EU/PUBLI/POSIX.PDF

21

You might also like