aspose file tools*
The moose likes Scala and the fly likes What is Multi-Core Complexity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Languages » Scala
Bookmark "What is Multi-Core Complexity" Watch "What is Multi-Core Complexity" New topic
Author

What is Multi-Core Complexity

Chaminda Amarasinghe
Ranch Hand

Joined: May 17, 2006
Posts: 402

Hi Venket,


I have a question before ask question about scala, What you meant by Multi-Core Complexity?

Thanks
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1280

Ever heard about multi-core CPUs/processors in modern computers?

The complexity comes usually when you try to create applications which reasonably make use of more than one CPU or core for performance reasons...

Marco
Chaminda Amarasinghe
Ranch Hand

Joined: May 17, 2006
Posts: 402


Thanks Marco,

I read the ibms artical you pointed to someone

Thanks Again
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1280

You're welcome ;-)

Unfortunately multi-threaded programming is probably one of the most complex programming topics. Thus it's really hard to explain in a forum in detail if you're completely unfamiliar with it. Of course as Scala is a general purpose language it's not only about concurrent programming for multi-core computers...

Just out of curiousity, have you really not heard the term "multi-core" before or did you think it was something different meant in this context?

Marco
Chaminda Amarasinghe
Ranch Hand

Joined: May 17, 2006
Posts: 402

have you really not heard the term "multi-core" before or did you think it was something different meant in this context?


I have heard and know multi-core in processor context. I didnt thought that is what the book refers

Thank Marco
Venkat Subramaniam
Author
Ranch Hand

Joined: Jan 28, 2008
Posts: 79
Writing correct multithreaded application on a single processor is already hard. With multiple processors and multiple cores, this only gets harder.

On one hand, we have the benefits of multithreading—highly responsive, scalable, performing applications can be developed with multiple threads.

On the other hand, we have to confront the perils of multithreading. The facilities in Java let the threads share mutable state. While this is quite convenient,
it takes a lot of effort to ensure that no two threads end up compromising data integrity though race conditions.

You can't simply run the code and say it "works." It is not unusual to find issues with multithreaded code in "working" applications.

In addition to race conditions, we have to worry about issues that may arise from caching or optimizations. While these are done in good faith,
they do not allow your program to work as intended in a multithreaded situation.

If you have to deal with these at your application code level, much effort and code is spent on these details and that means you are not devoting
as much time, effort, and code for your application logic.

This is what I mean when I say multi-core complexity and Scala addresses this problem at the root. It encourages us to use immutable state and
allows threads to easily communicate using an actor based model.
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1280

Hi,

after reading quite some stories here and from other sources and books about the advantages of Scala regarding multithreaded applications I still have the impression that the technical hurdles for creating clean concurrent code is only part of the solution, although a very important part. I guess, it's the way many or most develpers think about the problem which has to change. My experience is that a lot of people don't even understand the problem and a lot of others don't care about it. What's your opinion on this?

Marco
Venkat Subramaniam
Author
Ranch Hand

Joined: Jan 28, 2008
Posts: 79
Marco, I am quite satisfied when there are reasonable solutions on hand for people who care
Marco Ehrentreich
best scout
Bartender

Joined: Mar 07, 2007
Posts: 1280

It's sad but true Maybe more of those so called developers start to think or are forced to think about the quality and correctness of their code if more problems arise when multi-core machines become even more widespread!

Marco
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is Multi-Core Complexity