O'Reilly logo

Making Embedded Systems by Elecia White

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Managing the Flow of Activity

In Chapter 2, we looked at different ways to break up a system into manageable chunks. That chapter described the what and why of design; this chapter covers the how. Once you’ve identified the pieces, getting them all to work together as a system can be daunting.

Scheduling and Operating System Basics

Structuring an embedded system without an operating system requires an understanding of some of the things that an operating system can do for you. I’m only going to give brief highlights; if any of this first section is brand new to you, you may want to review a book about operating systems (see Further Reading).

Tasks

When you turn on your computer, if you are like me, you load up the email program, web browser, and compiler. Several other programs start automatically (such as my instant message client). Each of these programs runs on the computer, seemingly in parallel, even if you have only one processor.

Warning

Three words that mean slightly different things, but that overlap extensively, are sometimes used interchangeably. A task is something the processor does. A thread is a task plus some overhead, such as memory. A process typically is a complete unit of execution with its own memory space, usually compiled separately from other processes. I’m focusing on tasks; threads and processes generally imply an operating system.

The operating system you are running has a scheduler that does the switching between processes (or threads), allowing each ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required