Skip to main content

Even better multi-threading support

5 replies [Last post]
m_r_atkinson
Offline
Joined: 2003-08-29
Points: 0

With the advent of dual core and soon to be 8 or more core processors one way of improving performance of applications is more use of multi-threading.

The new Concurrent package is a good start, enabling low level concurrent features to be used easily. However most of the JRE is still single threaded.

Please provide even better concurrancy, both under the hood (so programs work faster on multi-processor systems even without explicit use of multi-threading) and as more high level components.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jarouch
Offline
Joined: 2004-03-04
Points: 0

Do you mean some 'internally multithreaded' implementations of current things? For example - sort(), image filtering, ... using all possible CPU cores and so?

Maybe some API allowing 'main thread' quickly allocate some 'helper threads' and use all power of CPU should be good too..

zander
Offline
Joined: 2003-06-13
Points: 0

> Please provide even better concurrancy, both under
> the hood (so programs work faster on multi-processor
> systems even without explicit use of multi-threading)
> and as more high level components.

Can you point out some classes or packages where this is needed? I can't think of any where the components start threads or queues by themselves, so I have no idea what should additionally be multi-threaded.

What did you have in mind?

kcpeppe
Offline
Joined: 2003-06-15
Points: 0

Interesting thoughts. Though there is room for improvement, Java already pretty decient support for multi-threading though most of it is pretty low level stuff. Certianly the concurrent package is a welcome addition.

The biggest improvements (IMHO) would come from improvements in or complete removal of stop the world GC. It is getting better but I'm afraid that our ability to create tons of short term objects also just got much better ;)

zander
Offline
Joined: 2003-06-13
Points: 0

> The biggest improvements (IMHO) would come from
> improvements in or complete removal of stop the world
> GC. It is getting better but I'm afraid that our
> ability to create tons of short term objects also
> just got much better ;)

The creation of lots of short term objects has nothing to do with the stop-the-world GC you refer to.
Java has a copying GC, which means that not referenced objects dont slow things down, they just make the copy-action more frequent. But those are not stop-the-world.

kcpeppe
Offline
Joined: 2003-06-15
Points: 0

>
> The creation of lots of short term objects has
> nothing to do with the stop-the-world GC you refer
> to.

The rapid creation of objects (short term or otherwise) will trigger GC on a more frequent basis. There are several different types of GC all of which carry the requirement that they pause all application threads for some period of time. The concurrent GC models shorted the duration of the stop the world phase but, they do no eliminate it.