26.02.2014 Views

Getting Started with QNX Neutrino - QNX Software Systems

Getting Started with QNX Neutrino - QNX Software Systems

Getting Started with QNX Neutrino - QNX Software Systems

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

© 2009, <strong>QNX</strong> <strong>Software</strong> <strong>Systems</strong> GmbH & Co. KG.<br />

When I found myself staring at the first draft of this book I started thinking that it was<br />

going to be a difficult read because I’d spent so many years intimately involved <strong>with</strong><br />

the design and development of <strong>QNX</strong> <strong>Neutrino</strong>. But I was wrong! I found this book<br />

easy to read and very enjoyable because of the way Rob combines the <strong>QNX</strong><br />

philosophy (“Why things are the way they are”) <strong>with</strong> good habits applicable to any<br />

realtime programming project. This book is suitable for people who’ve never seen<br />

<strong>Neutrino</strong> before, or those who’ve used it extensively.<br />

For people who’ve never used <strong>Neutrino</strong>, the book gives an excellent tutorial on how to<br />

use it. Since Rob himself comes from a <strong>QNX</strong> 2 and <strong>QNX</strong> 4 background, his book is<br />

also great for people who’ve used a <strong>QNX</strong> operating system before, because they share<br />

a common ground.<br />

As for myself, I was first introduced to <strong>QNX</strong> at an insurance company in the<br />

mid-1980s. This insurance company primarily used an IBM mainframe, but they<br />

wanted to shorten the time required to calculate quotes on corporate insurance. To do<br />

this they used networks of 8 MHz 80286 ATs running <strong>QNX</strong> 2. They distributed their<br />

data using <strong>QNX</strong> native networking, allowing access to all customer data files from any<br />

<strong>QNX</strong> machine. This system was well-designed using the <strong>QNX</strong> client/server<br />

philosophy and I was hooked on <strong>QNX</strong>.<br />

When I joined QSS at the start of 1991, <strong>QNX</strong> 4 had just been released. <strong>QNX</strong> 4 was<br />

developed to conform to the just-approved POSIX 1003.1 specification which would<br />

make it easier to port public domain UNIX code than it was <strong>with</strong> <strong>QNX</strong> 2, and it would<br />

conform to a genuine standard. In a few years we started thinking about the<br />

next-generation operating system. The current group of less than 15 developers started<br />

meeting to discuss anything we’d like to do differently and things that we’d need in the<br />

future. We wanted to support the newer POSIX specifications and make it easier to<br />

write drivers. We also didn’t want to lock ourselves to the x86 processor or “fix”<br />

anything that wasn’t broken. The ideas that Dan Dodge and Gordon Bell started out<br />

<strong>with</strong> when they created <strong>QNX</strong> are still in <strong>Neutrino</strong> today — ideas like message-passing,<br />

having a small, lean kernel, providing fast, realtime response, etc. Complicating the<br />

design was the goal of <strong>Neutrino</strong> being even more modular than <strong>QNX</strong> 4 (for example,<br />

we wanted to provide a fully-functional kernel that you could link against, allowing<br />

for more deeply embedded systems than <strong>QNX</strong> 4). In 1994 Dan Dodge and I started<br />

working on the updated kernel and process manager.<br />

As those of you who’ve been using <strong>QNX</strong> products for a long time already know,<br />

writing device drivers for <strong>QNX</strong> 2 was a hair-raising experience. You had to be very<br />

careful! In fact, most developers started <strong>with</strong> the QSS-supplied source for the spool<br />

device and carefully tweaked it to do whatever they wanted. Only a few people tried<br />

writing disk drivers, as this required specialized assembly language stubs. Because of<br />

this, almost nobody ended up writing drivers for <strong>QNX</strong> 2. In <strong>QNX</strong> 4, writing drivers<br />

was made much easier by making all I/O operations go through a standard,<br />

well-defined, message-passing interface. When you did an open(), the server received<br />

an open message. When you did a read(), the server received a read message. <strong>QNX</strong> 4<br />

capitalized on the message passing theme by using it to decouple clients from servers.<br />

I remember when I first saw the beta version 3.99 (a <strong>QNX</strong> 4 pre-release version) and<br />

April 30, 2009 Foreword to the First Edition by Peter van der Veen 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!