Glossary
- application ID
- A number that identifies all processes that are part of an application. Like process group IDs,
the application ID value is the same as the process ID of the first process in the
application. A new application is created by spawning with the
POSIX_SPAWN_NEWAPP or SPAWN_NEWAPP flag.
A process created without one of those inherits the application ID of its parent. A
process needs the PROCMGR_AID_CHILD_NEWAPP ability in order to set those
flags.
The SignalKill() kernel call accepts a SIG_APPID flag ORed into the signal number parameter. This tells it to send the signal to all the processes with an application ID that matches the pid argument. The DCMD_PROC_INFO devctl() returns the application ID in a structure field.
- asymmetric multiprocessing (AMP)
- A multiprocessing system where a separate OS, or a separate instantiation of the same OS, runs on each CPU.
- atomic
- Of or relating to atoms. :-)
In operating systems, this refers to the requirement that an operation, or sequence of operations, be considered indivisible. For example, a thread may need to move a file position to a given location and read data. These operations must be performed in an atomic manner; otherwise, another thread could preempt the original thread and move the file position to a different location, thus causing the original thread to read data from the second thread's position.
- attributes structure
- Structure containing information used on a per-resource basis (as opposed to the OCB,
which is used on a per-open basis).
This structure is also known as a handle. The structure definition is fixed (iofunc_attr_t), but may be extended. See also mount structure.
- bank-switched
- A term indicating that a certain memory component (usually the device holding an image)
isn't entirely addressable by the processor. In this case, a hardware component manifests
a small portion (or
window
) of the device onto the processor's address bus. Special commands have to be issued to the hardware to move the window to different locations in the device. See also linearly mapped. - base layer calls
- Convenient set of library calls for writing resource managers. These calls all start with resmgr_*(). Note that while some base layer calls are unavoidable (e.g., resmgr_attach()), we recommend that you use the POSIX layer calls where possible.
- BIOS/ROM Monitor extension signature
- A certain sequence of bytes indicating to the BIOS or ROM Monitor that the device is to be
considered an
extension
to the BIOS or ROM Monitor—control is to be transferred to the device by the BIOS or ROM Monitor, with the expectation that the device will perform additional initializations.On the x86 architecture, the two bytes 0x55 and 0xAA must be present (in that order) as the first two bytes in the device, with control being transferred to offset 0x0003.
- block-integral
- The requirement that data be transferred such that individual structure components are
transferred in their entirety—no partial structure component transfers are
allowed.
In a resource manager, directory data must be returned to a client as block-integral data. This means that only complete struct dirent structures can be returned—it's inappropriate to return partial structures, assuming that the next _IO_READ request will
pick up
where the previous one left off. - bootable
- An image can be either bootable or nonbootable. A bootable image is one that contains the startup code that the IPL can transfer control to.
- bootfile
- The part of an OS image that runs the startup code and the microkernel.
- bound multiprocessing (BMP)
- A multiprocessing system where a single instantiation of an OS manages all CPUs simultaneously, but you can lock individual applications or threads to a specific CPU.
- budget
- In sporadic scheduling, the amount of time a thread is permitted to execute at its normal priority before being dropped to its low priority.
- buildfile
- A text file containing instructions for mkifs specifying the contents and other details of an image, or for mkefs specifying the contents and other details of an embedded filesystem image.
- canonical mode
- Also called edited mode or
cooked
mode. In this mode, the character device library performs line-editing operations on each received character. Only when a line iscompletely entered
—typically when a carriage return (CR) is received—will the line of data be made available to application processes. Contrast raw mode. - card information structure (CIS)
- A data block that maintains information about flash configuration. The CIS description includes the types of memory devices in the regions, the physical geometry of these devices, and the partitions located on the flash.
- channel
- A kernel object used with message passing.
In QNX OS, message passing is directed towards a connection (made to a channel); threads can receive messages from channels. A thread that wishes to receive messages creates a channel (using ChannelCreate()), and then receives messages from that channel (using MsgReceive()). Another thread that wishes to send a message to the first thread must make a connection to that channel by
attaching
to the channel (using ConnectAttach()) and then sending data (using MsgSend()). - chid
- An abbreviation for channel ID.
- cluster
- A group of associated processors.
Some clusters are always defined, including one representing all the processors in the system,
and a set of clusters where each one represents a different processor.
So on a system with N processors,
there are always (at least) N+1 clusters.
Further clusters may be defined by the startup program.
- coid
- An abbreviation for connection ID.
- combine message
- A resource manager message that consists of two or more messages. The messages are constructed
as combine messages by the client's C library (e.g., stat(),
readblock()), and then handled as individual messages by the resource
manager.
The purpose of combine messages is to provide support for atomic operations. See also connect message and I/O message.
- Common Internet File System (CIFS)
also known as Server Message Block (SMB)
A protocol that allows a client workstation to perform transparent file access over a network to a Windows server. Client file access calls are converted to CIFS protocol requests and are sent to the server over the network. The server receives the request, performs the actual filesystem operation, and sends a response back to the client.- connect message
- In a resource manager, a message issued by the client to perform an operation based on a pathname (e.g., an io_open message). Depending on the type of connect message sent, a context block (i.e., an OCB) may be associated with the request and will be passed to subsequent I/O messages. Also refer to combine message and I/O message.
- connection
- A kernel object used with message passing.
Connections are created by client threads to
connect
to the channels made available by servers. Once connections are established, clients can MsgSend*() messages over them. If a number of threads in a process all attach to the same channel, then the one connection is shared among all the threads. Channels and connections are identified within a process by a small integer.The key thing to note is that connections and file descriptors (FD) are one and the same object. See also channel and FD.
- context
- Information retained between invocations of functionality.
When using a resource manager, the client sets up an association or context within the resource manager by issuing an open() call and getting back a file descriptor. The resource manager is responsible for storing the information required by the context (see OCB). When the client issues further file-descriptor based messages, the resource manager uses the OCB to determine the context for interpretation of the client's messages.
- cooked mode
- See canonical mode.
- core dump
- A file describing the state of a process that terminated abnormally.
- critical section
- A code passage that must be executed
serially
(i.e., by only one thread at a time). The simplest from of critical section enforcement is via a mutex. - deadlock
- A condition in which one or more threads are unable to continue due to resource contention. A common form of deadlock can occur when one thread sends a message to another, while the other thread sends a message to the first. Both threads are now waiting for each other to reply to the message. Deadlock can be avoided by good design practices or massive kludges—we recommend the good design approach.
- design safe state (DSS)
- Generally speaking, a well-defined state that the kernel transitions to when it encounters a situation that it cannot handle. For QNX OS, moving to DSS includes outputting certain important kernel variables and other information, such as a shutdown report, by invoking the display_char() kernel callout, and then invoking the reboot() kernel callout. The intent of DSS is to stop the system as soon as behavior requirements can no longer be guaranteed. Calling reboot() ensures that the entire system enters a safe state.
- device driver
- A process that allows the OS and application programs to use the underlying hardware in a generic way (e.g., a disk drive, a network interface). Unlike OSs that require device drivers to be tightly bound into the OS itself, device drivers for the QNX OS are standard processes that can be started and stopped dynamically. As a result, adding device drivers doesn't affect any other part of the OS—drivers can be developed and debugged like any other application. Also, device drivers are in their own protected address space, so a bug in a device driver won't cause the entire OS to shut down.
- discrete (or traditional) multiprocessor system
- A system that has separate physical processors hooked up in multiprocessing mode over a board-level bus.
- Domain Name System (DNS)
- An Internet protocol used to convert ASCII domain names into IP addresses.
- dynamic bootfile
- An OS image built on the fly. Contrast static bootfile.
- dynamic linking
- The process whereby you link your modules in such a way that the Process Manager will link them
to the library modules before your program runs. The word
dynamic
here means that the association between your program and the library modules that it uses is done at load time, not at link time. Contrast static linking. See also runtime loading. - edge-sensitive
- One of two ways in which a PIC (Programmable Interrupt Controller) can be programmed to
respond to interrupts. In edge-sensitive mode, the interrupt is
noticed
upon a transition to/from the rising/falling edge of a pulse. Contrast level-sensitive. - edited mode
- See canonical mode.
- End of Interrupt (EOI)
- A command that the OS sends to the programmable interrupt controller (PIC) after masking the current interrupt level and before scheduling any Interrupt Service Threads (ISTs) for this interrupt. This tells the PIC to reset the processor's In Service Register. See also PIC and IST.
- erasable programmable read-only memory (EPROM)
- A memory technology that allows the device to
be programmed (typically with higher-than-operating voltages, e.g., 12 V), with
the characteristic that any bit (or bits) may be individually programmed from a
1 state to a 0 state.
Changing a bit from a 0 state into a 1 state can be accomplished only by erasing the entire device, setting all of the bits to a 1 state. Erasing is accomplished by shining an ultraviolet light through the erase window of the device for a fixed period of time (typically 10-20 minutes). The device is further characterized by having a limited number of erase cycles (typically 10e5 - 10e6). Contrast with flash and RAM.
- event
- A scheme used to notify a thread that a particular condition has occurred. QNX has several mechanisms for notifying a thread about the occurrence of a condition, including pulses, signals, semaphores, updates to memory, thread creation, unblocking of kernel calls, and unblocking of ISTs.
- file descriptor (FD)
- A handle that a client process uses to access a resource such as a file, socket, pipe, etc. In a QNX system, a file descriptor is also a connection ID that the client obtained by connecting to a server by a call such as open() or socket(). The client can then use the file descriptor in subsequent calls to operate on the same resource.
- first in, first out (FIFO)
- A scheduling policy whereby a thread is able to consume CPU at its priority level without bounds. Also refer to round robin and sporadic.
- flash memory
- A memory technology similar in characteristics to EPROM memory, with the exception that erasing is performed electrically instead of via ultraviolet light, and, depending upon the organization of the flash memory device, erasing may be accomplished in blocks (typically 64 KB at a time) instead of the entire device. Contrast EPROM and RAM.
- garbage collection
- Also known as space reclamation, the process whereby a filesystem manager recovers the space occupied by deleted files and directories.
- handle
- A pointer that the resource manager base library binds to the pathname registered via resmgr_attach(). This handle is typically used to associate some kind of per-device information. Note that if you use the iofunc_*() POSIX layer calls, you must use a particular type of handle—in this case called an attributes structure.
- hardware interrupt
- See interrupt.
- high availability (HA)
- In telecommunications and other industries, HA describes a system's ability to remain up and running without interruption for extended periods of time.
- I/O message
- A message that relies on an existing binding between the client and the resource manager. For example, an _IO_READ message requires that the client has established an association (or context) with the resource manager by issuing an open() and getting back a file descriptor. Also refer to connect message, context, combine message, and message.
- I/O privileges
- Particular rights, that, if enabled for a given thread, allow the thread to perform I/O instructions (such as the x86 assembler in and out instructions). By default, I/O privileges are disabled because a program with them enabled can disrupt the system. To enable I/O privileges, the process must have the PROCMGR_AID_IO ability enabled (see procmgr_ability()), and the thread must call ThreadCtl().
- image
- In the context of embedded QNX OS systems, an image can mean either a structure that contains files (i.e., an OS image) or a structure that can be used in a read-only, read/write, or read/write/reclaim FFS-3-compatible filesystem (i.e., a flash filesystem image).
- inherit mask
- A bitmask that specifies which processors a thread's children can run on. Contrast with runmask.
- initial program loader (IPL)
- The software component that either takes control at the processor's reset vector (e.g., location 0xFFFFFFF0 on the x86), or is a BIOS extension. This component is responsible for putting a machine into a usable state such that the startup program can then perform further initializations. The IPL is written in assembler and C. See also BIOS extension signature and startup code.
- interprocess communication (IPC)
- The ability for two processes (or threads) to communicate. The QNX OS offers several forms of IPC, most notably native messaging (synchronous, client/server relationship), POSIX message queues and pipes (asynchronous), and signals.
- interrupt
- An event (usually caused by hardware) that interrupts whatever the processor was doing and asks it to do something else. The hardware will generate an interrupt whenever it has reached some state where software intervention is required.
- interrupt handler
- See interrupt service routine.
- interrupt latency
- The amount of time elapsed between the generation of a hardware interrupt and
the first instruction executed by the relevant interrupt service thread (IST) returning from its
blocking function. Also designated as
Til
. - interrupt request (IRQ)
- A hardware request line asserted by a peripheral to indicate that it requires servicing by software. The IRQ is handled by the PIC, which then interrupts the processor, usually causing the processor to execute an Interrupt Service Thread (IST).
- interrupt service routine (ISR)
- A routine responsible for servicing hardware (e.g., reading
and/or writing some device ports), for updating some data structures shared between the
ISR and the thread(s) running in the application, and for signalling the thread that some
kind of event has occurred.
Note:QNX OS does not use ISRs anymore; see ISTs.
- interrupt service thread (IST)
- A thread that is responsible for servicing an interrupt.
The thread attaches to the interrupt via InterruptAttachThread() or InterruptAttachEvent(), and then blocks waiting for the QNX OS to unblock it after an interrupt has happened.
- kernel
- See microkernel.
- level-sensitive
- One of two ways in which a PIC (Programmable Interrupt Controller) can be programmed to respond to interrupts. If the PIC is operating in level-sensitive mode, the IRQ is considered active whenever the corresponding hardware line is active. Contrast edge-sensitive.
- linearly mapped
- A term indicating that a certain memory component is entirely addressable by the processor. Contrast bank-switched.
- message
- A parcel of bytes passed from one process to another. The OS attaches no special meaning to the
content of a message—the data in a message has meaning for the sender of the message
and for its receiver, but for no one else.
Message passing not only allows processes to pass data to each other, but also provides a means of synchronizing the execution of several processes. As they send, receive, and reply to messages, processes undergo various
changes of state
that affect when, and for how long, they may run. - microkernel
- A part of the operating system that provides the minimal services used by a team of optional cooperating processes, which in turn provide the higher-level OS functionality. The microkernel itself lacks filesystems and many other services normally expected of an OS; those services are provided by optional processes.
- mount structure
- An optional, well-defined data structure (of type iofunc_mount_t) within an iofunc_*() structure, which contains information used on a per-mountpoint basis (generally used only for filesystem resource managers). See also attributes structure and OCB.
- mountpoint
- The location in the pathname space where a resource manager has
registered
itself. For example, the serial port resource manager registers mountpoints for each serial device (/dev/ser1, /dev/ser2, etc.), and a CD-ROM filesystem may register a single mountpoint of /cdrom. - multicore system
- A chip that has one physical processor with multiple CPUs interconnected over a chip-level bus.
- mutex
- Mutual exclusion lock, a simple synchronization service used to ensure exclusive access to data shared between threads. It is typically acquired (pthread_mutex_lock()) and released (pthread_mutex_unlock()) around the code that accesses the shared data (usually a critical section). See also critical section.
- Network File System (NFS)
- A TCP/IP application that lets you graft remote filesystems (or portions of them) onto your local pathname space. Directories on the remote systems appear as part of your local filesystem and all the utilities you use for listing and managing files (e.g., ls, cp, mv) operate on the remote files exactly as they do on your local files.
- nonbootable
- A nonbootable OS image is usually provided for larger embedded systems or for small embedded
systems where a separate, configuration-dependent setup may be required. Think of it as a
second
filesystem
that has some additional files on it. Since it's nonbootable, it typically won't contain the OS, startup file, etc. Contrast bootable. - nonmaskable interrupt (NMI)
- An interrupt that can't be masked by the processor. We don't recommend using an NMI!
- Open Control Block (OCB)
also known as Open Context Block
A block of data established by a resource manager during its handling of the client's open() function. This context block is bound by the resource manager to this particular request, and is then automatically passed to all subsequent I/O functions generated by the client based on the file descriptor returned by the client's open().- pathname prefix
- See mountpoint.
- pathname space mapping
- The process whereby the Process Manager maintains an association between resource managers and entries in the pathname space.
- persistent
- When applied to storage media, the ability for the media to retain information across a power-cycle. For example, a hard disk is a persistent storage medium, whereas a ramdisk is not, because the data is lost when power is lost.
- pid
- An abbreviation for process ID (e.g., as an argument in a function call). See also process ID.
- POSIX
- An IEEE/ISO standard. The term is an acronym (of sorts) for Portable Operating System
Interface—the
X
alludes toUNIX
, on which the interface is based. - POSIX layer calls
- Convenient set of library calls for writing resource managers. The POSIX layer calls can handle even more of the common-case messages and functions than the base layer calls. These calls are identified by the iofunc_*() prefix. In order to use these (and we strongly recommend that you do), you must also use the well-defined POSIX-layer attributes (iofunc_attr_t), OCB (iofunc_ocb_t), and (optionally) mount (iofunc_mount_t) structures.
- preemption
- The act of suspending the execution of one thread and starting (or resuming) another. The
suspended thread is said to have been
preempted
by the new thread. Whenever a lower-priority thread is actively consuming the CPU, and a higher-priority thread becomes READY on the same CPU, the lower-priority thread is immediately preempted by the higher-priority thread. - prefix tree
- The internal representation used by the Process Manager to store the pathname table.
- priority inheritance
- The characteristic of a thread that causes its priority to be raised or lowered to that of the thread that sent it a message. Also used with mutexes. Priority inheritance is a method used to prevent priority inversion.
- priority inversion
- A condition that can occur when a low-priority thread consumes CPU at a higher priority than it should. This can be caused by not supporting priority inheritance, such that when the lower-priority thread sends a message to a higher-priority thread, the higher-priority thread consumes CPU on behalf of the lower-priority thread. This is solved by having the higher-priority thread inherit the priority of the thread on whose behalf it's working.
- process
- A nonschedulable entity, which defines the address space and a few data areas. A process must have at least one thread running in it—this thread is then called the first thread.
- process group
- A collection of processes that permits the signalling of related processes. Each process in the system is a member of a process group identified by a process group ID. A newly created process joins the process group of its creator.
- process group ID
- The unique identifier representing a process group during its lifetime. A process group ID is a positive integer. The system may reuse a process group ID after the process group dies.
- process group leader
- A process whose ID is the same as its process group ID.
- process ID (PID)
- The unique identifier representing a process. A PID is a positive integer. The system may reuse a process ID after the process dies, provided no existing process group has the same ID. Only the Process Manager can have a process ID of 1.
- processor affinity
- A user-specified binding of a thread to a set of processors, done by means of a runmask.
- programmable interrupt controller (PIC)
- A hardware component that handles IRQs. See also edge-sensitive, level-sensitive, and IST.
- pseudo-TTY (pty)
- A character-based device that has a controller end and a worker end. Data written to the controller end shows up on the worker end and vice versa. These devices are typically used to interface between two programs, one that expects a character device and another that wishes to use that device (e.g., the shell and the sshd process).
- pulses
- In addition to the synchronous Send/Receive/Reply services, QNX OS also supports fixed-size, nonblocking messages known as pulses. These carry a small payload (eight bytes of data plus a single byte code). A pulse is also one form of event that can be generated by a timer or attached to an interrupt. See MsgDeliverEvent() for more information.
- random access memory (RAM)
- A memory technology characterized by the ability to read and write any location in the device without limitation. Contrast flash and EPROM.
- Rate Monotonic Analysis (RMA)
- A set of methods used to specify, analyze, and predict the timing behavior of realtime systems.
- raw mode
- In raw input mode, the character device library performs no editing on received characters. This reduces the processing done on each character to a minimum and provides the highest performance interface for reading data. Also, raw mode is used with devices that typically generate binary data—you don't want any translations of the raw binary stream between the device and the application. Contrast canonical mode.
- replenishment
- In sporadic scheduling, the period of time during which a thread is allowed to consume its execution budget.
- reset vector
- The address at which the processor begins executing instructions after the processor's reset line has been activated. On the x86, for example, this is the address 0xFFFFFFF0.
- resource manager
- A user-level server program that accepts messages from other programs and, optionally,
communicates with hardware. QNX OS resource managers are
responsible for presenting an interface to various types of devices, whether actual (e.g.,
serial ports, parallel ports, network cards, disk drives) or virtual (e.g.,
/dev/null, a network filesystem, and pseudo-ttys).
In other operating systems, this functionality is traditionally associated with device drivers. But unlike device drivers, QNX OS resource managers don't require any special arrangements with the kernel. In fact, a resource manager looks just like any other user-level program. See also device driver.
- round robin
- A scheduling policy whereby a thread is given a certain period of time to run. Should the thread consume CPU for the entire period of its timeslice, the thread will be placed at the end of the ready queue for its priority, and the next available thread will be made READY. If a thread is the only thread READY at its priority level, it will be able to consume CPU again immediately. See also FIFO, and sporadic.
- runmask
- A bitmask that indicates which processors a thread can run on. It must match a cluster defined for the system.
- runtime loading
- The process whereby a program decides while it's actually running that it wishes to load a particular function from a library. Contrast static linking.
- scheduling latency
- The amount of time elapsed between the point when one thread makes another thread READY and when
the other thread actually gets some CPU time. Note that this latency is almost always at
the control of the system designer.
Also designated as
Tsl
. - scoid
- An abbreviation for server connection ID.
- session
- A collection of process groups established for job control purposes. Each process group is a member of a session. A process belongs to the session that its process group belongs to. A newly created process joins the session of its creator. A process can alter its session membership via setsid(). A session can contain multiple process groups.
- session leader
- A process whose death causes all processes within its process group to receive a SIGHUP signal.
- socket
- A virtual endpoint for communication. For example, in TCP/IP, a socket is a combination of an IP address and a port number that uniquely identifies a single network process. Another example is the Unix domain socket, which exchanges data between processes that execute on the same host operating system.
- software interrupt
- Similar to a hardware interrupt (see interrupt), except that the source of the interrupt is software.
- sporadic
- A scheduling policy whereby a thread's priority can oscillate dynamically between a
foreground
or normal priority and abackground
or low priority. A thread is given an execution budget of time to be consumed within a certain replenishment period. See also FIFO, and round robin. - startup code
- The software component that gains control after the IPL code has performed the minimum necessary amount of initialization. After gathering information about the system, the startup code transfers control to the OS.
- static bootfile
- An image created at one time and then transmitted whenever a node boots. Contrast dynamic bootfile.
- static linking
- The process whereby you combine your modules with the modules from the library to form a single
executable that's entirely self-contained. The word
static
implies that it's not going to change—all the required modules are already combined into one. - symmetric multiprocessing (SMP)
- A multiprocessor system where a single instantiation of an OS manages all CPUs simultaneously, and applications can float to any of them.
- system page area
- An area in the kernel that is filled by the startup code and contains information about the system (number of bytes of memory, location of serial ports, etc.) This is also called the SYSPAGE area.
- thread
- The schedulable entity under the QNX OS. A thread is a flow of execution; it exists within the context of a process.
- tid
- An abbreviation for thread ID.
- timer
- A kernel object used in conjunction with time-based functions. A timer is created via timer_create() and armed via timer_settime(). A timer can then deliver an event, either periodically or on a one-shot basis.
- timeslice
- A period of time assigned to a round-robin scheduled thread. This period of time is small (on the order of tens of milliseconds); the actual value shouldn't be relied upon by any program (it's considered bad design).
- translation look-aside buffer (TLB)
- A cache of page table entries. To maintain performance, the processor caches frequently used portions of the external memory page tables in the TLB.