This guide is designed for programmers who are using computer systems running DIGITAL UNIX® and want to use realtime functions. Users may be writing new realtime applications or they may be porting existing realtime applications from other systems.
This guide explains how to use POSIX 1003.1b (formerly POSIX 1003.4 Draft 14) functions in combination with other system and library functions to write realtime applications. This guide does not attempt to teach programmers how to write applications.
The audience for this guide is application programmers or system engineers who are already familiar with the C programming language. The audience using realtime features is expected to have experience with UNIX operating systems. They also should have experience with UNIX program development tools.
This guide does not present function syntax or reference information. The online reference pages present syntax and explanations of POSIX 1003.1b functions.
This guide has been revised to document all of the changes to realtime programming that are part of the current release, including conformance to the POSIX 1003.1b standard. It includes:
A completely revised chapter about realtime signals, Chapter 5
A new chapter about file synchronization, Chapter 8
A new chapter about realtime performance and system tuning, Chapter 11
This guide consists of eleven chapters and one appendix, organized as follows:
Chapter 1, Introduction to Realtime Programming, describes the realtime functionality supported by the DIGITAL UNIX operating system.
Chapter 2, The DIGITAL UNIX Scheduler, describes the use of P1003.1b functions to determine and set priority for processes in your application. This chapter also describes the priority scheduling policies provided by the DIGITAL UNIX operating system.
Chapter 3, Shared Memory, describes the creation and use of P1003.1b shared memory for interprocess communication.
Chapter 4, Memory Locking, describes the use of P1003.1b functions for locking and unlocking memory.
Chapter 5, Signals, describes the creation and use of POSIX 1003.1b realtime signals for interprocess communication.
Chapter 6, Clocks and Timers, describes use of P1003.1b functions for constructing and using high-resolution clocks and timers.
Chapter 7, Asynchronous Input and Output, describes the use of P1003.1b functions for asynchronous input and output.
Chapter 8, File Synchronization, describes the use of POSIX 1003.1b functions for synchronized input and output.
Chapter 9, Semaphores, describes the creation and use of P1003.1b semaphores for interprocess synchronization. An example illustrates how to use semaphores and shared memory in combination.
Chapter 10, Messages, describes the creation and use of message queues for interprocess communication and synchronization in realtime applications.
Chapter 11, Realtime Performance and System Tuning, describes tuning techniques for improving realtime system performance.
Appendix A, DIGITAL UNIX Realtime Functional Summary, provides tables of commands and functions useful for realtime application development.
The following documents are relevant to writing realtime applications:
DIGITAL UNIX Application Programmer's Guide
DIGITAL UNIX POSIX.1 Conformance Document
The C Programming Language by Kernighan and Ritchie
Guide to Developing International Software
Online Reference Pages
To view online reference pages for P1003.1b functions, use the
man
or
whatis
command.
The printed version of the DIGITAL UNIX documentation set is color coded to help specific audiences quickly find the books that meet their needs. (You can order the printed documentation from DIGITAL.) This color coding is reinforced with the use of an icon on the spines of books. The following list describes this convention:
Audience | Icon | Color Code |
General users | G | Blue |
System and network administrators | S | Red |
Programmers | P | Purple |
Device driver writers | D | Orange |
Reference page users | R | Green |
Some books in the documentation set help meet the needs of several audiences. For example, the information in some system books is also used by programmers. Keep this in mind when searching for information on specific topics.
The Documentation Overview, Glossary, and Master Index provides information on all of the books in the DIGITAL UNIX documentation set.
Additional information about system commands and library functions
(including P1003.1b functions) is shipped on the system software kit, and
can be accessed through the
man
command.
The
man
command provides online displays of the reference
pages.
You can use options to direct the
man
command to
display online summaries of specific reference pages, to use special
formatting when preparing the reference page for viewing or printing, and to
search alternate reference page directories for specified reference pages.
Use the
man
command to access the online reference pages
for the P1003.1b functions discussed in this guide.
If you need help using
the
man
command, use this command:
% man man
If you do not specify an option, the
man
command formats
and displays one or more specified reference pages.
If multiple reference
pages match a specified name, only the first matching reference page is
displayed.
If there are multiple matches in one section for a specified
name, the matching page in the first alphabetically occurring subsection is
displayed.
The following conventions are used in this guide:
Convention | Meaning |
% | The default user prompt is the user's system name followed by a right angle bracket. In this guide, a percent sign (%) is used to represent this prompt. |
# | A number sign is the default
superuser
prompt. |
>> CPUnn>> | The console subsystem prompt is two right angle brackets. On a system with more than one central processing unit (CPU), the prompt displays two numbers: the number of the CPU, and the number of the processor slot containing the board for that CPU. |
user input | This bold typeface is used in interactive examples to indicate typed user input. |
system output |
In text, this typeface indicates the exact name of a command, function, option, partition, pathname, directory, or file. This typeface is used in interactive examples to indicate system output. It is also used in code examples and other screen displays. |
variable | This typeface indicates variable information, such as user-supplied information in commands, syntax, or example text. |
. . . | Horizontal ellipsis indicates that the preceding item can be repeated one or more times. It is used in syntax descriptions and function definitions. |
. . . |
Vertical ellipsis indicates that a portion of an example that would normally be present is not shown. |
UPPERCASE lowercase | The system differentiates between lowercase and uppercase characters. Literal strings that appear in text, examples, syntax descriptions, and function definitions must be typed exactly as shown. |
cat (1) |
Cross-references to the online reference
pages include the appropriate section number in parentheses.
For example, a
reference to
cat (1) indicates that you can find the
material on the
cat
command in Section 1 of the online
reference pages. |
DIGITAL welcomes any comments and suggestions you have on this and other DIGITAL UNIX manuals.
You can send your comments in the following ways:
Fax: 603-881-0120 Attn: UBPG Publications, ZK03-3/Y32
Internet electronic mail:
readers_comment@zk3.dec.com
A Reader's Comment form is located on your system in the following location:
/usr/doc/readers_comment.txt
Mail:
Digital Equipment Corporation
UBPG Publications Manager
ZK03-3/Y32
110 Spit Brook Road
Nashua, NH 03062-9987
A Reader's Comment form is located in the back of each printed manual. The form is postage paid if you mail it in the United States.
Please include the following information along with your comments:
The full title of the book and the order number. (The order number is printed on the title page of this book and on its back cover.)
The section numbers and page numbers of the information on which you are commenting.
The version of DIGITAL UNIX that you are using.
If known, the type of processor that is running the DIGITAL UNIX software.
The DIGITAL UNIX Publications group cannot respond to system problems or technical support inquiries. Please address technical questions to your local system vendor or to the appropriate DIGITAL technical support office. Information provided with the software media explains how to send problem reports to DIGITAL.