qnx.html   [plain text]


<!--$Id: qnx.so,v 11.12 2008/01/07 02:29:19 david Exp $-->
<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB Reference Guide: QNX</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<a name="2"><!--meow--></a>
<table width="100%"><tr valign=top>
<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Building Berkeley DB for UNIX/POSIX systems</dl></b></td>
<td align=right><a href="../build_unix/osf1.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../build_unix/sco.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p align=center><b>QNX</b></p>
<ol>
<p><li><b>To what versions of QNX has DB been ported?</b>
<p>Berkeley DB has been ported to the QNX Neutrino technology which is commonly
referred to as QNX RTP (Real-Time Platform).  Berkeley DB has not been
ported to earlier versions of QNX, such as QNX 4.25.</p>
<p><li><b>Building Berkeley DB shared libraries fails.</b>
<p>The <b>/bin/sh</b> utility distributed with some QNX releases drops
core when running the GNU libtool script (which is used to build Berkeley DB
shared libraries).  There are two workarounds for this problem: First,
only build static libraries.  You can disable building shared libraries
by specifying the <a name="--disable-shared">--disable-shared</a> configuration flag when
configuring Berkeley DB.</p>
<p>Second, build Berkeley DB using an alternate shell.  QNX distributions include
an accessories disk with additional tools.  One of the included tools
is the GNU bash shell, which is able to run the libtool script.  To
build Berkeley DB using an alternate shell, move <b>/bin/sh</b> aside, link
or copy the alternate shell into that location, configure, build and
install Berkeley DB, and then replace the original shell utility.</p>
<p><li><b>Are there any QNX filesystem issues?</b>
<p>Berkeley DB generates temporary files for use in transactionally
protected file system operations.  Due to the filename length limit of
48 characters in the QNX filesystem, applications that are using
transactions should specify a database name that is at most 43 characters.</p>
<p><li><b>What are the implications of QNX's requirement to use
<b>shm_open</b>(2) in order to use <b>mmap</b>(2)?</b>
<p>QNX requires that files mapped with <b>mmap</b>(2) be opened using
<b>shm_open</b>(2).  There are other places in addition to the
environment shared memory regions, where Berkeley DB tries to memory map files
if it can.</p>
<p>The memory pool subsystem normally attempts to use <b>mmap</b>(2)
even when using private memory, as indicated by the <a href="../../api_c/env_open.html#DB_PRIVATE">DB_PRIVATE</a>
flag to <a href="../../api_c/env_open.html">DB_ENV-&gt;open</a>.  In the case of QNX, if an application is
using private memory, Berkeley DB will not attempt to map the memory and will
instead use the local cache.</p>
<p><li><b>What are the implications of QNX's mutex implementation using
microkernel resources?</b>
<p>On QNX, the primitives implementing mutexes consume system resources.
Therefore, if an application unexpectedly fails, those resources could
leak.  Berkeley DB solves this problem by always allocating mutexes in the
persistent shared memory regions.  Then, if an application fails,
running recovery or explicitly removing the database environment by
calling the <a href="../../api_c/env_remove.html">DB_ENV-&gt;remove</a> method will allow Berkeley DB to release those
previously held mutex resources.  If an application specifies the
<a href="../../api_c/env_open.html#DB_PRIVATE">DB_PRIVATE</a> flag (choosing not to use persistent shared memory),
and then fails, mutexes allocated in that private memory may leak their
underlying system resources.  Therefore, the <a href="../../api_c/env_open.html#DB_PRIVATE">DB_PRIVATE</a> flag
should be used with caution on QNX.</p>
</ol>
<table width="100%"><tr><td><br></td><td align=right><a href="../build_unix/osf1.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../build_unix/sco.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
</body>
</html>