Skip to content
0:00 / 0:00

#rtos#ratemonotonicscheduling#preemptivescheduling

#26 RTOS Part-5: What is "real-time"? Preemptive, priority-based scheduling

Quantum Leaps, LLC

74K subscribers • 20 videos on Hallway

YouTube

Intermediate. Assumes working knowledge.

32K views8 years ago2 recommendations

Systems programmingOperating systemsEmbedded systemsConcurrency and parallelism

Miro Samek explains real-time scheduling concepts, focusing on preemptive, priority-based schedulers and Rate Monotonic Analysis.

In this fifth lesson on RTOS I'll finally address the real-time aspect in the "Real-Time Operating System" name. Specifically, in this lesson, you will augment the MiROS RTOS with a preemptive, priority-based scheduler, which can be mathematically proven to meet real-time deadlines under certain conditions. Articles mentioned in the lesson: --------------------------------- C.L.Liu and James W. Layland "Scheduling Algorithms for Multiprogramming in Hard-Real-Time Environment" January 1973Journal of the ACM 20(1):46-61 researchgate.net/publication/220431427_Scheduling_Algorithms… Lui Sha Mark H. Klein John B. Goodenough "Rate Monotonic Analysis for Real-Time Systems" Technical Report CMU/SEI-91-TR-6 ESD-91-TR-6 www2.informatik.uni-stuttgart.de/iste/ps/AdaBasis/pal_1195/a… ------ Resources: Companion web page for this video course: state-machine.com/quickstart GitHub repository for projects for this video course: github.com/QuantumLeaps/modern-embedded-programming-course Transcript of this lesson: state-machine.com/course/lesson26.txt Music credits: The background music comes from: bensound.com/royalty-free-music/track/straight

Why it's here

2 people recommend this

What people say. Recommended for understanding hard real-time constraints, scheduling algorithms, and Rate Monotonic Analysis.

u/active-objectin r/embedded • Recommends

On “Why rate monotonic algorithm can only be applied to a rtos, while in bare-metal programming interrupts have priorities and can also preempt each other?”

…xample, the so called "basic tasks" of the automotive OSEK/VDX specification cannot block in the middle, but still, they can preempt each other. Such "basic tasks" all run on a single stack. Finally, if you would like to learn more about RMS/RMA, I would recommend my video on YouTube "What is "real-time"? Preemptive, priority-based scheduling": [video…

u/active-objectin r/embedded • Recommends

On “Any good RTOS learning material out there?”

There is an in-depth RTOS course on YouTube. This hands-on course is based on the ARM Cortex-M processor and contains 7 videos about 30 minutes each: 1. Part-1: shows how to switch among multiple "superloops" on a single CPU and introduces the concept of the context switch 2. Part-2: shows how to automate the context switch and starts to build a small RTOS kernel 3. Part-3: shows how to automate the scheduling process and adds round-robin scheduling to the the RTOS kernel 4. Part-4: shows how to replace the inefficient busy-waiting (time delay) with efficient \*blocking\* and introduces the concept of thread states and the idle thread 5. Part-5: explains what "real-time" means a…

u/active-objectin r/embedded • Recommends

On “Determining if the application meets real time constraints”

You need to learn the basic concepts behind the Rate Monotonic Scheduling (RMS) also known as Rate Monotonic Analysis (RMA). These concepts are CPU utilization, real-time deadlines, priority-based preemptive scheduling, utilization bound, etc. There is a YouTube video about this "What is real-time? Preemptive priority-based scheduling"

u/FnxQT_in r/embedded • Recommends

On “Hard real-time & scheduling”

Thanks, will give it a go. EDIT : for anyone interested this video @\~24:00 explains a lot of what I was searching for. What algorithms is the best for hard real-time scheduling and how researchers came at this conclusion. The author even pointed to papers. Thank you !

u/active-objectin r/embedded • Recommends

On “How to deal with fast control loops in a RTOS environment?”

Preemptive, single-stack, run-to-completion kernels are not much known outside the automotive domain (look for OSEK/VDX kernel specification and "basic tasks" in particular). And no, such kernels are NOT cooperative, and in fact are fully compliant with the requirements of Rate Monotonic Scheduling (RMS), also known as RM Analysis (RMA). I agree with KenaDra that such a kernel would be ideal for fast control loops and hard real-time requirements, so the OP should definitely take a look. Specifically for STM32 (ARM Cortex-M), there are some **hardware implementations** of such kernels that take advantage of the NVIC. An example is the SST for ARM Cortex-M. This kernel will outperform any…

u/active-objectin r/embedded • Recommends

On “What is the rationale behind 2ms, 5ms, 10ms, etc... tasks? (RTOS)”

…with shortest periods. The method then can guarantee that all tasks will meet their deadlines under the specific CPU utilization conditions. This is the main reason why most RTOSes to this day support priority-based scheduling. If you wish to learn more about real-time systems and the RMA/RMS, you can check out the YouTube video "RTOS part-5" at [video…

u/active-objectin r/embedded • Recommends

On “Hard real-time & scheduling”

A good starting point for understanding what "(hard) real time" means and the basic techniques like the RMS/RMA (Rate-Monotonic Scheduling/Analysis) are explained in the YouTube video: "RTOS part-5: Real-Time".