Embedded Solaris? Why not?

A recent article by Ashlee Vance in The Register asked a common question under the disparaging subhead "Embedded Slowaris":
There's a lot of momentum behind PowerPC right now and a decent amount behind Solaris 10, so we'll see how this plays out. Although, it's hard to see how Solaris offers a huge edge over Linux in the embedded market.
As a person who's done embedded development before, the answer is most emphatically tools.

Simply put, Solaris has the best development tools in the market, most glaringly the combination of mdb and DTrace. When I was an embedded developer, tools such as those (or even tools with a mere fraction of their capabilities) would have made me fall to my knees and cry.

Consider that many embedded environments have few, if any tools available at all. Many have custom debuggers with command sets that correspond to no other debugger, meaning you have to learn yet another command set. A standard kernel debugger? Perhaps, depending in part on whether the copyright holder of your OS even considers them useful. But certainly not one with anywhere near the power of kmdb. Using ::print to output a formatted a copy of most any kernel structure? Certainly beats counting byte offsets in a raw hex dump!

Compared to an environment whose debug tools may consist largely of printfs output to a serial console, those other environments look as anachronistic as toggling boot code into a machine by using front panel toggle switches.

When it comes to application development for any type of embedded environment, the availability of something like DTrace is a dream. Ever get frustrated at how long it takes for the Program Guide to come up on your digital cable set top box? If that developer had access to DTrace, perhaps they would have found that extra loop wasting precious processing time. Or that memory leak that requires you to unplug your satellite reciever or DVR every so often when it locks up. Good development tools are even more useful when programming for an embedded target.

Writing an application for a Linux target? No problem - develop on Solaris, debug with DTrace, port to Linux. Porting most any reasonably portably written program from Solaris to Linux is a minimal effort compared with the time it would take you to debug the same application using only Linux tools. Are you a GNU fan that prefers to use gcc and gdb? No problem, they run quite happily on Solaris as well. (Of course you'll have a much easier time using mdb to debug your multithreaded application…)

Is Solaris the perfect embedded OS? Perhaps not; Solaris includes a lot of code that allows it to scale predictably across everything from single CPU systems with modest amounts of memory to systems with multiple multithreaded cores addressing gigabytes of RAM. That's flexibility not always required when your target platform is known and fixed in terms of RAM and processing capability ahead of time. But it's certainly not anything that should cause Solaris to be dismissed out of hand, and projects like Tom Riddle's PowerPC project at SunLabs, Project Pulsar, combined with the efforts of the OpenSolaris community will make it an even more attractive option in the future. Solaris of course has no pricing disadvantages as compared to Linux (and in fact Solaris plus a support contract can be much more affordable than an equivalent Linux offering.) Need to make source code modifications to the kernel? (Though frankly, most anything you need to do from a user or device level can be done via the interfaces described in the Solaris Writing Device Drivers manual.) As of the release of OpenSolaris 366 days ago (as I write this), that's not an issue, either.

In short, perhaps someday embedded developers using other operating systems will have access to development tools like those available on Solaris, but until then if a target platform is one that Solaris supports, it seems to me the time and effort saved by being able to develop and debug on Solaris makes development in any other environment an inexcusable waste of time and money.


Post a Comment:
  • HTML Syntax: NOT allowed



« February 2015