The Artima Developer Community
Sponsored Link

Java Community News
The Impact of Multi-Core CPUs on Developers

16 replies on 2 pages. Most recent reply: Aug 11, 2006 7:23 AM by Fireblaze .

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 16 replies on 2 pages [ « | 1 2 ]
Jules Jacobs

Posts: 119
Nickname: jules2
Registered: Mar, 2006

Re: The Impact of Multi-Core CPUs on Developers Posted: Aug 3, 2006 10:49 AM
Reply to this message Reply
Advertisement
Java (and C, C#, etc) probably won't survive multi-core CPU's for too long. Once we have 16+ cores Java applications will be very slow compared to Haskell, because parallelism has to be explicit in Java. Haskell, on the other hand, can be parallelised automatically by a compiler.

:)

Fireblaze .

Posts: 21
Nickname: fireblaze
Registered: Jul, 2006

Re: The Impact of Multi-Core CPUs on Developers Posted: Aug 11, 2006 7:23 AM
Reply to this message Reply
This issue explored in
"The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software" posted March 2005.
http://www.gotw.ca/publications/concurrency-ddj.htm

Its good that java got it concurrent-package, but look where they put it "java.util.concurrent" under utilities. A concurrent software need concurrency at is core.
I hope Java and other languages will implement the basic-text-book-examples of concurrent things, like ThreadPools, WorkerPools, ResourcePools.

All developers that use Swing uses threading implicitly since there is a SwingEventThread and a MainThread running, hopefully it will be that simple to say that you want something else running in another thread

Example is:

@GuiThread{"edt"}
public void actionPerformed(ActionEvent e) {
String text = readHugeFile();
textArea.setText(text);
}

@NonGuiThread
private String readHugeFile() {
...
}

http://jroller.com/page/dmdevito?entry=foxtrot_library_another_look_at

Even nicer would be if you could just type

public void actionPerformed(ActionEvent e) {
String text = readHugeFile();
textArea.setText(text);
}

private background String readHugeFile() {
...
}

or something that like that.

One challange is to turn a singlethreaded code into multithreaded
like:
readHugeFile();
readRssFeeds();
readEmail();
transforeAllReadStuff();
into making them run concurrently and then transform them when they are done.
background: readHugeFile();
background: readRssFeeds();
background: readEmail();
wait: transforeAllReadStuff();

Having a lanuage and libraries that support concurrency simplify and often make it possible to even to begin use concurrency.

Flat View: This topic has 16 replies on 2 pages [ « | 1  2 ]
Topic: The Impact of Multi-Core CPUs on Developers Previous Topic   Next Topic Topic: Implementing High-Performance Web Services

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use