Break Points

Perfect software

Jack Ganssle

3/1/2009 12:00 AM EST

Micrium, the company that sells the very popular µC/OS-II real-time operating system, now has versions of that RTOS for many processors that have either a memory management unit (MMU) or a memory protection unit (MPU).

I'll get to some details about MMUs and MPUs shortly. But first let me paraphrase an interesting conversion I had with Jean Labrosse, Micrium's president, about his philosophy about the use of a memory manager.

Jean feels that the primary reason to use an MMU is so separate multiple applications running on one CPU. If you have, say, a safety-critical controller and an entertainment system, using an MMU means one can certify the controller's code, and not have to re-certify it if the entertainment component gets changed. He complained that some (he was kind enough not to point the finger at me, but he could have) advocate using the MMU to save a system when it crashes. The MMU prevents a rogue task from overwriting any other task's memory space. There's a good chance that when things go wrong, the task will try to wander off to another space and the MMU can trap the problem and initiate recovery.

Jean is an old friend, so I could give him some amiable abuse. "You're just showing your philosophy about software," I railed. "You're totally intolerant of bugs. Your standard is perfection. That's unheard of in this industry."

In IEEE Computer in January, 2004, Jesse Poore wrote: "Theoretically, Software is the only component that can be perfect, and this should always be our starting point." Software is an odd thing. It's not real; it has no form. Everything in the physical world is full of flaws. Bearings wear, people age, bulbs burn out, and plastic deteriorates. But software, if created perfectly, never wears out.

In general, software isn't perfect, of course. It's created by those aging human beings who make mistakes. Programming requires enormous skills. Programs are some of the most complex of all inventions. The field is young and there's much we have yet to learn.

Perfection is penalized. Windows is hardly ideal, yet Microsoft is by any measure the most successful software company of all time. Capitalism doesn't, it seems, reward getting it right. Profits seem to come from "good enough."

Of course, that's not completely true. The avionics on a commercial airliner better be really good or the vendor won't survive the onslaught of lawsuits.


Next:




vocaro

3/2/2009 5:17 PM EST

I found a defect: "might foul it's own sandbox" --> "might foul its own sandbox"

But otherwise it's PDP

Sign in to Reply



ESD editorial staff: SRambo

3/3/2009 6:07 PM EST

The defect has been fixed. Thanks.

Sign in to Reply



krwada

3/3/2009 6:37 PM EST

PDP == Pretty Darned Perfect

hmmm....

PDP == Preposterously Defect Prone!

Heh!

Sign in to Reply



ddaly

3/5/2009 8:55 AM EST

It's a bit silly to envision a system wherein an entertainment app and a safety-critical app share a processor. I realize that it's (probably) a hypothetical example, but, amusingly, that example, as a system design, would seem to be no closer to PDP than any software running on the system could ever hope to be.

Sign in to Reply



goldscott

3/5/2009 11:24 AM EST

"Perfection," of course, is open to our interpretation. I strive for the most optimized code I can: code that's as fast as possible and as small as possible. If two instances of "perfect" software both exhibit the exact same (overall) functionality, but one instance of software requires less memory and executes faster, is it "more" perfect?

On a related note, I just started working for a company that's been using the same baseline code for the past 15 years. It's not optimal at all, it uses more memory than necessary, and many long blocks of if-then code are present that could easily be rolled up into an efficient loop. But the code is time-tested, and so far, "pretty damned perfect." There's plenty of memory and cycles available in the DSP we're using; optimizing the code would be an expensive, unnecessary endeavor. So is this code perfect? It operates perfectly, but it doesn't look perfect. Even perfect code can be improved.

Sign in to Reply



GregK

3/8/2009 6:28 PM EDT

Men are such perfectionist and idealist... I catching myself on it, when code is working but I do some optimization in order to safe some memory or cpu cycles when really not necessary.
I do not know what about You folks, but I work for money, perfect software for me is software what gave me (my company) more money.
After work (in home) I can 'wasting' (and sometimes I do) time to 'improve' some academical problems, contribute open source or simply get fun 'typing' code.
For my point of view Windows'c products are the most perfect software! lovely... it could really speed up my 'cottage near lake and forest'.
No one pay for perfect software in academical sense, it is business.
Windows software removed from my private PC (unsigned) long long time ago :)

Sign in to Reply



raj_the_code_reuse_guy

3/13/2009 12:14 PM EDT

First of all, this is an excellent article that I plan to forward to my team.

IMHO, perfection is like infinity and we can get closer and closer as we strive for continual improvement in two areas 1)the way we develop the product and 2)what the customer/user think about the product when they use them.

Item (1) above will let me sleep at night knowing that I did pretty good job in getting my software bug free

Item (2) above will continue to keep me in business.

Sign in to Reply



Please sign in to post comment

Navigate to related information

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
Featured Job On
Scroll for More Jobs