<<

Embedded Systems Real-time Operating Systems It’s a Dynamic World in There

The world of embedded systems is growing fast albeit without much ado. Almost every well-advertised development in the computing space, ranging from 64-bit computing to multi-core processors, has been reflected in the embedded systems space as well. As a result, embedded real-time operating systems have also grown correspondingly to enable developers and manufacturers to make the most of key developments in the hardware space

Although in the past, RTOS’ selection was determined by an assessment of the functional characteristics of the candidate system, the increased complexity and the changes in the embedded market means that these factors are no longer applicable. With the emphasis on seizing windows of market opportunity, factors which affect time-to-market have become much more important,” says Sunil Kumar Ross, country manager, Am- mos Software Technologies Pvt Ltd, speaking for Express Logic, a leading player in the RTOS space. RTOS must also be capable of meeting the functional requirements of the application. But, Ross notes that using an RTOS that is “overqualified” for an application may have a negative impact on time-to-market. The reason: Robots assembling vehicle floors—a fine example of embedded real-time operating systems the additional capabilities make the RTOS more complicated to use, thus pushing the learning curve for devel-  Janani Gopalakrishnan ded systems are getting stronger today. opers higher. Vikram with inputs from Thus, as a complementary product, So, the bottom line according to Shweta Dhadiwal real-time operating systems (RTOS) are him is to select an RTOS that suits also becoming more powerful. project requirements. adgets and machines are be- Let us take a quick look at the He cites the interrupt response coming increasingly powerful. recent trends in the RTOS space—in time requirements as an example. The GThis means that the comput- terms of technology, what the industry common perception is that the fastest ing systems embedded in them are also majors are offering, and the changing RTOS is the best. But some applica- becoming more potent and smarter. requirements of the market. tions do not require such speed. For Earlier, we used to associate multi-core example, in a desktop system, the and such concepts with supercomput- Faster time-to-market keyboard response of about 10 mil- ers, but then they invaded the personal “New market scenarios indicate liseconds is sufficient to keep up with computing space, and now they are that the time-to-market should be human typing speed. A faster response common in embedded systems as well. the deciding factor in picking up a provides no additional advantage, as These changes show that how embed- real-time (RTOS). the person doing the typing won’t be

100 • December 2009 • electronics for you www.efymag.com Embedded Systems able to hit the next character for at least Real-time operating systems—A quick intro 10 milliseconds. If you have five tabs opened on your browser, then it is likely that the system will take longer Modular RTOS than expected to open a webpage on a sixth tab. When you have a dozen services running on your computer, it is really difficult to say how long the next program might take to load As far as embedded systems go, the and operate. That is one of the inherent problems in general-purpose computers and their requirements vary from application operating systems—you do not know how long it might take to complete an instruction, to application. A simple gadget may since it is a function of several other factors such as the number of other services already require a small and basic system, while running, resource utilisation by the other applications, etc. mission-critical, advanced equipment Just imagine if the case were the same with the operating system running on a computer may require more flexible and faster embedded in, say, a missile launcher or a robotic arm in an automotive assembly line! There will be numerous other machinery and processes dependent on these time-critical system. Earlier, developers would just equipment or gadgets, and you really need to have an accurate estimate of how long the choose between a ‘light’ RTOS or an instrument might take to do its work. This is where a real-time operating system comes into ‘advanced’ one, depending on their play—it essentially ensures ‘deterministic’ timing, that is, the amount of time taken by the requirements. But today, the choice is operating system to respond to an instruction is constant (and small), irrespective of the not that simple. load, thereby enabling it to be used in real-time applications. “While minimal configurations are Real-time operating systems (RTOS) are different from the general-purpose operating popular for some applications, require- systems running on our personal computers. Mainly, they are fast; the response times are highly predictable; they are small and occupy very little memory; they consume fewer ments of many applications are getting resources, ensuring that these resources are available for the other operations of the device; more complex. Developers who write they include significantly fewer functions—that is, only those relevant for the device; and their own RTOS or use a minimal one, are sometimes architecture or microprocessor-dependent. end up writing more codes to fill the gap between their application needs and what the RTOS offers. This con- conjunction with the Nucleus RTOS,” plications like connecting the device to sumes more time and increases the explains Dixon. a robot controlled by USB and control- engineering costs,” says Brad Dixon, Modular RTOS can serve diverse ling the robot using SMS/phone calls, senior product marketing manager, applications, ranging from general- to using it as a core location-aware Mentor Graphics. purpose and household appliances (GPS) and always-on (GSM) computer Nowadays, companies are begin- to process control and digital signal for various purposes. ning to provide modular real-time op- processing. “In the open source world, many erating systems, enabling developers times, less is more, as users usually to choose the parts that they require. -based RTOS like to pick their own software and Nucleus RTOS, for example, gives de- When speaking about modularity, cus- customise the product as they like, and velopers the freedom of choice. From tomisability, ‘light’ versions, choosing not as the developers like,” say Julien small applications using minimal ker- the right RTOS, etc, Linux-based RTOS Cassignol, Tom Hacohen, Sebastian nel and core services to more advanced definitely deserves a mention. Of late, Krzyszkowiak and Klaus Kurzmann, applications utilising available middle- quite a few Linux-based real-time op- the core team of SHR. ware, Nucleus RTOS satisfies a wide erating systems have come up. Some “we prefer using simpler versions range of customer requirements. The of them are: Stable Hybrid Release of applications for better perform- Nucleus RTOS is hardware independ- (SHR, for the -based mobile ance (speed) and more battery time, ent and has been ported to a number phones), Red Hat Embedded Linux as in cellphones, battery time is the of ARM, Power and MIPS architecture and eCos. most important feature. And, all our central processing units (CPUs). The SHR is currently undergoing is available for down- “Mentor offers a spectrum of soft- an extensive development, and at the load and customisation. Users also ware to address many types of devel- moment, there are two versions—SHR- play an important role in designing oper needs. In a minimal configuration, Lite and SHR-Full—that only differ our core and applica- the core Nucleus RTOS services are in the number of default applications tions through their feedback (wikis, very few. Nucleus com- installed. Soon, an SHR-terminal will mailing lists, Internet relay chat, ponents can be included to provide be developed that ships only with the etc),” they add. User contribution is additional services such as USB, net- core basics, not even X11 or a Graphi- one of the main benefits of Linux- working and graphics. For applications cal Interface. It will be used by people based open source RTOS; it means that require more extensive system who want to create their own RTOS that talented people from across the services, Mentor can bring Linux and distribution on top of SHR, or use it world are working on the software, Android technology to bear on these for other purposes that do not need and hence improving the quality and projects either independently or in an X server—from using it for fun ap- adding more features. www.efymag.com electronics for you • December 2009 • 101 Embedded Systems

Twelve questions to answer before you make your pick visor, you can seamlessly move legacy applications to newer platforms. 1. Are you going to build your own RTOS, choose an open source option, or a proprietary The hypervisor technology, at the one? basic level, can be seen as another 2. What is the total cost of ownership of the RTOS, including licence fees and royalties, if any, and the service or support charges? Is this affordable? name for virtualisation. It is a ‘virtual 3. What is the memory footprint of the RTOS? Is it small enough? machine monitor’ that can be imple- 4. Does the RTOS have all the features required by your application? On the other hand, mented at either or both the hardware is it too feature-rich, large and complicated? Is it possible to pick just what you want, and and software levels to enable multiple customise, if required? operating systems to run concurrently 5. Does it support the architecture you are working on? Multi-core, 64-bit support, etc, on a host computer. Virtualisation is if required? essential to ensure full CPU utilisation 6. How good is the performance: code size and reliability, interrupt latency, context switch times, service overhead, etc? in a multi-core system. 7. Hope it does not guzzle too much power, memory or other resources? The technology has recently been 8. Are there communications stacks (TCP/IP, USB), middleware, and other software extended to embedded systems as well, available (flash file systems, graphics, etc)? to enable a high-level operating system 9. Is it easy to work on, without too sharp a learning curve? interface for application programming, 10. Are there sufficient development tools? Are these easy to learn? Are development such as Linux or Windows. boards available? And, at the same time, maintaining 11. Is it scalable and portable? Will it work well with other processors? 12. Does the vendor provide good support? traditional real-time operating system application programming interfaces (APIs). Although SHR is being made and projects, from the Garmin navigation In accordance with the definition of tested for the ARM-based OpenMoko system to large-scale centres real-time operating systems, embedded phones, the open source nature means and embedded systems. hypervisors should also be capable of that it can also be adapted for other real-time operation, be it small in size, architectures. In fact, the SHR team Multi-core RTOS or using less resources. Hypervisors points out that many have shown “The recent trends that we have ob- can support only embedded architec- interest in coming up with a version served in the embedded RTOS space tures that allow , as for the . It can be adapted are around the multi-core and hyper- it is the key requirement for virtualisa- for usage with personal digital assist- visor technology. Another positive tion. Wind River, OK-labs, VMware, ants, navigation devices and Internet trend is around 64-bit applications in eSOL, etc, have hypervisor solutions tablets. embedded,” says Venkatesh Kumaran, for the embedded space. Red Hat also has an RTOS based country manager-India, Wind River on the , which gives the Systems. 64-bit RTOS user the ability to configure only what Speaking of multi-core proces- Regular appliances do not require they find is necessary. It means that sors, the first question that arises in high-end systems, and 8-bit and 16-bit they may trim down the final binary your mind is—cannot any RTOS be frameworks are more than sufficient to something that may fit their needs. used for embedded systems using for them. However, there are more Plus, the RTOS also inherits the ben- multi-core processors? You need an complex embedded systems that efits of the Linux parentage. “Any new RTOS capable of shared memory require greater degrees of comput- feature of the Linux kernel becomes a communication, integrated on-chip ing and much faster processing. For new feature of our RTOS. Currently, I/O support, intelligent cache utilisa- such requirements, the embedded we’ve included several tracing and tion strategies, inter-core interrupts, RTOS space is now opting for 64-bit performance utilities that will help out multithreading and multiprocess- platforms. 64-bit microcontroller units our customers in fine-tuning their sys- ing—that is, seamless system calls and 64-bit floating point units attain a tem. We’ve also included more robust across all processors, symmetric level of precision that is unimaginable priority inheritance, mutual exclusion, multiprocessing, optional asymmetric with 32-bit systems. This makes these application user interfaces…,” says a multiprocessing, etc. high-end processors suitable for critical Red Hat spokesperson. Keeping this popularity around telecommunication systems, process Although Red Hat is focusing pri- multi-core in mind, Wind River has control, and more. marily on architectures, the RTOS initiated a number of solutions target- “Today, there are large amounts of is available for ARM, PowerPC, Su- ing this space. They have on-chip de- data stored in the memory for higher perH, MIPS and more. Besides, it has bugging solutions that can debug up performance. we usually believe that been found suitable for a wide range of to eight cores. and, with their hyper- only a 64-bit operating system can suit

102 • December 2009 • electronics for you www.efymag.com Embedded Systems

IPv6 support and other Some popular embedded RTOSes advancements LynxOS. A Unix-like real-time operating system from LynuxWorks. It features full POSIX Basically, embedded RTOSes enable conformance and Linux compatibility developers and manufacturers to make QNX Neutrino. Supports ARM, MIPS, PowerPC, SH and X86 processor families VxWorks. A popular RTOS offered by Wind River, an Intel group company. Supports a the best use of the microprocessor board range of architectures like ARM, PowerPC, ColdFire and MIPS to make their device perform to the INTEGRITY. A hard RTOS from Inc, that supports ARM, PowerPC, optimum level. Hence, if a new feature ColdFire, x86, and so on is required in a product, not only the ThreadX. Express Logic's advanced RTOS designed specifically for deeply embedded microprocessor unit but also the embed- applications. It supports ARM, PowerPC, x86, etc ded RTOS should be able to support it. Windows CE. Microsoft’s offering for embedded systems and minimalist computers, this In that sense, RTOSes are constantly is supported on Intel x86 and compatibles, MIPS, ARM, and Hitachi SuperH processors Nucleus RTOS. A product of Mentor Graphics, Nucleus RTOS is a highly-modular, evolving to support new standards and hardware-independent RTOS that has been ported to a number of ARM, Power, and MIPS features, ranging from USB 3.0 to Inter- architecture central processing units net Protocol version 6.0 (IPv6). Red Hat Embedded Linux. An open source offering based on the Linux kernel, this has The Nucleus RTOS, for example, been used for a wide range of purposes, including navigation systems recently rolled out support for IPv6, eCos. An open source RTOS that supports ARM, Hitachi H8300, Intel x86, MIPS, including certification under the IPv6 Matsushita AM3x, 68k, PowerPC, SuperH, SPARC, NEC V8xx, etc Ready Logo (Phase 2) program. It FreeRTOS. FreeRTOS.org is a portable, open source, mini real-time kernel that supports more than a dozen architectures including ARM, AVR32 and MSP430 means that the developers who need OS. A leading open operating system for advanced data-enabled mobile phones. to integrate their products on IPv6 net- Suits advanced mobile phones also works have a certified protocol stack Stable Hybrid Release. SHR, available in full and light versions, is a Linux-based RTOS that can be interoperable with other developed and tested for ARM-based OpenMoko phones, although it can be ported to other IPv6 networked devices. architectures as well Android. A based on the Linux kernel. Google changed the way More in store the RTOS game was being played, with this successful release. Many consider it a market disruption. Several brands have launched Android phones now Although hidden somewhere within modern devices, the world of embed- ded systems is growing, providing an such high-performance metrics and Wind River is definitely gaining trac- impetus to the growth of the operating exploit the functionality of the silicon. tion in this space as the market moves system that powers it. But Wind River believes that RTOS to advanced telecommunications For an example, we have seen that requires at least 32-bit microproces- computing architecture/high avail- how 64-bit microprocessors that were sors, and we focus on this segment and ability (ATCA/HA) platforms. From once used in supercomputers and higher. The most significant feature of the defence perspective, a monumental entered the desktop computing space our most recent release, VxWorks 6.7, change has been observed in certifying around 2003, have already become is 64-bit computing,” says Kumaran. platforms on a VxWorks 653 operating a part of embedded systems. The 64-bit RTOSes usually support environment.” RTOSes have also quickly adapted 32/64-bit embedded microcontroller Coming back to Android, it is a to make the most of these powerful units, such as ARM, MIPS, Power Ar- Linux-based open source operating systems. Another example of how chitecture, 68K/Coldfire, x86, SuperH, system for mobile phones. It was fast the RTOS world reacts to market etc. The company is also capable of launched by Google and then taken changes is its reaction to the success of working on such platforms. over by the . Android. Almost every market leader There are now more than a dozen mo- has now accepted Android within its Android in the RTOS space bile phone models, including some by folds and offers products for, or based “Any discussion around the biggest , LG and HTC, that use An- on it. market disruptions that we have seen droid. As a result, it has now proved Therefore, although silent, the em- in the recent past would have to begin its worth, and is gaining traction. bedded RTOS space has shown and with the mention of Android. It is a RTOS majors, including Wind River continues to show significant growth game-changing initiative that also saw and Nucleus (Mentor Graphics), are and innovation, and is worth a fre- Wind River’s serious foray into the now offering Android-based products quent look-up.  mobile market,” says Kumaran. “We including development tools. have also seen embedded platforms with Linux and Android in the The author is a freelance writer based in moving to the enterprise computing picture, open source is becoming more Bengaluru. She writes on a variety of topics, her segment, and the acceptance of Linux. popular in the RTOS space. favourites being technology, cuisine, and life

104 • December 2009 • electronics for you www.efymag.com