• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

ASEE Computers in Education Journal

ASEE's Computers in Education Journal

  • Current Issue (V14-I2)
    • On Building and Implementing Adaptive Learning Platform Lessons for Pre-Class Learning in a Flipped Course
    • PSpice Model of a Shunt DC Motor for Transient Performance Simulation and Its Use in Teaching
    • Mitigating Engineering Student Attrition by Implementing Arduino Activities Throughout Undergraduate Curricula
    • Enhancing Computer Science Education with Pair Programming and Problem Solving Studios
    • Collaborative Senior Design Capstone at Two Geographically Separated Universities
  • Vol. & Issues
  • About
  • Submissions
    • Submission Guidelines
    • Submission Site (2025+)
    • Re-submissions (Pre-2025)
  • Editorial Team
  • Recruitment

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

Paper Views 1,363
Written by -
|
Published on March 30, 2024
DOWNLOAD
DOI COMING SOON

Integrating Computer Science across Wyoming’s K-12 Curriculum from Inception to Implementation: Analysis Using Systems Theory

Frank Vahid ​✉ 1 , Bailey Miller 2 , Tony Givargis 3

1 Dept. of Computer Science & Engineering Univ. of California, Riverside, Riverside, CA, USA
2 zyBooks, Cambell, CA, USA
3 Dept. of Computer Science, Univ. of California, Irvine, Irvine, CA, USA

Abstract

Embedded systems often implement multiple concurrent tasks of varying priority through the use of a real-time operating system (RTOS). However, an RTOS may introduce overhead, complexity, and maintenance issues. For embedded system applications whose tasks don’t heavily compete with one another, an alternative approach is to write the tasks to be cooperative: For each call to the task, the task runs quickly, and then returns so other tasks can execute. For such cooperative tasks, a programmer may then write their own task scheduler in the application’s course code like C. However, no common approach exists, and thus embedded programmers sift through myriad online articles and examples, many of which discuss but do not provide scheduler code, provide code only for same-period cooperative tasks, or provide code that is rather complex to learn. To remedy this situation, we introduce scheduler code designed to be ultra-simple to learn and use for the most common cases of cooperative multitask applications. The scheduler code, called RIOS (Riverside/Irvine OS), is written in C but that can be implemented in languages like C++, Java, Python, Javascript, etc. RIOS can be copy-pasted directly into a project’s source code, and modified as desired. Via aggressive simplification over several years, the base scheduler code has fewer than 30 lines in C. We describe the core features of RIOS. We also summarize college class experiences with 70+ students showing most students could extend RIOS for various purposes, such as an extension to enable/disable any task (100% success among students), switch tasks between two periods (98% success), add a priority field and sort by priority (94% success), and calculate utilization and jitter (65-70% success). RIOS is used by dozens of universities to teach real-time software concepts to thousands of students, and is used by hundreds of embedded systems engineers in practice.

Keywords

RTOS, scheduler, cooperative tasks, multitasking, non-preemptive, education, source code, C

-
Website |  + papersBio ⮌
  • -
    https://coed.asee.org/author//
    Active Learning Undergraduate Course on UAV Path Planning and Tracking Using Numerical Simulation
  • -
    https://coed.asee.org/author//
    Using Active Learning to Connect Entrepreneurial Mindset to Software Engineering
  • -
    https://coed.asee.org/author//
    An Investigation into Peer-Assisted Learning in an Online Lab Environment
  • -
    https://coed.asee.org/author//
    Modeling COVID-19 disruptions via network mapping of the Common Core Mathematics Standards

Primary Sidebar

Recent Articles

  • On Building and Implementing Adaptive Learning Platform Lessons for Pre-Class Learning in a Flipped Course
  • PSpice Model of a Shunt DC Motor for Transient Performance Simulation and Its Use in Teaching
  • Collaborative Senior Design Capstone at Two Geographically Separated Universities
  • Enhancing Computer Science Education with Pair Programming and Problem Solving Studios
  • Mitigating Engineering Student Attrition by Implementing Arduino Activities Throughout Undergraduate Curricula
  • Active Learning Undergraduate Course on UAV Path Planning and Tracking Using Numerical Simulation

Copyright © 2025 American Society for Engineering Education. All rights reserved.