Commericial Operating Systems
Commericial Operating Systems
6 32
Embedded System Commercial Real-Time
Software Operating Systems
Version 2 EE IIT, Kharagpur 1 Version 2 EE IIT, Kharagpur 2
Specific Instructional Objectives Open Source: Provides portability at the source code level. To run an application on a new
platform would require only compilation and linking. ANSI and POSIX are important open
At the end of this lesson, the student would be able to: source standards.
x Get an understanding of open software Open Object: This standard provides portability of unlinked object modules across different
platforms. To run an application in a new environment, relinking of the object modules
x Know the historical background under which POSIX was developed would be required.
x Get an overview of POSIX Open Binary: This standard provides complete software portability across hardware
platforms based on a common binary language structure. An open binary product can be
x Understand the Real-Time POSIX standard
portable at the executable code level. At the moment, no open binary standards.
x Get an insight into the features of some of the popular Real-Time OS: PSOS, VRTX,
VxWorks, QNX, µC/OS-II, RT-Linux, Lynx, Windows CE The main goal of POSIX is application portability at the source code level. Before we discuss
about RT-POSIX, let us explore the historical background under which POSIX was developed.
1. Introduction
1.3. Genesis of POSIX
Many real-time operating systems are at present available commercially. In this lesson, we
analyze some of the popular real-time operating systems and investigate why these popular Before we discuss the different features of the POSIX standard in the next subsection, let us
systems cannot be used across all applications. We also examine the POSIX standards for RTOS understand the historical developments that led to the development of POSIX.
and their implications. Unix was originally developed by AT&T Bell Labs. Since AT&T was primarily a
telecommunication company, it felt that Unix was not commercially important for it. Therefore,
1.1. POSIX it distributed Unix source code free of cost to several universities. UCB (University of California
at Berkeley) was one of the earliest recipient of Unix source code.
POSIX stands for Portable Operating System Interface. “X” has been suffixed to the AT&T later got interested in computers, realized the potential of Unix and started developing
abbreviation to make it sound Unix-like. Over the last decade, POSIX has become an important Unix further and came up with Unix V. Meanwhile, UCB had incorporated TCP/IP into Unix
standard in the operating systems area including real-time operating systems. The importance of through a large DARPA (Defense Advanced Research Project Agency of USA) project and had
POSIX can be gauzed from the fact that nowadays it has become uncommon to come across a come up with BSD 4.3 and C Shell. With this, the commercial importance of Unix started to
commercial operating system that is not POSIX-compliant. POSIX started as an open software grow rapidly. As a result, many vendors implemented and extended Unix services in different
initiative. Since POSIX has now become overwhelmingly popular, we discuss the POSIX ways: IBM with its AIX, HP with its HP-UX, Sun with its Solaris, Digital with its Ultrix, and
requirements on real-time operating systems. We start with a brief introduction to open SCO with SCO-Unix. Since there were so many variants of Unix, portability of applications
software movement and then trace the historical events that have led to the emergence of across Unix platforms became a problem. It resulted in a situation where a program written on
POSIX. Subsequently, we highlight the important requirements of real-time POSIX. one Unix platform would not run on another platform.
The need for a standard Unix was recognized by all. The first effort towards standardization
of Unix was taken by AT&T in the form of its SVID (System V Interface Definition). However,
1.2. Open Software BSD and other vendors ignored this initiative. The next initiative was taken under ANSI/IEEE,
which yielded POSIX.
An open system is a vendor neutral environment, which allows users to intermix hardware,
software, and networking solutions from different vendors. Open systems are based on open
standards and are not copyrighted, saving users from expensive intellectual property right (IPR) 1.4. Overview of POSIX
law suits. The most important characteristics of open systems are: interoperability and
portability. Interoperability means systems from multiple vendors can exchange information POSIX is an off-shoot of the open software movement, and portability of applications across
among each other. A system is portable if it can be moved from one environment to another different variants of Unix operating systems was the major concern. POSIX standard defines
without modifications. As part of the open system initiative, open software movement has only interfaces to operating system services and the semantics of these services, but does not
become popular. specify how exactly the services are to be implemented. For example, the standard does not
Advantages of open software include the following: It reduces cost of development and time specify whether an operating system kernel must be single threaded or multithreaded or
to market a product. It helps increase the availability of add-on software packages. It enhances at what priority level the kernel services are to be executed.
the ease of programming. It facilitates easy integration of separately developed modules. The POSIX standard has several parts. The important parts of POSIX and the aspects that
POSIX is an off-shoot of the open software movement. they deal with, are the following:
Open Software standards can be divided into three categories:
1.6.5. µC/OS-II
1.6.3. VxWorks
µC/OS-II is a free RTOS, easily available on Internet. It is written in ANSI C and contains
VxWorks is a product from Wind River Systems. It is host-target system. The host can be small portion of assembly code. The assembly language portion has been kept to a minimum to
either a Windows or a Unix machine. It supports most POSIX-RT functionalities. VxWorks make it easy to port it to different processors. To date, µC/OS-II has been ported to over 100
comes with an integrated development environment (IDE) called Tornado. In addition to the different processor architectures ranging from 8-bit to 64-bit microprocessors, microcontrollers,
standard support for program development tools such as editor, cross-compiler, cross-debugger, and DSPs. Some important features of µC/OS-II are highlighted in the following.
etc. Tornado contains VxSim and WindView. VxSim simulates a VxWorks target for use as a
prototyping and testing environment. WindView provides debugging tools for the simulator x µC/OS-II was designed so that the programmer can use just a few of the offered services
environment. VxMP is the multiprocessor version of VxWorks. or select the entire range of services. This allows the programmer to minimize the
VxWorks was deployed in the Mars Pathfinder which was sent to Mars in 1997. Pathfinder amount of memory needed by µC/OS-II on a per-product basis.
landed in Mars, responded to ground commands, and started to send science and engineering x µC/OS-II has a fully preemptive kernel. This means that µC/OS-II always ensures that
data. However, there was a hitch: it repeatedly reset itself. Remotely using trace generation, the highest priority task that is ready would be taken up for execution.
logging, and debugging tools of VxWorks, it was found that the cause was unbounded priority
x µC/OS-II allows up to 64 tasks to be created. Each task operates at a unique priority
inversion. The unbounded priority inversion caused real-time tasks to miss their deadlines, and
as a result, the exception handler reset the system each time. Although VxWorks supports level. There are 64 priority levels. This means that round-robin scheduling is not
priority inheritance, using the remote debugging tool, it was found to have been disabled in the supported. The priority levels are used as the PID (Process Identifier) for the tasks.
configuration file. The problem was fixed by enabling it. x µC/OS-II uses a partitioned memory management. Each memory partition consists of
several fixed sized blocks. A task obtains memory blocks from the memory partition and
1.6.4. QNX the task must create a memory partition before it can be used. Allocation and
deallocation of fixed-sized memory blocks is done in constant time and is deterministic.
QNX is a product from QNX Software System Ltd. QNX Neutrino offers POSIX-compliant A task can create and use multiple memory partitions, so that it can use memory blocks
APIs and is implemented using microkernel architecture. of different sizes.
The microkernel architecture of QNX is shown in Fig. 32.2. Because of the fine grained x µC/OS-II has been certified by Federal Aviation Administration (FAA) for use in
scalability of the micro- kernel architecture, it can be configured to a very small size – a critical commercial aircraft by meeting the demanding requirements of its standard for software
advantage in high volume devices, where even a 1% reduction in memory costs can return used in avionics. To meet the requirements of this standard it was demonstrated through
millions of dollars in profit. documentation and testing that it is robust and safe.
1.6.6. RT Linux
Linux is by large a free operating system. It is robust, feature rich, and efficient. Several real-
time implementations of Linux (RT-Linux) are available. It is a self-host operating system (see
Fig. 32.3). RT-Linux runs along with a Linux system. The real-time kernel sits between the
hardware and the Linux system. The RT kernel intercepts all interrupts generated by the
hardware. Fig. 32.12 schematically shows this aspect. If an interrupt is to cause a real-time task