Link to home
Start Free TrialLog in
Avatar of JohnSantaFe
JohnSantaFe

asked on

Advantage of an operating system for embedded systems

I'm doing a fair amount of embedded application development lately.  I keep running into the argument of whether or not an operating system is necessary.
Usually it's the electrical engineers that like bare C and like to directly access a processor's registers, whereas the application developers seem to like having an OS to abstract the hardware.

Does anyone have an opinion or a  good reference on the advantages of using an OS?

I know "it depends" on a lot of factors so let's assume that the embedded system could be programmed with or without an operating system.  I realize there are many times an OS is absolutely required and some very simple microcontroller environments where an OS is not possible.

Thanks.
Avatar of LeeeRussell
LeeeRussell
Flag of United Kingdom of Great Britain and Northern Ireland image

I can see that your question tries to mitigate against this answer, but unfortunately it really does depend on a lot of factors.

Also, there's almost always room for an OS, it just depends which OS you want.  For instance the micro-C OS will fit most places, and also I think the book that describes this operating system is one of the best resources for learning about embedded OSes:

http://www.amazon.co.uk/C-OS-III-Real-Time-Kernel/dp/0982337531/ref=sr_1_1?ie=UTF8&s=books&qid=1299750932&sr=8-1-spell

Unfortunately, I think it has to depend on the type of project your developing.  An operating system can help when you have a lot of developers, or if you need lots of higher level functions and don't want to write loads of drivers.  An operating system doesn't mean sacrificing access to the processors registers.  But you don't want an operating system on a microprocessor that controls a thermostat - although it will probably have a round robin OS in it somewhere, it then depends on what you call on OS.

With time you'll learn how to assess the need for an OS at the start of every project.
Start from the definition of "operating system" and try to see if you need the functions it provides.
More generally, if you need to manage in a "standard way" some resource - like memory, I/O, or process space - you need an operating system.
If your application is sufficiently simple that you can manage these resources by yourself, inside your own application, you do not need an OS.
But sometime this boundary is very fuzzy - can a memory allocation system be considered an OS? Maybe.
Avatar of JohnSantaFe
JohnSantaFe

ASKER

Thanks for the replies so far.
I intended this to be worth more points than 50 so I just increased it.

Anyone have a good list of advantages and/or disadvantages?
SOLUTION
Avatar of HappyCactus
HappyCactus
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
LeeeRussell, I would remark that sometimes - my personal experience - the time spent in learning the "new" operating system is balanced by the time on rewriting drivers, subsystems and services. For example, a customer of mine didn't want to use an OS because that seems an overkill. We spent all the time debugging uart, i2c and libraries related code, that with the O/S we should have for free...
Obviously, this is my, very personal, experience.
About proprietary OS, they haven't any advantage against "open" OS other than the technical support, that is a very good point.
Yeah, I think I'd probably go with your personal experience, and the point I was trying to make is that an OS is unnecessary in a system where you are reading one pin on a microprocessor, and then using that input to simply drive another pin.

You can, of course, just use libraries for things like uart, i2c and not the full OS if you can find them for your particular processor.
Thanks for the responses!