Home    Bloggers    Messages    Resources
Tw  |  Fb  |  In  |  Rss
Curt Carpenter

Operating System: Product or Paradigm?

Curt Carpenter
Rich Quinnell
Rich Quinnell
3/7/2012 12:54:09 PM
User Rank
Blogger
Take the Flash Poll
This week's Flash Poll (March 7-13) is about which operating system you use, so it fits right in with this blog. According to Curt's definitions, probably no one should be clicking "None" on the poll, unless your code really does look like the right-hand image. If you're using a monitor program of some kind, the "In-house" option is probably best (unless you bought it, in which case the Commercial OS choice is more appropriate.

When I started with MCUs, a monitor program served as the software foundation. It should be interesting to see what folks are using these days.

50%
50%
Didier_Juges
Didier_Juges
3/7/2012 3:31:59 PM
User Rank
Blogger
Re: Take the Flash Poll
My own definition is that an Operating System is a set of routines that are compiled into an executable and loaded on the target system independently of the user code. Under that definition, I checked that I do not use an Operating System. Then I actually checked on (where else) Wikipedia for their definition of Operating System. Wikipedia says the two do not have to be compiled into separate executables, that the source code of the OS and user code can be merged and compiled into one executable.

So, I suppose that according to Wikipedia, I use a home-grown OS.

I normally refer to it as an "executive." It provides access to the underlying hardware through an abstraction layer that is the same regardless of the underlying hardware (for instance, you access timers and I2C devices the same way on the 8051 and on the Cortex-M3,) and it provides services like communication to the host through an API. But it is small and basic, taylored to the job at hand.

 

50%
50%
Microp
Microp
3/8/2012 4:38:15 AM
User Rank
Program Manager
Re: Take the Flash Poll
We can say an OS is a layer which can make the hardware to function efficiently. Eventhough the hardware have all the capabilities, OS can be act as a bridge between the entire application program and the hardware. For simpler projects we may not use any OS, but we may use it for critical systems where real time responses are require.

50%
50%
Curt Carpenter
Curt Carpenter
3/8/2012 1:07:58 PM
User Rank
Blogger
Operating System Layer
That's reasonable, Microp.  Don't forget though, that an operating system/executive/kernel/monitor/run-time core can also support things like task scheduling and task-to-task messaging, which may not have much to do with our hardware at all.

The issue though, to my mind, is really about the value of taking a structured (in this case, layerd) approach to embedded software design --calling the lowest defined layer our "OS" if we wish -- and the value of doing so, even in small machines.

 

 

50%
50%
Curt Carpenter
Curt Carpenter
3/7/2012 9:17:23 PM
User Rank
Blogger
Mastering OS
With regard to what an "OS" IS, I can only offer you another gem from Lewis Carroll:

"When I use a word," Humpty Dumpty said in rather a scornful tone, "it means just what I choose it to mean -- neither more nor less."

"The question is," said Alice, "whether you can make words mean so many different things."


"The question is," said Humpty Dumpty, "which is to be master - - that's all."


I'm very much in league with Mr. Dumpty here.  But then, we all know what happened to him.  


 

50%
50%
northstar
northstar
3/9/2012 4:36:25 AM
User Rank
Program Manager
CMSIS 3
Recently, ARM launched CMSIS3 (Cortex Microcontroller Software Interface Standard) at Embedded World 2012. What is new in CMSIS 3 is the RTOS support. More details are here:

http://www.eetimes.com/electronics-blogs/industry-comment/4237614/Who-wins-when-Cortex-M-adds-RTOS-abstraction-layer-?cid=NL_Embedded&Ecosystem=embedded

Interesting analysis about who wins and who lose in this scenario.

50%
50%
Curt Carpenter
Curt Carpenter
3/9/2012 10:07:55 AM
User Rank
Blogger
Re: CMSIS 3
That is really interesting, northstar -- many thanks for the link.   I'll spend some time today trying to track down some more information and post links if I find some.  If you find more info., I hope you'll post too.

I like the CMSIS library approach, but not so much the RTOS -- but that might be just for want of understanding.  I'm curious about how they will be implemented.

Barry writes "An RTOS abstraction layer will, by its very nature, not add to the RTOS functionality, but will make the code bigger and the execution slower."  My reaction is that we can say exactly the same thing about C -- but that has in no way impeded the growth of C usage in embedded systems.

At core, some elements of an RTOS are almost certain to be found in any moderately complex microcontroller code -- and given that, having the RTOS standardized and abstracted might not be a bad deal at all.  UNLESS it comes to mean that everyone must start spending hours and weeks figuring out ways to work around it (my experience with, for example,  Windows).

Need more information!

Thanks again for the link.

 

50%
50%
MicroPower
MicroPower
3/13/2012 11:22:00 PM
User Rank
Program Manager
Re: CMSIS 3
FYI,

There is a link about the latest state of RTOS: Are RTOS dead?

http://www.eejournal.com/archives/articles/20120312-amp/

This article just appeared in EE Journal, probably some of you might already read it. But I would like to enclose for those who missed. It is quite interesting to see what the experts think about RTOS.

50%
50%
Curt Carpenter
Curt Carpenter
3/14/2012 1:10:50 AM
User Rank
Blogger
Re: CMSIS 3
Agree Micropower -- interesting article. 

I thought the most realistic statement was:  "With respect to overhead, John maintains that, especially with small, cheap processors, you really need an RTOS that's been purpose-built with a small footprint and low overhead."

I think a lot of people out there are building their own RTOS -- and about half of them without every realizing that they've done so.  (This bold statement assumes that multitasking is the primary function of an RTOS (some may disagree!), and is based on the survey results here.)

Besides, if you strip Linux down to the degree that it will fit in a 4K - 8K program memory and still leave room for doing some real work -- is it really Linux anymore?

 

50%
50%
Rich Quinnell
Rich Quinnell
3/14/2012 7:43:56 PM
User Rank
Blogger
RTOS Dead?
ANother critical point made in the article was that there are several "flavors" of real-time, including "hard" real time and "prove it" real time. This last one is especially important in safety-critical and mission-critical applications. To meet some regulatory and specification standards you need to be able to prove mathematically (not empirically) that certain events will always occur within a bounded interval. A well-designed RTOS is needed in order to both provide that certainty as well as make the mathematical proof possible.

That said, the number of applications requiring these attributes is much smaller than those able to settle for "mostly" bounded timing. Hence many developers are developing their own OS, as shown by the results of the recent OS Flash Poll here on MCC..

50%
50%
Rich Quinnell
Rich Quinnell
3/14/2012 7:50:27 PM
User Rank
Blogger
Re: CMSIS 3
Just for completeness, here is the link to ARM's CMSIS information.

50%
50%
More Blogs from Curt Carpenter
Curt offers the community an audio generator and recorder for the PC that he uses to test data acquisition and processing in an MCU.
Curt tries out the Raspberry Pi and gets an unexpected result.
Curt takes a close look at the Scilab math program.
Using a table of prime numbers and multiplying them at key points in code can yield information that helps you trace program execution.
In getting ready to explore DSP, will you need a math refresher?
flash poll
MC on twitter
like us on facebook
Microcontroller Central    About Us     Contact Us     Help     Register     Twitter     Facebook     RSS