POSIX, that stands for Portable Operating System Interface, is a standard that is being jointly developed by the IEEE and The Open Group. It defines a standard operating system interface and environment, including a command interpreter (or "shell"), and common utility programs to support applications portability at the source code level. The current revision of POSIX is The Open Group Base Specifications Issue 6 and also the IEEE Std 1003.1-2001.
This standard is composed by four major components:
Base Definitions: This include general terms, concepts and interfaces common to entire standard.
System Interfaces: This comprises the definitions for system service functions for the C programming language, function and portability issues, error handling and recovery.
Shell and Utilities: It contains the definitions for a standard source code-level interface to command interpretation services.
Rationale: It contains information that does not fit well into the rest of the document structure.
The IEEE Std 1003.1-2001 standard is a single common revision to IEEE Std 1003.1-1996, IEEE Std 1003.2-1992, and the Base Specifications of The Open Group Single UNIX Specification, Version 2. In order to develope the current revision several base documents has been used. The base documents that are involved in the definition of system interfaces are:
IEEE Std 1003.1-1996 (POSIX-1) (incorporating IEEE Stds 1003.1-1990, 1003.1b-1993, 1003.1c-1995, and 1003.1i-1995)
The following amendments to the POSIX.1-1990 standard:
IEEE P1003.1a draft standard (Additional System Services)
IEEE Std 1003.1d-1999 (Additional Realtime Extensions)
IEEE Std 1003.1g-2000 (Protocol-Independent Interfaces (PII))
IEEE Std 1003.1j-2000 (Advanced Realtime Extensions)
IEEE Std 1003.1q-2000 (Tracing)
Open Group Technical Standard, February 1997, System Interface Definitions, Issue 5 (XBD5)
Open Group Technical Standard, February 1997, System Interfaces and Headers, Issue 5 (XSH5)
Open Group Technical Standard, January 2000, Networking Services, Issue 5.2 (XNS5.2)
ISO/IEC 9899:1999, Programming Languages - C.
As it can be observed this standard includes support for source portability of applications with realtime requirements, but this support is maintly optional for POSIX-conforming implementations. The specific functional areas included for realtime support and their definitions[1] are basically the following:
Semaphores.
A minimum synchronization primitive to serve as a basis for more complex synchronization mechanisms to be defined by the application program.
Process Memory Locking.
A performance improvement facility to bind application programs into the high-performance random access memory of a computer system. This avoids potential latencies introduced by the operating system in storing parts of a program that were not recently referenced on secondary memory devices.
Memory Mapped Files.
A facility to allow applications to access files as part of the address space.
Shared Memory Objects
An object that represents memory that can be mapped concurrently into the address space of more than one process.
Priority Scheduling.
A performance and determinism improvement facility to allow applications to determine the order in which threads that are ready to run are granted access to processor resources.
Realtime Signal Extension.
A determinism improvement facility to enable asynchronous signal notifications to an application to be queued without impacting compatibility with the existing signal functions.
Timers.
A mechanism that can notify a thread when the time as measured by a particular clock has reached or passed a specified value, or when a specified amount of time has passed.
Interprocess Communication.
A functionality enhancement to add a high-performance, deterministic interprocess communication facility for local communication.
Synchronized Input and Output.
A determinism and robustness improvement mechanism to enhance the data input and output mechanisms, so that an application can ensure that the data being manipulated is physically present on secondary mass storage devices.
Asynchronous Input and Output.
A functionality enhancement to allow an application process to queue data input and output commands with asynchronous notification of completion.
Another optional support that can be interesting for the developemnt of embedded applications is the Threads support. This extension to POSIX defines functionality to support multiple flows of control within a process. These flows of control are called threads and they share their address space and most of the resources and attributes defined in the operating system for the owner process.
The specific functional areas included in threads support are:
Thread management: the creation, control, and termination of multiple flows of control that share a common address space.
Synchronization primitives optimized for tightly coupled operation of multiple control flows in a common, shared address space.
Finally, the IEEE Std 1003.1-2001 standard also proposes a set of tracing facilities that can be quite useful at the development stage of a embedded real-time application. The tracing facilities defined in the standard allow a process to select a set of trace event types, to activate a trace stream of the selected trace events as they occur in the flow of execution, and to retrieve the recorded trace events. A trace event is a data object that represents an action executed by the system, and that is recorded in a trace stream. The trace events can be retrieved later from the trace stream, allowing the system behaviour analysis.
All these functionalities are not mandotory in a POSIX-conforming implementation, but defined as a set of options that may be supported by that system. In this line, the IEEE Std 1003.1-2001 standard defines several XSI extensions that groups together several of these options in so-called XSI Option Groups. The option groups that can be of interest for embedded real-time applications are described in the next section.
[1] | This definitionas are extracted from the IEEE Std 1003.1-2001 standard. |