The super loop programming paradigm is typically one of the first programming methods that an embedded systems engineer will encounter. A program implemented with a super loop has a single top-level loop that cycles through the various functions the system needs to perform. These simple while loops are easy to create and understand (when they are small). In FreeRTOS, tasks are very similar to super loops – the main difference is that the system can have more than one task, but only one super loop.
In this chapter, we will take a closer look at super loops and different ways of achieving a degree of parallelism with them. After that, a comparison between super loops and tasks will be made and a theoretical way of thinking about task execution will be introduced. Finally, we'll take a look at how tasks are actually executed with an RTOS kernel...