NonStop Server for Java 4.2 Programmer's Reference

If you create a thread whose only purpose is to run a certain task, the thread-creation overhead makes the
task run marginally slower than the same task being performed without creating the thread.
The thread-scheduling algorithm is not preemptive.
A thread executes until it explicitly yields. For more information, see the discussion of Thread Scheduling.
In a very long-running, CPU-intensive thread, having your native code occasionally invoke the yield()
method allows timer completions and I/O completions to be detected. Invocation of timer callbacks and
detection of I/O completions can be severely impacted by long-running threads.
Be familiar with the issues discussed in the Application Programming with Standard POSIX Threads
section of the OSS Programmers Guide.
This section contains information about the jacket routines that make many of the available system calls
thread-aware. The interfaces themselves, however, are documented in the OSS System Calls Reference
Manual.
To use these jacket routines, you need to add the following define in your native code.
#define SPT_THREAD_AWARE
Adding this define in the native C/C++ code, transparently provides you the thread-aware equivalents of
many of the interfaces, for example, the Socket interface. Additionally, the interfaces are available to
determine if a socket is read-ready (spt_fd_read_ready) or write-ready (spt_fd_write_ready).
The Socket implementation on NonStop systems supports streaming; multiple sends and receives are
outstanding at a time.
Be careful when using thread-aware interfaces.
The OSS Programmers Guide lists thread-aware equivalents of NonStop system-specific interfaces. These
interfaces have an explicit spt_ prefix.
For example, when using a thread-aware function, do not attempt to control the set of files that are enabled
for completion or directly attempt to wait for a completion on a file registered with pthreads
(FILE_COMPLETE_SET_, FILE_COMPLETE_, AWAITIO, or AWAITIOX procedure).
Java Print Service (JPS)
The Java Print Service is implemented in NonStop Server for Java 4. The Java Print Service allows you to print on
printers directly to NonStop systems and to network printers attached to a local area network (LAN) or wide area
network (WAN). For information on configuring network printers, see the Spooler FASTP Network Print
Processes Manual. For information on the Spooler subsystem, see the Spooler Utilities Reference Manual.
The Java Print Service implemented into NonStop Server for Java 4 uses the headless version of the javax.print
API. All printing features and attributes in the JPS classes listed below work when the NonStop spooler and printer
support the API. However, the NonStop operating system requirement for sending text and postscript files to
separate printers also applies when printing under JPS The JPS classes are:
javax.print
javax.print.attribute
javax.print.attribute.standard