Development of coroutines usage model for cooperative multitasking implementation on the systems with limited resources

2021 
According to the growing complexity of tasks, which embedded systems should solve, there arises a need to use Real-Time Operation Systems (RTOS). However, RTOS usage and implementation require a set of restrictions for a system, especially on the memory usage and time delays occurrence. The available implementations of coroutines neither cross-platform solutions nor accessible without a third-party library. The article proposes a model of cross-platform coroutine usage from C +  + 20 for embedded systems programming and lightweight cooperative multitasking implementation. The proposed model contains the improved minimal scheduler without priorities mechanism and tasks descriptors. The model of coroutines usage for resource-constrained systems is developed. The task inside the model is presented as a coroutine, which can communicate with available coroutines, call them, or be suspended. Also, the minimal primitives of coroutines usage for cooperative multitasking, architecture decisions, and non-blocking data transmission were implemented. For the experimental research, the following list of program components was implemented in the proposed model: cooperative coroutines scheduler, tasks for data transmission, and awaitable type prototypes. The testing and analysis were completed on the chosen microcontroller (MCU). The perspective of coroutines usage on resource-constrained systems was shown in the research based on obtained results of FLASH and RAM consumption.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    4
    References
    0
    Citations
    NaN
    KQI
    []