Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / March 2006

Tip: Looking for answers? Try searching our database.

regarding multithreading

Thread view: 
hp - 09 Mar 2006 10:54 GMT
hi all,
i have a doubt in multithreading, how many threads can a java program
handle at a particular point of time.
plzzz i need the reply as soon as possible.
thanks in advance
byeee
Bart Cremers - 09 Mar 2006 11:38 GMT
Java (more precise, the JVM specification) does not specify a limit in
the number of threads. This number is limited by the underlying system.

First of all, the OS will limit the number of possible threads.

Second, there's the JVM implementation. If the JVM uses native threads,
the limit is one on one with the OS limit, of course depending on the
threads used by other processes on the system.
If the implementation uses "green" threads, you'll be limited by either
the JVM itself or the combination JVM-OS, because a number of "green"
threads can be mapped to a single native thread.

Don't know if this is all clear, but anyway; there's no fixed answer to
your question.

Regards,

Bart
Thomas Hawtin - 09 Mar 2006 17:28 GMT
> i have a doubt in multithreading, how many threads can a java program
> handle at a particular point of time.

Operating systems will often impose a limit, but the big problem for
32-bit machines is virtual address space.

Each thread has the maximum sized stack allocated in the virtual address
space. Only the first page will be physically allocated, so it's not
physical memory that is important. However if you have a 2-4 GB
addressing limit, there can be problems with the number of threads. The
stack size can be reduced with -Xss on Sun JVMs.

64-bit machines shouldn't have this problem. The VolanoMarks benchmarks
stress number of threads, so may be worth googling.

Tom Hawtin
Signature

Unemployed English Java programmer
http://jroller.com/page/tackline/



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.