Radio Free Otto's implementation in the ESP 32. In this video, we will learn about free arctos and then we will learn some common terminologies used in free arctos. Later, we will look at the free arctos implementation in the ESP 32. And finally, we will show an example. to showcase the need of free Otto's most operating systems seem to allow multiple programs to run at the same time. This is known as multitasking.
But the truth is that processing core can only be running a single thread of execution at any given point in time. This illusion of simultaneous execution is done by a part of the operating system called the scheduler. The type of an operating system is determined by how the scheduler decides which program to run and when, for example, in the case of a GPOs like windows that should you live with Try and ensure the computer remains responsive to its users inputs. The scheduler in arctos is designed to provide deterministic execution pattern that is, the execution pattern should always be predictable. This is particularly of interest to embedded systems, as embedded systems often have real time requirements. A real time requirement is one that specifies that the embedded system must respond to a particular event within a strictly defined deadline.
A guarantee to meet real time requirements can only be made if the behavior of the operating systems scheduler can be predicted and is therefore deterministic. But most embedded systems are microcontrollers which are very resource constrained. Thus, a full arctos implementation is not feasible. This is where free autos come in. Free autos is a class of autos that is designed to be small enough to run on a microcontroller. It provides only the core functionality of an autos like real time scheduling, inter task communication, timing and synchronization.
Asset is a very bare bones version of Otto's free autos is more accurately described as free autos kernel. additional functionality, such as a command console interface, or networking stacks can be included with add on components. Pre Otto's has official support for more than 30 different embedded architectures. And as the icing on the cake, it is totally free and open source. It can even be used in a commercial application without any need for licensing. To understand different aspects of free Otto's implementation.
You need to first get your terminologies straight. Here are some of the common terminologies used in any RTS. Shed EULA. As its name suggests, it manages how and when a set of programmed instructions must be executed. thread. A thread is the smallest sequence of programmed instructions that can be managed independently by a shared Yola task.
It is a type of thread that can pause while waiting for an event to occur. interrupt service routine is our is a thread initiated by a hardware interrupt example a keyboard interrupt idle task. It is the lowest priority thread that only runs when no other thread is ready to execute. blocked a task is set to be blocked if it is waiting on resources and not consuming any of the CPU. The free arctos uses a shared user called a pre emptive scheduler with a pre emptive Scheduler. Running thread continues until either of the following conditions are calm.
The thread finishes execution. Like when an AI is a completes, a higher priority task becomes ready or when a thread gives up the processor. While waiting for a resource, you can check out the full listing of free arctos features by clicking the link in the resources. Now let's look at the free arctos implementation in the ESP 32. The original free arctos also is known as vanilla free Otto's is designed to run only on a single core. However, the ESP 32 is a dual core processor, which shares the same memory.
The cores are named core zero and core one respectively. Thus, expressive engineers modified the vanilla free Otto's TO GIVE IT support for symmetric multiprocessing also known as SMP. This allows the two cores to run tasks interchangeably between them. Thankfully, later, this was deeply integrated to ESP 32 Arduino core also, did you know that all our Arduino sketch actually runs as a single task on just a single core by default? Yes, you heard that right. We are wasting resources by not using the second goal.
You don't believe me? I will show you open up any of your ESP 32 Arduino sketches for simplicity purpose, I have opened a blink project. Now I will introduce you to a free Otto's function called expert get core ID. This function returns the core ID of the currently running task. This function doesn't have any parameters and the return type is an integer. Now add a serial dot print expert get core ID inside the void setup and void loop like this.
Now upload the sketch and open the serial monitor. Do you believe me now As I said, the whole code is running on the core one, the core zero is simply idling, doing nothing. This is just one of the few reasons why you should consider free arctos in the ESP 32. With three arctos you can take advantage of both the course concurrently. I showed you this example, as it is easier to understand summary. In this video we have covered the following topics.
What is reactos? Some common terminologies in free Otto's free Otto's in ESP 32 and why we needed in the next video, we will learn about tasks, queues and semaphores