Originally posted by Henry Wong:
The studies cover single threaded, 2 threads, and many threads, for Windows, Linux, and Solaris.
Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Originally posted by Ko Ko Naing:
I just would like to know the book discusses OS platform dependency issue... OR is it just a small part in the chapter-14(Thread Performance)?
Thanks...
Originally posted by Henry Wong:
First, the already discussed performance chapters. It is not possible to give measurements of performance without actually choosing a configuration. The second chapter is the chapter on schedulling which goes into details on the many schedulling models.
Originally posted by Ali Pope:
You mean processor task scheduling or something else?
./pope
Originally posted by CL Gilbert:
There are no platform threading issues for you to be concerned about when you program in Java. Java threads follow the behavior defined in the specification.
Some people are not able to understand the fact that java hides the CPU from the programmer and they get all concerned with underlying OS. Please don't make that mistake.
Originally posted by Henry Wong:
The schedulling chapter goes into detail on how the Java threading model maps onto the underlying threading model. It goes into detail on behavior, priorities, features, etc. Model discussed includes green threads, Windows, Solaris, and Linux.
Henry
Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Originally posted by Henry Wong:
The schedulling chapter goes into detail on how the Java threading model maps onto the underlying threading model. It goes into detail on behavior, priorities, features, etc. Model discussed includes green threads, Windows, Solaris, and Linux.
Henry
Originally posted by CL Gilbert:
[...]
There are no platform threading issues for you to be concerned about when you program in Java. Java threads follow the behavior defined in the specification.
Some people are not able to understand the fact that java hides the CPU from the programmer and they get all concerned with underlying OS. Please don't make that mistake.
Tony Morris
Java Q&A (FAQ, Trivia)
- look up why double-checked locking doesn't work on multiple CPU machines.
Originally posted by Tony Morris:
A big mistake is to believe that by interacting with the thread scheduler through the core API is always going to be platform-dependant.
Here are a couple of pointers:
- look up why double-checked locking doesn't work on multiple CPU machines.
- have a read of "Taming Java Threads, Allen Holub" - a cynical approach towards how Java threads work, pointing out the many mistakes you can make and the mistakes of the existing API.
Originally posted by CL Gilbert:
In those cases where the behavior is not platform independent, the particular JVM you are using is violating the specificaiton. Take up the issue when them.
<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.
Originally posted by Scott Dunbar:
Rigid indeed...
I disagree but it may be because of our perspectives. If you are speaking strictly from a language perspective then I agree with you totally. However, if I'm running on a 64 CPU machine with a large J2EE application I do need to design differently than if my target is a Windoze box doing animations. The difference in our opinion is in the tuning. I'm confident that if you go to a customer who just spent several million dollars on your app server and tell them that, well, we didn't program thinking about the differences in the threading models between a single CPU Windows box and a 32 processor clustered Sun system you will be thrown out very quickly.
The threading models do matter. For example, what is the major problem with the Linux threading model? Will the Solaris model in Solaris 8+ have the same issues? What were the changes in the Solaris threading model between Solaris 7 and Solaris 9?
In this case the problem with Linux is that they spawn a new process for each thread and then use IPC between the threads. This doesn't scale very well to even 1000 threads. Solaris is now doing something similar but it isn't process based so they scale fine to 10,000 threads or more. So do your write your program so that it can spawn an unlimited number of threads or do you put a govenor on it? These are the O/S specific things you have to think about.
[ October 29, 2004: Message edited by: Scott Dunbar ]
Consider Paul's rocket mass heater. |