A timer with an expiration point defined as a fixed time,
for example, January 20, 2005 at 09:43:12 AM, EDT. Contrast with
The characteristic that accessing an N-byte data element
must be performed only on an address that is a multiple of N.
For example, to access a 4-byte integer, the address of the integer must
be a multiple of 4 bytes (e.g., 0x2304B008, and not
On some CPU architectures, an alignment fault will occur if an attempt is
made to perform a non-aligned access.
On other CPU architectures (e.g., x86) a non-aligned access is simply
slower than an aligned access.
Used to indicate that a given operation is not synchronized to another
operation. For example, the timer tick interrupt that is generated by
the system's timer chip is said to be asynchronous to a
thread that's requesting a delay of a certain amount of time, because
the thread's request is not synchronized in any way to the arrival of
the incoming timer tick interrupt. Contrast with
An operation that is indivisible, that is to say, one that
will not get interrupted by any other operation.
Atomic operations are critical especially in interrupt service routines and
multi-threaded programs, as often a test and set sequence
of events must occur in one thread without the chance of another thread
interrupting this sequence.
A sequence can be made atomic from the perspective of multiple threads not
interfering with each other through the use of
with Interrupt service routines.
See the header file <atomic.h> as well.
A structure used within a
contains information relating to the device that the resource manager is
manifesting in the pathname space.
If the resource manager is manifesting multiple devices in the pathname space
(for example, the serial port resource manager might manifest /dev/ser1
and /dev/ser2) there will be an equal number of attribute
structures in the resource manager.
Contrast with OCB.
barrier (synchronization object)
A thread-level synchronization object with an associated count. Threads that
call the blocking barrier call
will block until
the number of threads specified by the count have all called the blocking
barrier call, and then they will all be released.
Contrast this with the operation of
A means for threads to synchronize to other threads or events. In the
blocking state (of which there are about a dozen), a thread doesn't
consume any CPU — it's waiting on a list maintained within the
kernel. When the event occurs that the thread was waiting for, the thread
is unblocked and is able to consume CPU again.
BlackBerry 10 OS's message-passing architecture is
structured around a client/server relationship.
In the case of the client, it's the one that is requesting services of
a particular server. The client generally accesses these services using
standard file-descriptor-based function calls (e.g.,
which are synchronous, in that the client's
call doesn't return until the request is completed by the server.
A thread can be both a client and a server
at the same time.
A synchronization object used between multiple
characterized by acting as a rendezvous point where multiple threads can
block, waiting for a signal (not to be confused with
a UNIX-style signal). When the signal is
delivered, one or more of the threads will
The concept of a client being
attached to a channel.
A connection is established by the client either directly by calling
or on behalf of the client by the client's C library function
In either case, the connection ID returned is usable
as a handle for all communications between the client and the
A handle returned by ConnectAttach() (on the
side) and used for all communications between the client and the
The connection ID is identical to the traditional C library's
That is to say, when open() returns a file descriptor, it's really returning
a connection ID.
A failure condition reached when two threads are mutually
on each other, with each thread waiting for the other to respond.
This condition can be generated quite easily; simply have two threads
send each other a message—at this point, both threads are waiting for the
other thread to reply to the request.
Since each thread is blocked, it will not have a chance to reply, hence
To avoid deadlock, clients and
should be structured around a send hierarchy (see below).
(Of course, deadlock can occur with more than two threads; A sends to B, B sends to C, and C
sends back to A, for example.)
In FIFO scheduling, a thread will consume CPU until
a higher priority thread is ready to run, or until the thread voluntarily
gives up CPU.
If there are no higher priority threads, and the thread does not voluntarily
give up CPU, it will run forever.
Contrast with round robin scheduling.
interrupt service routine
Code that gets executed (in privileged mode) by the kernel as a result of a
hardware interrupt. This code cannot perform any kernel calls and should
return as soon as possible, since it runs at a priority level effectively higher
than any other thread priority in the system. BlackBerry 10 OS's interrupt
service routines can return a struct sigevent that indicates
what event, if any, should be triggered.
IOV (I/O Vector)
A structure where each member contains a pointer and a length.
Generally used as an array of IOVs, rather than as a single IOV.
When used in the array form, this array of structures of pointers and lengths
defines a scatter/gather list, which allows the
message-passing operations to proceed much more
efficiently (than would otherwise be accomplished by copying data individually
so as to form one contiguous buffer).
The BlackBerry 10 OS operating system can be customized to run on various hardware,
without requiring a source license, by supplying kernel callouts to the startup
Kernel callouts let the developer supply code that knows how to deal with the
specifics of the hardware. For example, how to ask an interrupt controller
chip about which interrupt fired, or how to interface to the timer chip
to be able to arrange for periodic interrupts, etc.
This is documented in great depth in the Building Embedded Systems
A piece of hardware (usually embedded within the CPU)
that provides for virtual address
to physical address translation, and can be
used to implement a virtual memory system.
Under BlackBerry 10 OS, the primary benefit of an MMU is the ability to detect when
a thread has accessed a virtual address that is
not mapped into the process's address space.
A Mutual Exclusion object used to serialize a number of
threads so that only one thread at a time has access to the resources defined
by the mutex. By using a mutex every time (for example) that you access
a given variable, you're ensuring that only one thread at a time has access
to that variable, preventing race conditions. See also
Quoting from the Sudbury Neutrino Observatory web pages (found at
Neutrinos are tiny, possibly massless, neutral elementary particles which interact with matter via the weak
nuclear force. The weakness of the weak force gives neutrinos the property that matter is almost transparent
to them. The sun, and all other stars, produce neutrinos copiously due to nuclear fusion and decay processes
within the core. Since they rarely interact, these neutrinos pass through the sun and the earth (and you)
unhindered. Other sources of neutrinos include exploding stars (supernovae), relic neutrinos (from the birth
of the universe) and nuclear power plants (in fact a lot of the fuel's energy is taken away by neutrinos). For
example, the sun produces over two hundred trillion trillion trillion neutrinos every second, and a supernova
blast can unleash 1000 times more neutrinos than our sun will produce in its 10-billion year lifetime. Billions
of neutrinos stream through your body every second, yet only one or two of the higher energy neutrinos will
scatter from you in your lifetime.
OCB (open context block)
A data structure used by a
that contains information for each
If a client has opened several files, there will exist a corresponding OCB for each
file descriptor that the client has in the respective resource managers.
Contrast with the
An antique computer, Programmable Data Processor, manufactured between
1965 and the mid 1970's
by Digital Equipment Corporation (now Compaq) with the coolest front
panel. Also, the first computer I ever programmed.
Unfortunately, this wonderful 12-bit machine does not run BlackBerry 10 OS :-(!
An address that is emitted by the CPU onto the bus connected to the memory subsystem.
Since BlackBerry 10 OS runs in virtual address mode, this means
that an MMU must translate the virtual addresses used by
the threads into physical addresses usable by the
Contrast with virtual address
and virtual memory.
A non-schedulable entity that occupies memory, effectively acting as a container
for one or more threads.
Common name given to the set of function calls of the general form pthread_*().
The vast majority of these function calls are defined by the POSIX committee, and
are used with threads.
A thread can receive a message by calling MsgReceive() or MsgReceivev().
If there is no message available, the thread will block, waiting for one.
See Message passing.
A thread that receives a message is said to be a server.
When a serverreceives a message
from a client,
the server's MsgReceive() or
MsgReceivev() function returns a receive ID (often abbreviated
in code as rcvid). This rcvid then acts as a handle to the
blocked client, allowing the server
to reply with the data
back to the client, effectively unblocking the client.
Once the rcvid has been used in a reply operation, the rcvid ceases to have any
meaning for all function calls, except
A timer that has an expiration point defined as an offset from
the current time, for example, 5 minutes from now. Contrast with
timer that, once expired, will automatically reload with another relative
interval and will keep doing that until it is canceled. Useful for
receiving periodic notifications.
reply to a message
will reply to a client's
message in order to deliver the results of the client's request back to the client.
Also abbreviated resmgr.
This is a server process which provides certain
well-defined file-descriptor-based services to arbitrary
A resource manager supports a limited set of messages, which correspond to standard
client C library functions such as open(), read(), write(),
lseek(), devctl(), etc.
round robin (scheduling)
In Round Robin (or RR) scheduling, a
will consume CPU until a higher priority thread is ready to run, until the thread voluntarily
gives up CPU, or until the thread's timeslice expires.
If there are no higher priority threads, the thread doesn't voluntarily
give up CPU, and there are no other threads at the same priority, it will run forever.
If all the above conditions are met except that a thread at the same priority is
ready to run, then this thread will give up CPU after its timeslice expires, and
the other thread will be given a chance to run.
Contrast with FIFO scheduling.
Used to define the operation of message passing
where a number of different pieces of data are gathered by the
kernel (on either the client or
side) and then scattered into a (possibly) different number of
pieces of data on the other side.
This is extremely useful when, for example, a header needs to be prepended to
the client's data before it's sent to the server.
The client would set up an
IOV which would contain a pointer and
length of the header as the first element, and a pointer and length of the data
as the second element. The kernel would then gather this
data as if
it were one contiguous piece and send it to the server.
The server would operate analogously.
A thread synchronization primitive characterized by having
a count associated with it. Threads may call the
if the count was non-zero at the time of the call.
Every thread that calls sem_wait() decrements the count.
If a thread calls sem_wait() when the count is zero, the thread will
block until some other thread calls
to increment the count.
Contrast with barrier.
send a message
A thread can send a message to another thread. The MsgSend*() series
of functions are used to send the message; the sending thread blocks until
the receiving thread replies to the message.
See Message passing.
A thread that sends a message is said to be a Client.
A design paradigm whereby messages sent flow in one
direction, and messages replied to flow in another
The primary purpose of having a send hierarchy is to avoid
A send hierarchy is accomplished by assigning
and servers a level, and ensuring that
messages that are being sent go only to a higher level.
This avoids the potential for deadlock where two threads would send to each other,
because it would violate the send hierarchy — one thread should not have
sent to the other thread, as that other thread must have been at a lower level.
A server is a regular, user-level process that provides
certain types of functionality (usually file-descriptor-based) to clients.
Servers are typically Resource Managers, and there's an
extensive library provided by QSS which performs much
of the functionality of a resource manager for you.
The server's job is to receive messages from clients,
process them, and then reply to the messages, which
unblocks the clients.
A thread can be both a client and a server
at the same time.
A mechanism dating back to early UNIX systems that is used to send
notification of events from one thread to another.
Signals are non-blocking for the sender. The receiver of the signal may decide
to treat the signal in a synchronous manner by explicitly
waiting for it. Contrast with pulse.
A scheduling policy whereby a thread's priority can
oscillate dynamically between a foreground or
normal priority and a background or low priority.
A thread is given an execution budget of time to be consumed
within a certain replenishment period.
Used to indicate that a given operation has some synchronization to another
operation. For example, during a
when the server
does a MsgReply() (to reply to
the client), the unblocking of the client is said to be
synchronous to the reply operation.
Contrast with Asynchronous.
A single, schedulable, flow of execution. Threads are implemented directly within
the QNX Neutrino microkernel and correspond to the POSIX pthread*() function
calls. A thread will need to synchronize with other threads (if any) by using
various synchronization primitives such as
Threads are scheduled in
A thread that had been blocked will be unblocked
when the condition it has been blocked on is met. For example, a thread
might be blocked waiting to receive a message.
When the message is sent, the thread will be
An address that's not necessarily equivalent to a
Under BlackBerry 10 OS, all threads operate in virtual addressing
mode, where, through the magic of an MMU, the virtual
addresses are translated into physical addresses.
Contrast with physical address
and virtual memory.
A virtual memory system is one in which the
space may not necessarily map on a one-to-one basis with the
physical address space.
The typical example (which BlackBerry 10 OS doesn't support as of this writing) is a paged
system where, in the case of a lack of RAM, certain parts of a
address space may be swapped out to disk.
What BlackBerry 10 OS does support is the dynamic mapping of stack pages.