Jungletronics
Published in

Jungletronics

FreeRTOS — We are all Preemptive Scheduler!

Some Important Concept for Real-Time Operating System (RTOS) — IoT — Episode#03

Preemption— Basics types

In general, preemption means prior seizure-of. When the high priority task at that instance seizes the currently running task, it is known as preemptive scheduling.

Non-preemptive

A Non-preemptive queue system happens when a high priority packet waits for a low priority packet to be transmitted (or executed).

Fig 1. This is indicated for a printer spool, right? What is a printer spool? btw a printer spool is a software program in Microsoft Windows that is responsible for managing all print jobs currently being sent to the computer printer or print server. The print spooler program allows a user to delete a print job being processed or otherwise manage the print jobs currently waiting to be printed

Preemptive

A Preemptive queue system exists when a high priority packet does not have to wait, ie even when a low priority packet is already willing or in the process of transmission, it will be interrupted and put on hold condition while the high priority packet is handled. (this is how our world works, right? think about when a cell rings in the middle of a chatting…)

Fig 2. This is what happens when you are in a chat with a colleague and the cellular ring :/ you are Task 1, the caller is Task 2 :/

Politics

Fine, now related to the Scheduling Behavior in Real-Time Operating Systems there are two most used politics: FIFO and Round Robin.

Fig 3. Non-preemptive scheduler (this happens in a bank queue, for example, seniors have priority over pregnant women over young people and so on). This is a non-preemptive system queue.

Round Robin

Fig 4. This happens only on The ShareWood forest :). This is a preemptive system queue.

IoT Episodes Posts:

1° Episode — IoT — Meet IoT Boards: ESP8266 & ESP32 — Which are the best? ESPs or RPis or Arduinos Boards?

References & Credits & Recommended Posts:

--

--

J of Jungle + 3 Plats Arduino/RPi/Pic = J3

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
J3

Hi, Guys o/ I am J3! I am just a hobby-dev, playing around with Python, Django, Lego, Arduino, Raspy, PIC, AI… Welcome! Join us!