Break Points
Does Linux Suck?
Jack Ganssle
10/19/2009 11:46 AM EDT
There was a hushed and shocked silence. What one would expect from the congregation if a priest refuted the virgin birth in his Sunday sermon.
And this was exactly my point. We're only supposed to talk about Linux after first cueing the choir of angels who sing its eternal praises. According to some Linux will save the world from those skulking pirates in Redmond whose products barely boot and never satisfy anyone. Linux is the answer to every problem, from global warming to male-pattern baldness.
In my opinion, Linux is a great operating system for a wide range of applications, from the desktop to servers to the embedded space. But it is not the One True Solution as some of its acolytes preach.
In the embedded world Linux offers a rich API with a slew of resources like the filesystem, networking, and so much more. I see a lot of apps where it forms the front end, while under the hood additional resources, often embodied in additional CPUs, do the deeply-embedded portion of the work. Some managers tell me they use it (or Windows) in part because they can hire cheaper, non-embedded, people to do a lot of the work.
But I also get several queries a week from people wondering about using it on 8 or 16 bit processors. Or in high-reliability or high-security applications. Linux is suited for neither, unless it's just a non-critical component whose weaknesses are mediated by other resources. It has been certified to EAL4+ under the Common Criteria for security, but only under the Controlled Access Protection Profile, which essentially means it's reasonably secure if no one with hostile intent is around. Depending on Linux to protect vital information or resources is about as bright as making the same assumption about Windows.
I use Linux every day and like it a lot. I use Windows every day and like it, too (though detest Vista). But both are just piles of bits, well-suited for some applications and completely inappropriate for others. Engineers make sound decisions based on carefully-weighed tradeoffs and avoid religious issues. At least at work.
Editor's Note: Jack's Embedded Poll Question this week is Does Linux Suck?. To vote go to the Embedded.com Home Page.
Jack G. Ganssle is a lecturer and consultant on embedded development issues. He conducts seminars on embedded systems and helps companies with their embedded challenges. Contact him at jack@ganssle.com. His website is www.ganssle.com.





robert.berger
10/20/2009 12:37 AM EDT
Jack,
I might be a bit biased, since I'm flying out in a couple of days to hold an Embedded Linux Training (http://tiny.cc/EGLISA), but I'll try not to be;)
As we all know there is no silver bullet!
Why not to use Linux:
1) chip you want to use does not support Linux, which means 4,8 an 16-bit micros. The reason for using those would be mainly power consumption, price and lines of code running on the system
2) safety critical standards needed - have a look at http://www.osadl.org/Safety-Critical-Linux.safety-critical-linux.0.html
3) licensing: people might not like some licenses used by GNU/Linux
4) real-time: Linux is not real-time, but there are some approaches which work reasonably well like http://www.xenomai.org/index.php/Main_Page which run Linux as the idle task on top of a real-time OS
This leaves us with systems, which are not safety critical and not very low power (with all the hand held stuff there's much effort to make Linux+hardware low power - see http://beagleboard.org/)
At least for the stuff which I'm dealing with that's the majority of systems, which makes Linux a viable solution for me.
For the rest I look out of the window into the nature and see green hills, winds and rivers and also http://micrium.com;)
Regards,
Robert
--
Robert Berger
Embedded Software Specialist
Reliable Embedded Systems
Consulting Training Engineering
Tel.: (+30) 697 593 3428
Fax.:(+30) 210 684 7881
URL: http://www.reliableembeddedsystems.com
Sign in to Reply
markhahn
10/20/2009 1:19 AM EDT
the comments about security are just nonsense. why would you "depend" on the OS to protect you? especially an embedded system - you harden it by providing no access to threats. yeah, you should probably turn off telnet (goodbye 1980s!). but to pretend there is no structural difference between linux and windows security models is just ignorant. what linux offers is unmatched configurability: you control exactly what's in the kernel, and control user-space from init on. all while being closely related to easy-learned desktop linux, not to mention nice tricks like UML.
Sign in to Reply
andyzg
10/20/2009 6:04 AM EDT
i agree with jack. maybe the reason why some consider linux to be the "answer for all" is because they don't know anything else.
Sign in to Reply
krwada
10/20/2009 4:54 PM EDT
Linux is OK. The part of Linux I really cannot stand is this "Linux Brotherhood" style of programming. If you are not part of the "Brotherhood" ... watch out!
Also, the support is non-existent ... that is unless you call Google searches product support!
Other than that, I have found Linux to be pretty decent for a wide range of really large projects.
Sign in to Reply
Lundin
10/21/2009 4:54 AM EDT
The comments about safety is not nonsense, the link given is. They refer to some standard for fire alarm systems(??) and suddenly claim that Linux is suitable for safety-critical apps. Then they mention IEC 61508 but not how to make Linux conform to it.
And what about standards for machinery, automotive, aerospace? MISRA? And yeah, realtime performance might be nice... "When will the emergency stop become active? Any second now... I think. Don't rush things."
So I agree with the "Linux sucks" statement, for these kind of applications. It doesn't make sense to put Linux in them.
Sign in to Reply
AlPothoof
10/21/2009 12:00 PM EDT
Nothing is the answer to everything (and some things aren't the answer to anything).
"Embedded" Linux is ok if you have a big, fast chip, don't care about power consumption (i.e., "PC in a box") and are looking for relatively cheap, plentiful coders who can't work "close to the metal." WinCE (or some other flavor of "embedded" Windows) fills the same niche (but is more limited in supported microprocessors).
But that looks, to me, like a fairly small segment of the marketplace; there are only so many companies building game consoles and set-top boxes. I question whether Linux or WinCE are appropriate for things like electric motor controllers or engine controllers (despite the fact that there are companies out there demanding that background for those kinds of projects). Certainly, the vast majority of microcontrollers/microprocessors sold are of the 4-, 8- and 16-bit varieties and aren't appropriate for these demanding operating systems even if you can afford the power requirements.
Like Jack, I've worked with Unix/Linux in the past and find it an acceptable programming platform (although not particularly user-friendly for non-technoids in its native form). Likewise, Windows is acceptable (I actually rather like Vista, at least as much as the other versions, although that may be because I don't program for it).
But if you can actually afford the resources to run them, you've probably "over spec'ed" your chip.
Sign in to Reply
ico
10/22/2009 12:36 AM EDT
Everything sucks somewhere.
So just use Linux where it
fit, and I've found it fit
on a lot system without strict
need of real time response,
high safety, etc.
The ease of development in
Linux and the vast resource
for Linux is too enticing
for you not to choose it if
your embedded design need not
the features that it can't
offer.
So it's my preferred OS
whenever it can do the work.
Sign in to Reply
clay_cowgill
10/22/2009 2:07 AM EDT
"When the only tool you have is a hammer..."
Without a doubt Linux has merits, but I've also seen it bloat hardware (and therefore cost) requirements to a frightening extent on far too many projects.
On more than one such occasion an OS-less ~66MHz ARM7 implementation in C, executing in place from flash, using only the on chip SRAM of the MCU would be *more* than enough... One thing leads to another (usually in conjunction with the words "free", "easy", "Google", and "drivers") and pretty soon there's a 200+MHz ARM9 with 64+Mbytes of SDRAM and a USB thumb drive under the hood. *sigh*
Then -- to add insult to injury -- the whole thing takes 30+ seconds just to boot and begin to be useful. Meanwhile those cheap and plentiful desktop PC programmers ("I'll just malloc() myself 128Mbytes of RAM...") are busily including 4Mbyte libraries to access some little 20-line function they don't want to be bothered to write. ;-)
Palm->face.
I don't really have anything against Linux as a technology when applied intelligently to an appropriate problem, but I think too many in our profession find "...it is tempting to treat everything as if it were a nail."
Sign in to Reply
pbleyer
10/22/2009 7:14 AM EDT
"Engineers make sound decisions based on carefully-weighed tradeoffs and avoid religious issues."
Make that "good engineers". Then you are right in the spot!
Sign in to Reply
daedalus
10/22/2009 8:20 AM EDT
My limited experience with embedded Linux involved getting a new project started using it. As no one else at my (small) company had used it before, I couldn't turn to anyone for advice and the toolset vendor didn't seem to know what was going on either. The learning curve was substantial and, as another commenter put it, documentation is non-existant or spotty at best. Once I got it going it wasn't so bad, but I know that others had to do tremendous work to write appropriate drivers and minimize boot time.
I'm glad no one has pulled out the "Linux is free" argument because as experience tells, it requires a significant time investment to get off the ground.
Sign in to Reply
whizkidtn
10/22/2009 9:14 AM EDT
Well said! It often seems that "management" wants to go the way of Linux (or uCLinux) because it is billed as "free" and there are gobs of cheap programmers out in the ether who will work for peanuts and are "Linux gurus". Right.... Ever heard of "you often get what you pay for"??
Sign in to Reply
gammageo
10/22/2009 10:04 AM EDT
Nice inflammatory title. Try "I like to beat puppies" next.
Your thesis, "We're only supposed to talk about Linux after first cueing the choir of angels who sing its eternal praises." is a bit off the mark. Yes, there are Linux evangelists who would like to see the open source OS loaded on every surface of silicon in the world. Anyone want to bet that Microsoft hasn't wished for the same fate?
Linux fills a gap in the software ecosystem that didn't exist before it was developed. No, it isn't the best application for every problem. But as we have seen in the handset market, consumers and developers haven't exactly been blazing a path for Windows-based solutions either.
The simple fact is, there are no simple facts when it comes to operating systems - no matter what the hard-core advocates on either side tell you. Yes, Linux is *free* in that you don't have to purchase the product. But support is lacking and documentation is sparse (I'm being generous). But Linux allows the developer to control the software down to its lowest levels. No hidden libraries, no magic system calls. Weakness mixed with strength.
Microsoft's solutions are easier to get running because there are already plenty of people out in the community who have experience with their development paradigm. The product comes with plenty of support and lots of great tools. But that depth of support comes at a price. And once you are in the Microsoft gravitational pull, your product is now part of Microsoft's product churn cycle. Strengths and weaknesses.
There are plenty of real-time OSes and other embedded OSes that I haven't even touched upon, but the point is: Why does Linux suck any worse than the alternatives? The fact is, it doesn't. It fills a niche quite well that would otherwise be left unfulfilled, and opens the door to small development companies with *NIX-based expertise who come to the embedded market place with their eyes wide open to the limitations.
At least that's how I see it.
Sign in to Reply
DaveArmour
10/22/2009 12:24 PM EDT
I agree with daedalus. At the last place I worked we used Linux because it was "free". As a result we used to have a saying about it: "instead of pay me now (other OSes), you pay later, and pay and pay and pay..."
In the end it cost us more to use Linux then if we had payed for something up front with decent tools, real documentation, and real support.
Sign in to Reply
hhart
10/22/2009 4:19 PM EDT
I'd agree Linux doesn't work well with 8-bit microcontrollers/microprocessors, but I think a lot of my old VoIP-phone customers at a previous company would have to disagree about it working on 16-bit controllers.
We used uCLinux (since rolled into the standard kernel tree) for MMUless processors. It fit in much less than 1 MB and worked very well for a semi-realtime application.
Sign in to Reply
bempey
10/22/2009 6:38 PM EDT
As the owner of a company that designs and manufactures products based on Linux on ARM processors, I know the value of Linux, especially if you need GUIs or Internet connectivity. (and recently almost everything we design has an LCD, touch-panel, and Ethernet)
However, when you don't need these, its not necessarily a good fit.
Linux requires a lot of resources, which jack-up the product costs beyond what might be sensible for some applications.
And its a moving target .... between the Kernel, libraries, compiler, etc. its not the same tool this week as last week, if you want to keep current.
And then there's the holes. Like guaranteed fast response. I wouldn't implement a motor-control scheme (driving steppers directly) or such in Linux, although some might (you can do amazing things when you get deep into the driver code ... but expect to modify that code with new kernel updates).
So we do lots of work with low-end ARM-7 and Cortex-A3 processors, typically connected via USB.
These slave processors take care of the real-time I/O details, while Linux draws pretty pixels on the LCD and serves web-pages over the Ethernet.
I consider it a match made in heaven ... the slave co-processors are so cheap now that they often cost less than dedicated peripheral chips.
And you can run FreeRTOS or other embedded OS options if you want.
Plus, we've developed "over-the-wire" firmware loading and updating so that the main (Linux) processor can load the real-time co-processor efficiently for production or updates.
Jack, good to hear from you. Its been several years.
Glad that you're still "stirring it up" :)
Sign in to Reply
ukzw
10/23/2009 10:15 AM EDT
Hi Jack,
I don't know where you got "Some managers tell me they use it (or Windows) in part because they can hire cheaper, non-embedded, people to do a lot of the work.". As far as I know, embedded software jobs (in the UK) that require low-level programming skills (e.g 8 bit MCU and HW) are normally advertised around 30k(GBP), whilst that require embedded linux skills are normally around 40k.
Maybe US has a different story?
Sign in to Reply
udaywali
10/23/2009 4:13 PM EDT
Any one tried shifting
Linux libraries between different distributions like uCLinux, Redhat and Ubuntu... It does not work.
Any one saw what goes behind the graphics screen of Linux? That X-Windows is ancient.
Linux has remained stable because it got stuck to what Unix was 30 years ago. Computing has changed since then!
Anyone remember why Unix lost ground to Windows in the mid 90s? Solaris, AIX, BSD, System V... all looked alike but to the end user, they were all different. They all meant proprietory hardware. Unix was developed as a portable operating system and got ported a few too many times. Linux included.
I use Linux on ARM routinely. Even then, when I try it on a new ARM chip, porting is never easy.
There are niche areas where Linux or WinCE or other OSes are good, at times unavoidable. However, with better development environments, it should be possible to write your own OS or set of programs that make the end product work. Especially in the embedded arena. Leave WinCE and Linux to desktops and netPCs. Embedded computing has a far greater footprint.
As cross platform communication becomes routine, dependency on OSes should reduce - You stick to a protocol suite and not necessarily to an OS. Give me five years. Custom OS should become rule of the day.
And there are lots of applications which will not need an OS at all.
Sign in to Reply
Scottish Martin
10/23/2009 5:30 PM EDT
Jack,
There are software engineering professionals out there!
"Lundin" referred to IEC 61508, a standard for safety-critical systems.
Sign in to Reply
SAMTN
10/26/2009 1:13 AM EDT
Lets see what is the definition of "To Suck" and then see if Linux Sucks.
According to the paper, since linux is not suitable every kind of applications it sucks.
I am just a student in this field, and you are the expert. If linux sucks for the embedded systems, then what does not suck?
Sign in to Reply
sbabic44
10/26/2009 3:52 AM EDT
Actually it doesn't.
But Linux religion does. Big time. And is hurting Linux for most of the part.
First I would like to address one other thing. We need to be clear what embedded means. I used to be small 4 or 8 bit uC with 128 Bytes of RAM controlling a pump. Or a military real time pice of electronics for a cruise missile. But basically it was something with limited resources, closed design, something opposite of general purpose desktop or server computing for business. Somebody mentioned code bloat. It is exactly the reason I loathe doing "normal PC programming". And it is creeping into embedded world because it's free. Linux cannot work on any of the microcontrollers I would consider "embedded" in classical sense. So for most of really small stuff you can't use any "propper" OS, and you don't. You use some small RTOS, or even just some threading libraries, or not even that. When I make a controller for microwave that has 32 MB of OS with TCP stack, please somebody have mercy and shoot me:-).
And Linux is not free.Also nobody admits that Linux wasn't even usable as more than learning aid to UNIX world before some years ago it became commercially supported by monopolists bigger that "Redmond evil doers", like Novell, IBM and likes for embedded world. And if you want them to support you it is expensive.
An community support doesn't exists. All you can get is obvious stuff, and "write a new kernel by yourself if you don't like one I made, it works fine for me.." mentality. Real good stuff people wont tell you. And they shouldn't. It is their work, their business, their bread they eat.
Ok, before all go crazy , I'm exaggerate to illustrate the point: Linux is not free, it's not easy, and is usable just for some projects.
Gee, well that's new. It like with any other tool I have. I have multimeter AND a scope. I use both. Linux church should stop bothering us with their silver bullet mentality. Linux is not a solution to anything. It is good alternative to Windows embedded and likes, that you can use with great success providing you have skill, tools and if it is appropriate for your project. Period.
Sign in to Reply
bgat
10/30/2009 11:43 AM EDT
Linux doesn't suck, anyone who looks critically at Linux will come to that conclusion. It's also the best-supported code base around, without exception.
Jack makes a balanced point, despite the title. Linux's negative press usually comes from either "red herrings", or people who try to make it work in places where it doesn't belong.
When it's the right tool for the job, Linux has no competition. It is by far the best solution available according to any metric I can think of.
b.g.
Sign in to Reply
bgat
10/30/2009 2:15 PM EDT
Here's an example of how well Linux is supported. For three of the last four years, I've run against a bug or concern (different one each time) that has caused me to post a question to one or more Linux-related internet mailing lists on the evening of New Year's Eve in the USA. And all three times, I've received a useful answer in less than four hours.
I'm not aware of any existing support contract that can offer four-hour turnaround, 24/7 even on national holidays. At least not one that I can afford!
Sign in to Reply
Dr Jinx
4/20/2010 8:12 PM EDT
Linux sux
Sign in to Reply
Bellhop
4/22/2010 1:59 PM EDT
Maybe 10 years ago or more, I wanted to learn more about Linux, so I did a web search. Upon reaching one site, I was greeted with the message: "As a user of Windows, you are not worthy to enter this site." Nothing since has totally erased that arrogance in my mind.
Sign in to Reply