Category: business

  • The Embedded Enterprise, Pruit-Igoe, Ayn-Rand, the telecommunications stack and why software does not suck

    Programmers will readily tell you that “Windows sucks” or “Linux sucks” or “POSIX sucks” why this or that software is badly designed, bloated, slow, buggy, un-needed, ugly, and generally disgusting. But, Windows is actually an immensely useful and sophisticated program with astounding capabilities – Linux is too. POSIX is a comprehensive solution to many difficult problems. These programs and APIs are widely used because they solve real problems. Large, complex, “high capability” software is never as simple and clean as it seems like it should be to programmers, but I think that’s because the Le Corbusier fallacy is so hard to resist. It is possible, with some effort and skill, to write a prototype Operating System or Data-base or web browser that is fast, lean, clean, and beautifully structured. But the demands of the applications will conflict with the clean etc. design and force all sorts of changes. The Le Corbusier fallacy is the belief that the aesthetics of the architect trump the sloppy requirements of the mere users. In actual architecture, this belief results in unlivable high rise slums , but in programming we get either failed projects or “prototypes” that don’t actually serve any purpose. Programmers are too ready to dismiss working code that actually does something useful because they are entranced with imagined clean, pure, designs. I’m certainly not arguing against designing software or in favor of sloppy design, far from it. Software design must be motivated by external considerations – the utility of the software, not by some internal idea of what is “clean”.

    The telecommunications stack we have been building and starting to deliver to customers is an unbelievably complex software structure that is capable of incredible feats. Imagine a Windows application, using .Net and SQLServer that maintains customer data, a SuSe Linux based Oracle SS7 application, a fault tolerance and remote maintenance scheme running on Carrier Grade Linux, and large number of pedal-to-the-metal RTLinux POSIX threads maintaining VOIP connections – all on a single multicore multiprocessor connected by shared memory with TCP/IP running over it. This system is not something that can be easily captured in some whiteboard drawing of boxes. It’s a city, not a housing project.

  • Back from India

    We were going into a government facility in Mumbai, and the guard points at me and asks, as if finding it hard to believe “He is a foreigner?” This was my fourth visit to India and, like all the others so far, mostly a rushed series of meetings and trips to airports, but I got to meet a lot of smart people, hear about some amazing projects, and even saw some northern Western Ghats as we drove from Puni to Mumbai – mountains are always good.

    We started in Bangalore just as Diwali ended (flying in at night, the fireworks were awesome) for the Embed Asia conference at the beautiful campus of the Indian Institute of Science. Professor S.K. Sinha took me on a whirlwhind tour of the EE department where a mere 12 layer board is just part of a student project and the race for the sub-$100 laptop is on. If only they did projects like that at US computer science departments these days instead of specializing in advanced grant grubbing and similar topics. I also saw some great robotics projects in the Embedded Systems lab at IIT Mumbai where my one-time Ph.D. advisor, Prof. Krithivasan Ramaritham has now become a Dean. The embedded lab projects have to do with automatic cruise control. I want to see one of the auto-rickshaws driving through Mumbai on automatic control, but believe it would require major breakthroughs in computer science and quantum physics.

    India reminds me of Lew Wallace’s famous exit line as he fled New Mexico back in the 1800s. Maybe it has something to do with chilis. (Photo is Ramesh and Ramana at Puni Reservoir)

  • Soft real time continues to sag

    Paul McKenney once wrote:

    Despite such complications, priority inheritance works reasonably well for exclusive locks, and is a major component of Ingo Molnar’s CONFIG_PREEMPT_RT patch. There are strongly held opinions both for and against priority inheritance, for example. http://www.linuxdevices.com/articles/AT7168794919.html

    in which Victor Yodaiken considers priority inheritance to be harmful, and, as near as I can tell, soft realtime to be irrelevant. […] The big advantage of priority inheritance is that it is simple for its users. Use of priority inheritance does degrade scheduling latency compared to a carefully hand-crafted solution, and priority inheritance’s implementation is difficult for reader-writer locks, to say nothing of memory allocation or communications primitives.Nevertheless, priority inheritance does seem to have a significant role to play in mainstream “metal hard” realtime. It is not perfect, but, then again, what is?

    And I think this is a good summary of the differences between the “soft”( muddle through) and “hard” (design properly) approaches to real-time. In FSMLabs design approach, “simple for users” is good, but not good enough to overcome “doesn’t work reliably”. Priority inheritance itself is not a big deal: we can add it, and have added it, as a more complicated mode for mutexes when needed to make legacy code port. But in our world, correctness is more important than convenience. Perhaps only highly qualified engineers who understand timing should write real-time code directly: others can use pre-made components or automatic tools (like Matlab simulink) or wait until there are more advanced test tools. The idea of using an engineering technique known to be incorrect simply because it is convenient, is I think an indication of the weak state of software engineering. This same caution applies elsewhere: the effects of kernel programmers trying to write web pages or source code management methods on the fly are also not pretty. It would be convenient if I could develop data base systems without understanding data base theory – but I can’t. McKenney’s “despite such complications” follows a note of some of the fatal problems I had covered in the cited article and elsewhere – but a solution to these problems is nowhere found.

    The weakness of the soft real-time approach results in the weakness of the PREEMPT_RT systems in Linux (although it is clear that the developers are starting, finally, to copy a working solution – RTLinux and to slowly abandon their design.) Anyways, a draft analysis of what is wrong with PREEMPT_RT can be found here. Although I doubt McKenney is consciously modifying his argument on the basis of the business model of his employer, it is interesting to consider who profits from a technology that requires customers to both purchase large amounts of engineering services (to tune and configure) and to over-specify hardware.

  • Amar G. Bose on business

    B: Research in this country is going down. Prior to World War II, the United States was rather poor in research; that’s why radar was invented in England and Germany. We learned the value of research in World War II. But today the quickest way to save your bottom line is to cut off research. In the automobile industry, for example, the average CEO’s tenure is just 4.7 years, so the money you spend on research won’t help while you are CEO. That’s why there is great pressure to do something that will sell now, but on a national basis this kind of ethic is very dangerous.

    From a 2004 interview. One of the strange things about the computer business is how little innovation happens these days. This is, I think, related to the gross undervaluing of software in the market. One of the free software advocates once explained to me that you could make money on free software by establishing a “brand”. That’s a remarkable theory for an engineer to embrace and, I think, represents the victory of bankers and marketing experts.

  • Afghanistani mountain village ponders Microsoft business tactics

    From Rory Stewart’s book the places in between about his absurd/wonderful walk accross Afghanistan in 2002:

    That night we stopped in Dahan-e-Rezak, Dr. Habidullah’ mothers village. This was my first night in a tribal hill village. … Everyone in Rezak was descended from a single grandfather. There were six houses and seventy people in the village … the village diet was limited to plain nan bread for breakfast and lunch and occassional beans for dinner. … As we went to sleep [in the common room in the headman’s house VY] someone turned on a radio tuned to the BBC Dari service. A Bill Gates speech on American policy towards monopolies was being translated into Dari. The men listened intently. I wondered what these illiterate men without electricity thought of bundling Internet Explorer with Windows.

    My grandmother grew up in an isolated village where the next meal was a subject of much concern and where news of the big outside world came from incomprehensible tales and old newspapers brought by peddlers on foot. I can imagine the villagers gravely contemplating news of the doings of French railroad barons in exactly the same way.

  • The embedded enterprise

    It is now possible to put together sophisticated and powerful embedded and control systems that are mostly composed of pre-existing working software. One of the demonstrations we showed at AMD’s recent embedded workshop was a small two processor (4 core) box running RTLinux and Windows XP. Embedded development teams for RTCore based products can mirror the decoupling of the RTCore architecture – one team can do the low level control application and other teams can work on all the non-time-dependent “enterprise” software. A printer controller might be developed by connecting a real-time component under RTCore that talks to sensors and actuators, a database and remote update/maintenance subsystem under Linux and an operator interface running under Windows XP. These three components can be developed independently by different teams as long as architects have correctly designed the interfaces. The RTCore component on current Opterons can guarantee either sub 10 microsecond or 1 microsecond worst case interrupt latency – depending on whether you share the processor core with Linux or dedicate a processor core to real-time. The Linux application could be made web accessible using Apache, for example, with a backend database either MySQL or Oracle or even DB2. The Windows application can go right to the video and our experience is that the double buffering of the Linux file system and Windows itself improves performance when running a virtualized windows kernel. A Sun Java application on the Linux side may connect to C# under Windows on one side and C++ or C executing in the RTCore environment on the other.

    Let’s look at two example applications – a printer and an automobile “infotainment” system. One way to build a printer is as a system [FPGA: RTCore: Management: Operator] where RT software in RTCore manages a controlling FPGA on one side (that manages the sub microsecond requirements of the hardware) and provides paths for the Linux based Management and Windows based Operator subsystems to submit commands and get data. For a lighter infotainment system, perhaps using a single processor, we might need [Devices: RTCore: Display] where the RTcore component acts as a device accelerator, replacing dedicated hardware (such as a smart MPEG ) with software, a Windows based Display manages multimedia, and Linux is just used essentially as a BSP.

    Security can be easily improved by making the three components cross check each other. For example, a remote update connecting to the Java based server under Linux may ask the Windows based and Rtcore based components to cross check certificates. An attacker would have to deal with three different operating system environments working together. Reliability can also be improved – e.g. by having Rtcore force a reboot of Linux or Windows if progress is not being made.

    The underlying theme here which shows how far this new type of embedded software has moved from the traditional “hand crafted” embedded development process. Programmers have large functional components available to use in development instead of starting from the traditional impoverished low level embedded environment. The implications for both productivity and creativity are significant.

  • Single core cell phone solution and marketing vs engineering

    FSMLabs is finally able to discuss the single core cell phone handset solution we developed with Infineon Technologies last year. This system is cool technology – literally – since it allows parts count reduction on the handset and that reduces power consumption and that reduces heat production. More to the point, in a volume driven business, removing some hardware components phoneis big news. I hope that some of the “no software royalties” hard liners will now pause and consider why paying royalties (or a production license) in order to not have to ship chips and batteries for those chips may be, you know, profitable.

    The technology is very interesting. Essentially, we squeeze a lot of performance out of an ARM9 – making it jump back and forth between user interface, radio control, and wireless stacks. Turns out, the ARM9 is up to the job – it was being held back by poorly designed software.

    There have been many product announcements of the imminent release of Linux based single core cell phone solutions. I think that in this industry people sometimes forget that there are hard technical problems. Just having a visionary CEO say “make it so” and let loose the loudly singing marketing flock doesn’t actually get the bits to move right. Our software worked because of the smart engineering effort of Cort Dougan, Michael Barabanov, and Zwane Mwaikambo and the engineers they supervised and the work of the engineers at Infineon and also the excellent evaluation work done by Infineon engineering management that allowed them to avoid the mistake that everyone else made in searching for paths to this product. (of course there is a lot more to the phone than FSMLabs work, but RTLinux is agile enough to move the processor to the right place at the right time.)

  • GreenHills, foreigners, and the gummi bear threat

    When GreenHills launched their anti-Linux offensive, they crossed a line – and I doubt they even knew it. To cast doubt on the value of Linux in critical applications, GreenHills tried to create a scare about the nationality and “loyalty” of engineers working on Linux. This is stupid on three levels. First, software security is an engineering property, not something passed on like a, a, well, a virus. There are established methods for vetting security, by test, by inspection of the design, and by inspection of the design process – none of these involves the visa status of the developers. Second, software is the flagship international product and has been since that Hungarian fellow von Neumann was working in Princeton. Maybe things look different in Santa Barbara, but in the rest of the world, software development is something that discriminates on the basis of talent and work and not anything else. Aldrich AmesFinally, it’s absurd to think that software companies can vett their employees better than government security agencies and we know that those agencies can employ people who work for the other side for years. Does Dan O’Dowd stalk around the GreenHills office looking for subtle signs of disloyalty and contraband? I tried to do that here, but other than Matt’s bag of gummi-bears, I saw nothing life threatening. Xenophobia is a poor substitute for solid engineering and it is a more real danger than hypothetical undercover programmers putting trojan horses into unsuspecting software.

  • Above all, the SUSPENSE: Wind River’s DSO with Robert Mitchum and hippies! (updated)

    I’ve been meaning to write about DSO – WindRiver’s attempt to define synthetic “standards” (see the linuxdevices article for technical detail and a more serious approach). “Is DSO hype or substance?” asked Wind River CEO Ken Klein during the sponsored address, and sought to persuade the engineers in the audience that it is indeed substance and not just “marketing spin or renaming embedded systems with a three-letter acronym.” [cite: electronic news]

    Robert Mitchum

    Klein is seeing what many of us see – the tools and design approaches that worked for little embedded systems don’t work anymore. But because you are now able to run Linux or BSD or Windows on an embedded system, you don’t need an invented “standard” set of components – you can use the actual standardized components that have been developed for enterprise and desktop computing. There is obviously room for new components, but Java and Apache and Libc and the usual databases and Linux/BSD network stacks and so on are all useful in embedded systems. Our approach from day one in RTLinux has been to avoid reinventing those components and just add real-time capabilities to working solutions.

    i am dso

    The WindRiver booth at the Embedded Systems Conference in San Jose featured glowering faces waving fists that had “DSO” tatooed on them. Reminded me of “Night of the Hunter: “The film’s slogan on a major poster proclaimed: “The wedding night, the anticipation, the kiss, the knife. BUT ABOVE ALL…THE SUSPENSE!” The image showed actor Mitchum hugging a distressed Shelley Winters, with the L-O-V-E tattooed hand embracing her back, and the H-A-T-E tattooed hand grasping a knife. “(cite) So this must some of that brand management that I keep hearing about, but it’s a little too sophisticated for an engineering type to follow. If you look at the DSO web-site things get even more involved as they introduce the hippie angle: “This is the Woodstock of DSO. And just as it was with that event, 10 years from now, everybody will claim to have been here.” (here). Goodness gracious. Where is Wavy Gravy when you need him? I dunno. I was at ESC and didn’t pick up much of a sense that things were really happening in the DSO pavilion (they had some comfortable chairs, I’ll grant that).

    See also ValleyWag’s rude take (on the conference and DSO, not the movie).

  • Auragen computers remembered

    In the early 1980s, I worked for a start-up called Auragen Computers based in Fort Lee, New Jersey. We were making a 68K based fault tolerant UNIX based on a smart idea by Sam Glazer. Most of the software engineers lived in New York City and commuted out. Start-ups with New Yorkers have a different “culture” than start-ups with Californians. One of the senior technical staff was once asked to meet with investors to talk about why development was taking so long. After some fruitless attempts at discussion he explained, kindly, “I don’t think I can make this clear in 5 minutes. It took me 10 years to understand this stuff and I’m a lot smarter than you.” Auragen did some good work, but failed to get the product out to market in time. A good lesson to learn.
    Auragen gave me my first job in the computer industry and a great education in operating systems. I still remember sitting in a room with Jim Baumbach, Anita Borg, David Arnow, and Sam Glazer soon after I started there, and confronting the reality that everyone in the room was a lot smarter, better educated, and more witty than me (my only consolation was that, in their early 30s, they seemed pretty damn old).

    See this paper: A message system supporting fault tolerance

    and this post: The replicated state machine model of fault tolerance from the 1980s