Back to Search Start Over

RIOS: A Task Scheduler in Source Code for Teaching and Implementing Concurrent or Real-Time Software.

Authors :
Vahid, Frank
Givargis, Tony
Source :
Proceedings of the ASEE Annual Conference & Exposition. 2022, p1-14. 14p.
Publication Year :
2022

Abstract

We describe the design and decade-long use of an approach for executing concurrent tasks on a microprocessor without the need for a real-time operating system. We wrote a lightweight non-preemptive task scheduler, called RIOS. The task scheduler is written in C, but that can be implemented in languages like C++, Java, Python, Javascript, etc., rather than in assembly as is commonplace. As such, RIOS can be copy-pasted directly into a project's source code, and modified as desired. The scheduler code includes a structure to hold features of a periodic task like its period and elapsed time since previous execution, an array to hold all tasks, a technique for using a timer and interrupt-service routine (ISR) to keep time, and code to actually call each task at the appropriate time. We describe the core features of RIOS, and its successful usage in embedded systems courses, enabling students to build powerful concurrent-tasks systems correctly and quickly. Students can extend RIOS to further learn real-time concepts, such as including a deadline per task, or creating alternative scheduling algorithms such as rate monotonic, earliest-deadline-first scheduling, or round-robin scheduling. Students can also add functionality to analyze task execution behavior, such as calculating processor utilization or task jitter. As such, students can learn first-hand how the scheduler piece of a real-time operating system operates. Via aggressive code rewriting and minimization over several years, we reduce RIOS's entire code size to just a few dozen lines. RIOS is currently used by dozens of universities to teach real-time software concepts, reaching thousands of students per year. RIOS is also used by hundreds of practicing embedded systems engineers as well, resulting in faster implementation time and much smaller code size than the alternative of linking in a real-time operating system. RIOS is downloadable for free at https://www.cs.ucr.edu/~vahid/rios/. [ABSTRACT FROM AUTHOR]

Details

Language :
English
ISSN :
21535868
Database :
Academic Search Index
Journal :
Proceedings of the ASEE Annual Conference & Exposition
Publication Type :
Conference
Accession number :
172834296