Firmware-Specific Bug #8: Priority Inversion

A wide range of nasty things can go wrong when two or more tasks coordinate their work through, or otherwise share, a singleton resource such as a global data area, heap object, or peripheral’s register set. In the first part of this column, I described two of the most common problems in task-sharing scenarios: race […]

Read More

Firmware-Specific Bug #7: Deadlock

A deadlock is a circular dependency between two or more tasks. For example, if Task 1 has already acquired A and is blocked waiting for B while Task 2 has previously acquired B and is blocked waiting for A, neither task will awake. Circular dependencies can occur at several levels in the architecture of a […]

Read More

Upcoming Embedded Software Boot Camps

Earlier this week, Netrino announced the dates and locations for a pair of upcoming public sessions of the popular hands-on Embedded Software Boot Camp workshops.  The dates and locations will be as follows: March 14-18, 2011 near San Francisco, California May 16-20, 2011 near Baltimore, Maryland These will be the 9th and 10th times, respectively, that the Embedded Software […]

Read More

Get Your (RTOS Task and ISR) Priorities Straight!

Get your priorities straight!  Or suffer the consequence of missed deadlines.  Of course, I’m talking here about the relative priorities of your real-time tasks and interrupt service routines.  In my travels around the embedded design community, I have learned that most real-time systems are designed with ad hoc priorities. Unfortunately, mis-prioritized systems often “appear” to […]

Read More

RTOS without blocking?

In my previous post, “I hate RTOSes”, I have identified blocking as the main cause of the particular brittleness and inflexibility of the programs based on RTOSes. Here I’d like to discuss techniques of minimizing blocking and eradicating it completely from the application-level code. In other words, I’d like to show you how to use […]

Read More

3 Things Every Programmer Should Know About RMA

This post was originally posted in the wrong blog.  I’m reposting it here. Real-time systems design and RMA go together like peanut butter and jelly.  So why is it that wherever I go in the embedded community, engineers are developing real-time systems without applying RMA?  This is a dangerous situation, but one that is easily […]

Read More

I hate RTOSes

I have to confess that I’ve been experiencing a severe writer’s block lately. It’s not that I’m short of subjects to talk about, but I’m getting tired of circling around the most important issues that matter to me most and should matter the most to any embedded software developer. I mean the basic software structure. […]

Read More

Rate Monotonic Analysis and Round Robin Scheduling

Rate Monotonic Analysis (RMA) is a way of proving a priori via mathematics (rather than post-implementation via testing) that a set of tasks and interrupt service routines (ISRs) will always meet their deadlines–even under worst-case timing.  In this blog, I address the issue of what to do if two or more tasks or ISRs have equal priority and whether […]

Read More

Worst-Case Context Switch Times by RTOS

This morning I received an e-mail from an embedded software developer. It read in part: We are trying to find the best case, average, and worst-case context switch times for the ThreadX and eCOS real-time operating systems. I have searched the Internet extensively. I found one source stating that the ThreadX context switch time can […]

Read More

Is Reliable Multithreaded Software Possible?

Until earlier this month, I’d overlooked a most interesting May 2006 article in Embedded Software Design magazine by Mark Bereit titled “Escape the Software Development Paradigm Trap“. The article opines that the methods we use to design embedded software, particularly multitasked software with interrupt service routines and/or real-time operating systems, are fundamentally incompatible with reliability. Here’s the critical analogy: […]

Read More