Object.notify()
are much faster for green threads
as compared to native threads.
-ts
<time> option for time
slicing. When using native threads, this is not necessary or useful.
runon
command.
(Synchronization across processors tends to be expensive.)
If your code runs differently under the two threads packages, check for thread-synchronization bugs in your code.
-ms
and -mx
flags. This will increase pause
times, but will often greatly reduce their frequency, usually reducing
overall execution time.
AttachCurrentThread
.
Object.wait()
.)
The IRIX sleep
() call and its variants may also
terminate prematurely. To suspend a thread for a minimum amount of
time, use either Java code or something like the following:
int deep_sleep(int seconds) { time_t current, finish; current = time(0); finish = current + seconds; while (current < finish) { (void) sleep(finish - current); current = time(0); } return 0; }
If you plan to use the native threads subsystems, you will need to install some patches on your system; see Correctly Installing Java and Related Software..
Java and other Java-based names are trademarks of Sun Microsystems, Inc., and refer to Sun's family of Java-branded technologies. Sun, Sun Microsystems, and the Sun Logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.