Real-Time Operating Systems Programming
  • ondemand_video
       Video Length : 8h34m30s
  • format_list_bulleted
       Tasks Number : 55
  • group
       Students Enrolled : 223
  • equalizer
       Medium Level
  • Curriculum
  • 1. Introduction
    • videocam
      The tasks to do in this course
      11m26s
    • videocam
      Introduction to RTOS
      11m26s
    • videocam
      The common RTOS
      11m26s
    • videocam
      The concepts used in RTOS
      11m26s
  • 2. Tasking and Scheduling
    • videocam
      Introduction to Tasking
      11m26s
    • videocam
      The status of the task
      11m26s
    • videocam
      Create a new task
      11m26s
    • videocam
      The priority of the task
      11m26s
    • videocam
      Delete the task
      11m26s
    • videocam
      Scheduler for task
      11m26s
  • 3. Queue Management
    • videocam
      Introduction to Queue
      11m26s
    • videocam
      Using the queue
      11m26s
    • videocam
      Get the data into the queue
      11m26s
    • videocam
      Create a mailbox from the queue
      11m26s
  • 4. Timer Sofware Management
    • videocam
      Introduction to Timer Sofware
      11m26s
    • videocam
      Features and status of Timer Software
      11m26s
    • videocam
      The context of Timer Software
      11m26s
    • videocam
      Create a Timer Software
      11m26s
    • videocam
      Change the cycle of Timer Software
      11m26s
    • videocam
      Restart the Timer Software
      11m26s
  • 5. Interrupt Management
    • videocam
      Use RTOS in interrupts
      11m26s
    • videocam
      Delayed the interrupt
      11m26s
    • videocam
      Use Semaphore Binary
      11m26s
    • videocam
      Use queues in the interrupt
      11m26s
  • 6. Resource Management
    • videocam
      The need to manage resources
      11m26s
    • videocam
      Pause multitasking in critical situations
      11m26s
    • videocam
      Using Mutex
      11m26s
    • videocam
      Use Gatekeeper for tasks
      11m26s
  • 7. Events Management
    • videocam
      Introduction to Event
      11m26s
    • videocam
      Characteristics of an Event Group
      11m26s
    • videocam
      Using Event Groups
      11m26s
    • videocam
      Task Synchronization Using an Event Group
      11m26s
  • 8. Task Notifications
    • videocam
      Introduction to Task Notifications
      11m26s
    • videocam
      Benefits and Limitations
      11m26s
    • videocam
      Using Task Notifications
      11m26s
  • 9. Basic project: RTOS for MCUs
    • videocam
      How to use RTOS in Arduino
      11m26s
    • videocam
      Compile RTOS source code for MCU
      11m26s
    • videocam
      Programming of practical examples
      11m26s
    • videocam
      Programming RTOS for Atmega AVR
      11m26s
    • videocam
      Programming RTOS for Microchip PIC
      11m26s
  • 10. Advanced Project: RTOS for 32-bit ARM
    • videocam
      Introduction to STM32F4xx ARM Cortex-M4
      11m26s
    • videocam
      Install tools and software RTOS
      11m26s
    • videocam
      Programming examples for STM32F4xx
      11m26s
    • videocam
      Introduction to NXP ARM Cortex M3
      11m26s
    • videocam
      Programming examples for NXP ARM Cortex M3
      11m26s
Authors

Kevin Gautama is a systems design and programming engineer with 16 years of expertise in the fields of electrical and electronics and information technology.

He teaches at the Hanoi University of Industry in the period 2003-2011 and he has a certificate of vocational training by the Ministry of Industry and Commerce and the Hanoi University of Industry.

From extensive design experience through numerous engineering projects, the author founded the Enziin Academy.

The Enziin Academy is a startup in the field of educational, it's core goal is to training design engineers in the fields technology related.

The Enziin Academy is headquartered in Stockholm-Sweden with an orientation operating multi-lingual and global.

The author's skills in IT:

  • Implementing the application infrastructure on Amazon's cloud computing platform.
  • Linux server system administration (Sysadmin).
  • Design load balancing and content distribution system.
  • MySQL database administration.
  • C/C++/C# Programming
  • Ruby and Ruby on Rails Programming
  • Python and Django Programming
  • The WPF/C# on the .NET Framework Programming
  • The PHP/JAVA Programming
  • Machine Learning and Expert System.
  • Internet of Things.

The author's skills in the fields of electric and electronic:

  • The design of popular CPU / MCU systems.
  • Design FPGA / CPLD system (Xilinx - Altera).
  • Design and programming of DSP systems (Texas Instruments).
  • Embedded ARM system design.
  • The RTOS Programming
  • Design and programming electronic power systems.
  • PLC - inverter - sensor - electric control cabinet industrial.
  • Control systems distributed connection with Server.

Read more...

Real-Time Operating Systems Programming


A real-time operating system (RTOS) is an operating system intended to serve real-time applications that process data as it comes in, typically without buffer delays.

Processing time requirements are measured in tenths of seconds or shorter increments of time. A real time system is a time bound system which has well defined fixed time constraints.

Processing must be done within the defined constraints or the system will fail. They either are event driven or time sharing. Event driven systems switch between tasks based on their priorities while time sharing systems switch the task based on clock interrupts.

A key characteristic of an RTOS is the level of its consistency concerning the amount of time it takes to accept and complete an application's task; the variability is jitter.

A hard real-time operating system has less jitter than a soft real-time operating system. The chief design goal is not high throughput, but rather a guarantee of a soft or hard performance category.

An RTOS that can usually or generally meet a deadline is a soft real-time OS, but if it can meet a deadline deterministically it is a hard real-time OS.

An RTOS has an advanced algorithm for scheduling. Scheduler flexibility enables a wider, computer-system orchestration of process priorities, but a real-time OS is more frequently dedicated to a narrow set of applications.

Key factors in a real-time OS are minimal interrupt latency and minimal thread switching latency; a real-time OS is valued more for how quickly or how predictably it can respond than for the amount of work it can perform in a given period of time.

See the comparison of real-time operating systems for a comprehensive list. Also, see the list of operating systems for all types of operating systems.

Design philosophies

The most common designs are

  • Event-driven – switches tasks only when an event of higher priority needs servicing, called preemptive priority, or priority scheduling.
  • Time-sharing – switches tasks on a regular clocked interrupt, and on events, called round robin.

Time sharing designs switch tasks more often than strictly needed, but give smoother multitasking, giving the illusion that a process or user has sole use of a machine.

Early CPU designs needed many cycles to switch tasks during which the CPU could do nothing else useful. For example, with a 20 MHz 68000 processor, task switch times are roughly 20 microseconds.

Because of this, early OSes tried to minimize wasting CPU time by avoiding unnecessary task switching.

Scheduling

In typical designs, a task has three states:

  • Running executing on the CPU
  • Ready to be executed
  • Blocked waiting for an event, I/O for example

Most tasks are blocked or ready most of the time because generally only one task can run at a time per CPU. The number of items in the ready queue can vary greatly, depending on the number of tasks the system needs to perform and the type of scheduler that the system uses.

On simpler non-preemptive but still multitasking systems, a task has to give up its time on the CPU to other tasks, which can cause the ready queue to have a greater number of overall tasks in the ready to be executed state.

Table of Content

1. Introduction

  • The tasks to do in this course
  • Introduction to RTOS
  • The common RTOS
  • The concepts used in RTOS

2. Tasking and Scheduling

  • Introduction to Tasking
  • The status of the task
  • Create a new task
  • The priority of the task
  • Delete the task
  • Scheduler for task

3. Queue Management

  • Introduction to Queue
  • Using the queue
  • Get the data into the queue
  • Create a mailbox from the queue

4. Timer Sofware Management

  • Introduction to Timer Sofware
  • Features and status of Timer Software
  • The context of Timer Software
  • Create a Timer Software
  • Change the cycle of Timer Software
  • Restart the Timer Software

5. Interrupt Management

  • Use RTOS in interrupts
  • Delayed the interrupt
  • Use Semaphore Binary
  • Use queues in the interrupt

6. Resource Management

  • The need to manage resources
  • Pause multitasking in critical situations
  • Using Mutex
  • Use Gatekeeper for tasks

7. Events Management

  • Introduction to Event
  • Characteristics of an Event Group
  • Using Event Groups
  • Task Synchronization Using an Event Group

8. Task Notifications

  • Introduction to Task Notifications
  • Benefits and Limitations
  • Using Task Notifications

9. Basic project: RTOS for MCUs

  • How to use RTOS in Arduino
  • Compile RTOS source code for MCU
  • Programming of practical examples
  • Programming RTOS for Atmega AVR
  • Programming RTOS for Microchip PIC

10. Advanced Project: RTOS for 32-bit ARM MCU

  • Introduction to STM32F4xx ARM Cortex-M4
  • Install tools and software RTOS
  • Programming examples for STM32F4xx
  • Introduction to NXP ARM Cortex M3
  • Programming examples for NXP ARM Cortex M3