About This Guide

QNX SDP8.0Getting Started with the QNX OSDeveloperUser

Getting Started with the QNX OS: A Guide for Realtime Programmers is intended to introduce you to the QNX OS and help you develop applications and resource managers for it.

Note:
EDITOR'S NOTE: This book was originally written by Rob Krten. We continue to update it, while still maintaining his tone.

The following table may help you find information quickly:

To find out about: Go to:
Using processes and threads Processes and Threads
Sending, receiving, and replying to messages Message Passing
Interrupts Interrupts
Writing resource managers Resource Managers
Full source code for the examples Sample Programs
Terms used in QNX docs Glossary

Who this book is for

This book is suitable for anyone wishing to gain a good fundamental understanding of the key features of the QNX OS and how it works. Readers with a modest computer background should still get a lot out of the book (although the discussion in each chapter gets more and more technical as the chapter progresses). Even diehard hackers should find some interesting twists, especially with the two fundamental features of QNX OS, the message-passing nature of the operating system and the way device drivers are structured.

I've tried to explain things in an easy-to-read conversational style, anticipating some of the common questions that come up and answering them with examples and diagrams. Because a complete understanding of the C language isn't required, but is definitely an asset, there are quite a few code samples sprinkled throughout.

What's in this book?

This book introduces you to what the QNX OS is and how it functions. It contains chapters covering process states, threads, scheduling policies, message passing, operating system modularity, and so on. If you've never used QNX OS before, but are familiar with realtime operating systems, then you'll want to pay particular attention to the chapters on message passing and resource managers, since these are concepts fundamental to QNX OS.

Processes and Threads
An introduction to processes and threads in QNX OS, realtime, scheduling, and prioritization. You'll learn about scheduling states and QNX OS's scheduling policies, as well as the functions you use to control scheduling, create processes and threads, and modify processes and threads that are already running. You'll see how QNX OS implements SMP (Symmetrical Multiprocessing), and the advantages (and pitfalls) that this brings.

Scheduling and the real world discusses how threads are scheduled on a running system, and what sorts of things can cause a running thread to be rescheduled.

Message Passing
An introduction to QNX OS's most fundamental feature, message passing. You'll learn what message passing is, how to use it to communicate between threads, and how to pass messages over a network. Priority inversion, the bane of realtime systems everywhere, and other advanced topics are also covered here.
Note:
This is one of the most important chapters in this book!
Interrupts
Learn about how the QNX OS processes interrupts and how to handle them.
Resource Managers
Learn all about QNX OS resource managers (also known variously as device drivers and I/O managers). You'll need to read and understand the Message Passing chapter before you write your own resource managers. The source for several complete resource managers is included.
Note:
Resource managers are another important aspect of every QNX OS-based system.
Glossary
Contains definitions of the terms used throughout this book.
Other references
In addition to the custom kernel interface, QNX OS implements a wide range of industry standards. This lets you support your favorite publishers when looking for information about standard functions from ANSI, POSIX, TCP/IP, etc.
Page updated: