o·s·o·pho·bi·a n. A common fear among embedded systems programmers.
Many embedded systems today incorporate an operating system. This can range from a small kernel to a full-featured operating system—typically called a real-time operating system or RTOS (pronounced “are-toss”). Either way, you’ll need to know what features are the most important and how they are used with the rest of your software. At the very least, you need to understand what a real-time operating system looks like on the outside. In this chapter, we take a detailed look at the mechanisms found in most operating systems and how to use them.
The information in this chapter is very general and does not include specific code examples. That’s because the features and APIs that implement the activities in this chapter are different on each operating system. Subsequent chapters show you what to do on Linux and eCos, two popular operating systems used in embedded environments.
In the early days of computing, there was no such thing as an operating system. Application programmers were completely responsible for controlling and monitoring the state of the processor and other hardware. In fact, the purpose of the first operating systems was to provide a virtual hardware platform that made application programs easier to write. To accomplish this goal, operating system developers needed only provide a loose collection of routines—much like a modern software library—for resetting ...