Asee peer logo

A Simple Multitasking Library For Student Projects And Introducing Embedded Operating Systems Principles

Download Paper |

Conference

2007 Annual Conference & Exposition

Location

Honolulu, Hawaii

Publication Date

June 24, 2007

Start Date

June 24, 2007

End Date

June 27, 2007

ISSN

2153-5965

Conference Session

Embedded Computing

Tagged Division

Computers in Education

Page Count

11

Page Numbers

12.111.1 - 12.111.11

DOI

10.18260/1-2--1992

Permanent URL

https://peer.asee.org/1992

Download Count

1633

Request a correction

Paper Authors

biography

Jonathan Hill University of Hartford

visit author page

Dr. Jonathan Hill is an assistant professor in the College of Engineering, Technology, and Architecture (CETA) at the University of Hartford, Connecticut (USA). Ph.D. and M.S. from Worcester Polytechnic Institute (WPI) and B.S. from Northeastern University. Previously an applications engineer with the Networks and Communications division of Digital Corporation. His interests involve embedded microprocessor based systems.

visit author page

Download Paper |

Abstract
NOTE: The first page of text has been automatically extracted and included below in lieu of an abstract

A Simple Multitasking Library for Student Projects and Introducing Embedded Operating Systems Principles

Abstract

The cxlib multitasking library is written for teaching embedded microprocessor principles to electrical and computer engineering students, serving as a stepping stone toward real time operating systems. The students also use cxlib in their projects. The library supports cooperative multitasking and a recent change allows for preemptive round-robin scheduling. The cxlib library was first written during the spring 2002 semester as the author surveyed the literature for material to use in a new course.

The intent of the cxlib library is to provide simple multitasking that students themselves can use to develop example intermediate systems. The library is intentionally Spartan, giving ample wiggle room for adding features or making significant architectural changes. The cxlib library is currently written for the Freescale 68HC12 microprocessor using the Metrowerks CodeWarrior tool chain, but it should be portable to other systems.

As a teaching tool, cxlib can be introduced in three hours of lecture time. In presenting cxlib there typically is a lively discussion regarding what is meant by context. The library is nearly transparent, helping students to see the workings of a context switch. Unlike a simple loop structure, cxlib provides a means to dynamically create and destroy tasks. Also cxlib can serve as a vehicle to introduce advanced concepts such as semaphores. The cxlib library is non- commercial open-source software.

Introduction

During the spring 2002 semester a new graduate level course in embedded microprocessor systems was developed for the Electrical and Computer Engineering Department at the University of Hartford. The type of operating system found in many small embedded systems is quite different from most desktop or modern operating systems. Rather than being an entity that is apart from the application, the operating system takes the form of a library that is part of the application. As pointed out by Silbershatz, Galvin, and Gagne1 such operating systems are often associated with so-called real-time operating systems. Some authors including Labrosse7 use the term executive to refer to such systems.

The cxlib library was written for the perceived a need for examples of intermediate systems using either cooperative multitasking or preemptive round-robin scheduling, sometimes called timesharing. As a teaching tool cxlib can be introduced in three hours of lecture time. The cxlib library is useful in three ways. First, it is an example that demonstrates topics present in nearly all operating systems. In particular the context switch which is demonstrated. Secondly, advanced topics such as semaphores and mailboxes are best understood in a given situation. The cxlib library allows students to study and modify such code, allowing for a deductive presentation. Finally, cxlib is a stepping stone leading toward real-time operating systems.

Hill, J. (2007, June), A Simple Multitasking Library For Student Projects And Introducing Embedded Operating Systems Principles Paper presented at 2007 Annual Conference & Exposition, Honolulu, Hawaii. 10.18260/1-2--1992

ASEE holds the copyright on this document. It may be read by the public free of charge. Authors may archive their work on personal websites or in institutional repositories with the following citation: © 2007 American Society for Engineering Education. Other scholars may excerpt or quote from these materials with the same citation. When excerpting or quoting from Conference Proceedings, authors should, in addition to noting the ASEE copyright, list all the original authors and their institutions and name the host city of the conference. - Last updated April 1, 2015