Pre-emption
16
Server Operating System Administration Guide
is executing code. They are perceived as executing simultaneously because
processors are very fast and time quanta are very small.
On the other hand, it is the availability of hardware systems with multiple
processors that makes it possible to have multiple threads actually running at
exactly the same time on different processors. When threads execute
simultaneously on multiple processors, they are running in parallel.
Multithreaded code allows more efficient processor utilization by exploiting
parallelism.
With NetWare 6, applications can be written to exploit the parallelism
available in multiprocessor (MP) hardware and the support for parallelism in
the server operating system, and your system will benefit from the
performance gains and scaling that server applications such as GroupWise
provides.
NOTE:
A single binary supports both uniprocessor and multiprocessor systems
precisely because the NetWare kernel is multithreaded.
NetWare allows for pre-emption of threads, within constraints. New NetWare
modules can be written to be pre-emptible.
NOTE:
Earlier versions of NetWare implemented a nonpre-emptible round-robin
(First-in, First-out) scheduling policy where threads were scheduled to run in the
order that they entered the run queue. On a uniprocessor system, NetWare is fast
and very efficient.
For an application to exploit pre-emption, the code must be explicitly written
to be pre-emptible. Critical section boundaries might be marked by calling
scheduler API functions that signal a critical code section. Critical sectioning
is used to keep program data in a consistent state and to prevent code that
doesn't lend itself to concurrent execution from executing concurrently. A
thread cannot be pre-empted when it is in a critical section.
By default, if an application thread is running, it will not be pre-empted until
the following conditions are met.
The code where the thread is running must be pre-emptable. This is
indicated by a flag set in the module's NLM
is loaded into memory, the memory pages are flagged as pre-emptible.
The thread cannot be in a critical section of the code.
The thread has run long enough to qualify for pre-emption. The scheduler
checks the elapsed time with every tick.
file format. When the code
TM
®
Need help?
Do you have a question about the NETWARE 6-DOCUMENTATION and is the answer not in the manual?