Using WebLogic JRockit 8.1 SDK
WebLogic JRockit's thread systems allow the JVM to take optimal advantage of the underlying operating system. WebLogic JRockit JVM supports two types of thread systems: native threads and thin threads. This section describes these thread systems and how to select and run them with your application. It includes information on the following subjects:
This is the WebLogic JRockit JVM's default thread system. It maps Java threads directly to the operating system threads, taking advantage of the operating system's thread scheduling and load balancing policies.
Thin threads simulate several Java threads with one (or more) native threads that represent the running program (Figure 5-1). Context switches and scheduling is done internally within WebLogic JRockit, and is therefore much light-weight than context switching done within native threads by the operating system.
Thin threads are independent of native threads and are implemented in WebLogic JRockit JVM, thus they are not part of the operating system. This means WebLogic JRockit JVM uses less memory to perform optimized thread scheduling, thread switching, and thread synchronization. This makes it possible to run a significantly higher number of threads at a higher speed than with any other JVM.
To fully utilize system resources on a multi-processor system, WebLogic JRockit JVM is not restricted to running all Java threads in the same operating system thread. A variety of operating system threads can be used, which splits the Java threads among them. A Java thread is not bound to a specific operating system thread; it can move between them to allow for optimal load balancing.
Note: For information on selecting the best thread system for your application, please refer to Choosing a Thread System.
To start a thread system, include one of the options listed in Table 5-1 when you start WebLogic JRockit JVM:
This option is not available on IA64. Additionally, thin threads is experimental functionality in this version of WebLogic JRockit and it is recommended that you do not use it. It is subject to change at any time.
This section includes some tools that will help you determine which thread system is right for your WebLogic JRockit JVM implementation. It contains a list of the pros and cons of each method and a decision matrix that will help you identify the optimal threading model.
Table 5-2 lists the pros and cons of each thread system.
Because thin threads is experimental functionality and subject to change, BEA Systems recommends that you always use native threads as your threading system. However, under certain circumstances, thin threads might provide optimal performance for your WebLogic JRockit JVM implementation. Use the If... column in Table 5-3 to locate a condition that matches your implementation and select the thread system indicated in the Select this Method... column.