To service multiple client-application SQL requests, the
database server uses virtual processors (VPs). The database server
breaks the SQL request into distinct tasks, based on the resource
that the task requires. Different VP types, called virtual-processor
classes (VP classes), service the different kinds of tasks.
The following table lists some of the types of VP classes that
the database server supports.
Type of VP class |
Description |
CPU system VP class |
Central processing (the primary VP class, which
controls client-application requests) |
AIO system VP class |
Asynchronous disk I/O |
SHM system VP class |
Shared-memory network communications |
User-defined VP class |
Special VP class for additional types of processing |
Tip: User-defined VPs are also referred to as
Extension VPs, EXP VPs, EVPs, or Named VPs. These topics uses only
the term user-defined VP to refer to a VP class that
you define.
The database server preserves the state of each request in a thread.
The database server assigns the thread to a VP class that manages
the task or resource that the request requires. The VPs in the VP
class service multiple requests for their resource by scheduling the
threads on the resource.
The CPU virtual processor (CPU VP) is the main VP for the database
server. The CPU VP acts as the central processor for client-application
SQL requests. When a client application establishes a connection,
the CPU VP creates the session thread for that client application.
A CPU VP runs multiple session threads to service multiple SQL client
applications.
Tip: This section describes VPs in the
context of C UDRs. For a general description of VPs and UDRs, see
the description of VPs in the Informix® User-Defined Routines
and Data Types Developer's Guide. For
a general description of VPs, see the section on database server architecture
in your Informix® Administrator's
Guide.
When an SQL request includes a C UDR, execution of this UDR becomes
one of the tasks that the thread performs. Because a session thread
is the primary thread for the processing of SQL requests, any C UDRs
in an SQL request normally execute in the CPU VP. However, the tasks
that your C UDR needs to perform might limit its ability to execute
in the CPU VP, as follows:
- A well-behaved UDR can execute in the CPU VP.
A well-behaved
UDR adheres to a set of safe-code requirements that prevent the UDR
from interfering with the efficient operation of the CPU VP.
- An ill-behaved UDR cannot execute in the CPU VP.
If a C UDR
does not follow all the safe-code requirements for a well-behaved
routine, it must execute in a user-defined VP class. Some of the safe-code
requirements can be relaxed for a C UDR that runs in a user-defined
VP.
Important: The success of your C UDRs and your DataBlade®
API project
depends in large degree on how well you implement the features related
to the safety and interoperability of your C UDR.