THREADS_FLAG

[b]CONTENTS[/b]

Overview of the Native Threads Pack
System Requirements
Installation
Using the Native Threads Pack
- The THREADS_FLAG environment variable
- The -native and -green convenience options

[b]OVERVIEW OF THE NATIVE THREADS PACK[/b]

When you install the Native Threads Pack, the Java virtual machine (VM)
is able to use native threads when running Java code. Native threads
can provide several advantages over the default threads package (called
green threads), depending on your computing situation. Among the
benefits of using the native threads VM are:

- If you run Java code in a multi-processor environment, the
Solaris kernel can schedule native threads on the parallel
processors for increased performance. By contrast, green
threads exist only at the user-level and are not mapped to
multiple kernel threads by the operating system. Performance
enhancement from parallelism cannot be realized using green
threads.

- The native threads VM can call into C libraries that use
Solaris native threads. Such libraries cannot be used with
green threads.

- When using the native threads, the VM can avoid some
inefficient remapping of I/O system calls that are necessary
when green threads are used.

In some instances, it may be advisable to use the default green
threads. Native code that is not multithread safe (MT-safe) may not
work correctly with native threads. In general, if you aren't using
the native Solaris threads mechanisms directly, then you need to
compile your native code with the option -D_REENTRANT to make sure
that they work correctly in a threaded environment. You may also need
to use reentrant versions of certain Solaris interfaces.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值