Glossary

The following terms are important to the discussion of programming NKS, its thread and context model, and its associated libraries.

concurrency

The illusion that two or more tasks are being performed in parallel. Concurrency is created by an operating kernel’s support of multiple threads. It can become parallelism when two or more processors make it possible for second, third, etc., threads to migrate and simultaneously execute.

context

The data associated with a thread. Such data consists of all aspects of the thread that fully describe its state to the kernel, including the thread's stack, registers, any private data area, etc. Note that the user state of a thread is also part of its context.

funneling

The relocation of a thread’s execution from one processor to another. Multiprocessing NetWare®, starting with 4.11 SMP, provided for funneling threads in older applications to make them safe. Even threads from safe applications are funneled into some residually unsafe kernel code. Funneling is highly inefficient execution and can lead to code executing more slowly on multiple processors than it would on a uniprocessor machine.

kernel mode

A privileged execution mode. Most code written to NetWare executes in kernel mode (in ring 0) in the form of NLM applications, which are kernel extensions. The privileged execution status of an NLM™ is one source of NetWare performance, but it contributes to its programming difficulties too.

multiprocessing

The execution of a program using two or more processors. The existence of a second processor potentially brings multi threaded code into contention for the same resources at the same time.

multithread safe/multiprocessor safe

A multithreaded program written such that concurrent operations do not contaminate or misuse shared data and resources. If code is not multithread safe, it will fail to execute safely in environments that include multiple processors or preemption.

multithreading

A programming paradigm in which some tasks are accomplished concurrently. This includes the analysis, design and implementation of a program that splits execution into at least two parts that can be concurrently executed.

nonpreemptive

The condition of execution in which the running thread or process retains control of the processor until it explicitly or implicitly relinquishes it. This was the case for NetWare until 5.0, and afterwards for code running in user mode only.

parallelism

The performing of two or more tasks at the same time. This can occur only when the hardware has at least two processors.

preemption

The suspension of an executing thread or process on a CPU to replace it with another. Preemption also tests the multiprocessing worthiness of code, because it is usually beyond the code’s ability to predict when it will be preempted.

process

An instance of a running program. Process is used in many environments, not just NetWare. In NetWare, a process and a thread are the same thing, even when considering lighter-weight worker threads. Ultimately, the scheduling, rather than actual weight in data structure representation, differentiates threads.

scaling

The code's ability to achieve incremental increases in performance as more processors are added. This requires correctly multi threaded coding. The goal for multi thread code is to achieve their output on one processor multiplied by as many processors as are added to the hardware.

synchronization

(In the context of this discussion) the use of special variables or objects that protect data and resources with advisory locks. Careful synchronization is part of the way multi thread-safe applications achieve their correctness.

thread

A stream of control that executes instructions independently. In a multi threaded system the thread—not the process—is the basic unit of execution.

uniprocessing

The execution of code in a single-processor environment. Until NetWare 4.11, this was the environment in which all code on NetWare executed.

user mode

A non-privileged execution mode or protected mode. This is the node in which NLM applications run when loaded in a protected (ring 3) address space. The operating kernel is insulated from anything that the code running in user mode does, leading to the relative stability of the operating system and its services.

work

A unit containing a routine and data that is scheduled on the Work To Do List to be run by an anonymous (worker) thread. Work units are serviced immediately when a processor becomes available. If the thread that would relinquish control is a worker thread, it executes the next work unit rather than relinquishing control, thereby avoiding a context switch and providing higher performance.