Sunday, June 21, 2020

Why Real Time Embedded Linux ?


Why Real Time Embedded Linux ?

You might hear of embedded Linux for real time very often. It sounds the entire embedded world depends on this. The question really contains 3 important concepts, we can break this question into 3 sub-questions based on these 3 concepts.

Why Linux ?

This is a generic question, easy for public to understand. Linux is Open source, less legal issues, popular, easier to get support, APIs and expertise. etc.

Why Embedded (vs Desktop Linux) ?

A bit more technical.

1. Embedded Linux system usually requires great reliability. Desktop Linux may have >100M code installed, with a lot of un-necessary features. Embedded Linux typically have 1M foot print, with only required feature installed.

2. Resource constraint. Embedded Linux has no HDD, and its non-volatile storage is life constraint. This coupled with the reliability and power safe requirement, a large portion of embedded linux system is actually read only.

Why Real Time ?

A common mis-understanding about Real Time is that Real Time means Fast, actually Real Time means deterministic. In other words, to complete a task within a specified time, otherwise will lead to an error condition. For example, a dish washer need to stop water filling in Read Time fashion, but screen display update may not be real time.

We classify a task either deterministic or in-deterministic, so the concept of soft Real Time should be obsolete.

Linux is not intrinsically deterministic, there are processed can run to completion. Hence, we need some other modification to make Embedded Linux real-time, mainly two ways, use a RealTime kernal and make regular Linux as a process. or use Preempt_RT, break down Linux locked processes, and put main ISR routine to a task, only left signaling inside ISR, like FreeRTOS. In practical, we can control the worst case latency to be less than 100 micro-seconds, good enough for Real-Time applications.

No comments:

Post a Comment