Top Down and From Scratch – A hybrid Approach of Teaching Real Time Embedded Operating System
Zhaohong Wang, Jing Guo · 2020
Abstract Embedded system design and implementation is a key component in the undergraduate computer engineering curriculum. In an era of mobile and ubiquitous computing, a competent embedded device should have a real-time operating system (RTOS) to make full use of its potentials and to accommodate task needs. Hence, it is not a surprise that real-time embedded system has a strong demand from industry. A good understanding of RTOS opens doors for many high-tech jobs for our students. Students would benefit a lot if they have the skill set of real-time embedded systems. However, teaching an RTOS course is really challenging. There are mainly two reasons. The first reason lies in the theoretical design of RTOS. An RTOS course is a highly comprehensive course that is built upon the knowledge of computer architecture, peripheral interfacing, and data structures. In addition to a rich set of pre-requisite knowledge, the design of RTOS involves key engineering ideas such as resource management, efficiency, and complexity. The second reason is the fast development of RTOS. Practically, there are quite a few commercial RTOS ready for use. Each of them has its strengths and weaknesses, depending on the specific application scenario. It becomes a difficult choice that which one is the best fit to our students. Learning a specific RTOS has the benefit of being able to utilize it immediately for projects. Nonetheless, the fast development and updates on the area of RTOS may cause the knowledge learned from one specific RTOS outdated in some time and not applicable to another RTOS. In this paper, we describe our innovative and effective way of teaching RTOS using a hybrid approach. To start with, we adopt the ARM Cortex-M and Cortex-A architectures, the most popular architectures in embedded systems. We then deploy a “top down” and “from scratch” hybrid approach to teach RTOS. The “top down” approach utilizes an existing RTOS from ARM itself, the Keil RTX. Teaching RTX introduces quickly how a real time application may be designed and implemented. It also introduces high level behaviors and design ideas of an RTOS. After learning RTX, students will be able to immediately apply it to their senior design projects. They have had a working knowledge of RTOS and become curious to learn why things work. Next, the “from scratch” approach addresses the question of why things work in RTOS. The “from scratch” approach teaches how a complete RTOS is built from scratch, i.e., from the very first line of code in assembly. Moreover, students will appreciate the many common design principles in RTOS that are not obvious in commercial RTOSes like RTX. Specifically, we described what components in RTOS are essential and built them from scratch. The “from scratch” part also addresses the observed problem in teaching the theoretical part of RTOS. In conclusion, a hybrid approach of teaching RTOS has proved to be effective in helping students master a ready-to-use RTOS for practice and prepare them a solid theoretical foundation to learn a new RTOS in the future.