Real Time Operating Systems (RTOS)

Description

Superior Embedded Systems Mind Map on Real Time Operating Systems (RTOS), created by Artur Assis on 11/07/2022.
Artur Assis
Mind Map by Artur Assis, updated more than 1 year ago
Artur Assis
Created by Artur Assis almost 3 years ago
1
0
1 2 3 4 5 (0)

Resource summary

Real Time Operating Systems (RTOS)
  1. Definition
    1. It is the software that is responsible for scheduling tasks, managing resources, and provide an abstraction layer for the application code development.
      1. Its kernel provides minimal logic, scheduler and resource management algorithms
        1. Kernel
    2. Board Support Package (BSP)
      1. The interface between RTOS and the hardware platform. It is a set of software drivers for specific hardware components. It has information about the hardware characteristics.
        1. It includes
          1. System scheduler timer configuration
            1. Hardware interrupt configuration
              1. Memory configuration (stack and heap)
                1. CPU configuration
                2. Hard to develop.
                  1. Requires knowledge of
                    1. Hardware
                      1. Assembly
                        1. Operating System
                      2. RTOS porting
                        1. Development process of BSP where an already developed BSP is used as a basis, where adaptations and new developments are carried out.
                      3. Scheduler
                        1. It is the algorithm that decides which entity or task will run and when it will run.
                          1. Schedulable entities
                            1. They are kernel object that competes for an execution time in the system, based on a predefined scheduling algorithm. Ex. processes or tasks.
                          2. Context switching
                            1. What does CONTEXT mean?
                              1. State of the CPU required each time the task is scheduled to run.
                              2. A context switch occurs when the scheduler performs the swap on a processor from task A to task B
                                1. Task Control Block (TCB)
                                  1. is a data structure that the kernel maintains for storing task-specific data
                                    1. Steps
                                      1. 1. Kernel saves the context of task 1 in its respective TCB
                                        1. 2. Kernel loads the context information of task 2, which becomes the running task
                                          1. 3. Task 1 context remains frozen while task 2 is executed
                                            1. 4. If the scheduler needs to run task 1 again, it runs where it left off before the context switch
                                            2. Context switch Time
                                              1. Time taken by the scheduler to switch from one task to another. Should not be disregarded.
                                            3. Dispatcher
                                              1. Part of the scheduler responsible for executing the switch of contexts and changes in the execution flow
                                                1. Possible areas for control flow
                                                  1. Kernel
                                                    1. Interrupt service routine (ISR)
                                                      1. Application task
                                                      2. What happens when a task or ISR makes a system call?
                                                        1. Control flow is passed through kernel to perform the requested function and passed to task or ISR again.
                                                      3. Deadlines
                                                        1. Types
                                                          1. Hard
                                                            1. Soft
                                                            2. Maximum time a task must finish its execution completely, after being activated again.
                                                            3. Scheduling Algorithms (Scheduling policies)
                                                              1. Most common
                                                                1. Collaborative (non-preemptive)
                                                                  1. Cooperative Cyclic Executive (CCE)
                                                                    1. Performed through a loop of functions called cyclic executive. It is non-preemptive.
                                                                      1. Cyclic executive
                                                                        1. Non-preemptive (cooperative)
                                                                          1. No infinity loops
                                                                          2. Code example
                                                                            1. Temporal Aspect
                                                                          3. Fixed priority-based and preemptive
                                                                            1. Preemptive priority-based
                                                                              1. The task that gets the processor to run in it, considering any instant of time, is the highest priority task among the tasks in the “ready” state of the system. Priorities are fixed and defined during design time. If any task with higher priority (in relation to the current running task) enters the “ready” state, the kernel preempts the lower priority to this one with highest priority,
                                                                                1. Highest priority task executing
                                                                                  1. Priority
                                                                                    1. Fixed
                                                                                      1. Defined at design time (off line)
                                                                                      2. Preempts if higher priority task appears
                                                                                      3. Rate Monotonic (RM)
                                                                                        1. Assumptions
                                                                                          1. 2. the tasks are independent and do not have intercommunication;
                                                                                            1. 3. the deadline of a task is the start of its next period (D = T);
                                                                                              1. 4. constant execution time for tasks;
                                                                                                1. 5. all tasks have the same criticality level;
                                                                                                  1. 1. all tasks are periodic;
                                                                                                    1. 6. aperiodic tasks are limited to initialization and some fault recovery mechanisms;
                                                                                                    2. The less the execution period, the higher the priority assigned to the task
                                                                                                      1. Processor Utilization Factor
                                                                                                        1. Theoretical limit of use
                                                                                                      2. Execution time-based and preemptive
                                                                                                        1. Round-Robin or Time Slicing
                                                                                                          1. Allocates an equal and predetermined time slice for tasks to run. Round-robin “alone” does not meet the requirements for real time systems, since tasks perform roles in different levels of importance. It can be used together with preemptive priority-based as tiebreaker between tasks with equal priorities in “ready” state
                                                                                                            1. Equal time slice
                                                                                                              1. Does not meet the real-time requirements alone
                                                                                                                1. Usid with preemptive priority-based.
                                                                                                              2. Dynamic priority-based and preemptive
                                                                                                                1. Earliest Deadline First (EDF)
                                                                                                                  1. It is a dynamic scheduling class algorithm. The lower the deadline, the higher the priority of the task.
                                                                                                                    1. Dynamic priorities (can change over time)
                                                                                                                      1. Lower deadline, higher priority.
                                                                                                                      2. Process utilization factor
                                                                                                                  2. Schedulability Analisys
                                                                                                                    1. 1. all tasks of the system can be scheduled to execute and fulfill their deadlines according to the scheduling algorithm used;
                                                                                                                      1. 2. still achieve optimal processor utilization
                                                                                                                        1. Only temporal requirements
                                                                                                                    2. Tasks
                                                                                                                      1. Computation performed by a processor in a sequential order. A system can be decomposed into multiple concurrent tasks.
                                                                                                                        1. Main states
                                                                                                                          1. Ready
                                                                                                                            1. Blocked
                                                                                                                              1. Running
                                                                                                                                1. Classification
                                                                                                                                  1. Periodic
                                                                                                                                    1. Aperiodic
                                                                                                                                    2. Multi-tasking system
                                                                                                                                      1. Operating system ability (or real-time frame) to manage various activities/tasks considering their deadlines.
                                                                                                                                        1. Implies
                                                                                                                                          1. CPU competition
                                                                                                                                            1. more than one task competing to be executed
                                                                                                                                              1. consideration of the scheduling algorithm and the real time model (hard, soft) used
                                                                                                                                            Show full summary Hide full summary

                                                                                                                                            0 comments

                                                                                                                                            There are no comments, be the first and leave one below:

                                                                                                                                            Similar

                                                                                                                                            American West - Key Dates
                                                                                                                                            Rachel I-J
                                                                                                                                            Biology AQA 3.1.5 The Biological basis of Heart Disease
                                                                                                                                            evie.daines
                                                                                                                                            English Grammatical Terminology
                                                                                                                                            Fionnghuala Malone
                                                                                                                                            Geography Coastal Zones Flashcards
                                                                                                                                            Zakiya Tabassum
                                                                                                                                            Apresentações em Inglês
                                                                                                                                            miminoma
                                                                                                                                            History of Psychology
                                                                                                                                            mia.rigby
                                                                                                                                            GCSE AQA Biology 1 Quiz
                                                                                                                                            Lilac Potato
                                                                                                                                            Physics 2
                                                                                                                                            Peter Hoskins
                                                                                                                                            Using GoConqr to learn German
                                                                                                                                            Sarah Egan
                                                                                                                                            New GCSE Maths required formulae
                                                                                                                                            Sarah Egan