Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,167 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,888 people online right now. Registration is fast and FREE... Join Now!




Programming for Multi-Core Processors

 
Reply to this topicStart new topic

Programming for Multi-Core Processors

ReggaetonKing
6 Dec, 2007 - 08:55 PM
Post #1

D.I.C Head
Group Icon

Joined: 16 Nov, 2006
Posts: 73



Thanked: 1 times
Dream Kudos: 100
My Contributions
I am extremely interest programming for multiprocessors. Has anyone actually programmed for multiprocessors? Would multi-threading execute differently on a multi-core system than on a single core? I have some experience in developing multi-threading apps in Java and C#. Does anyone have any tips and what exactly the best language to use? C/C++ have been on my mind but I a lot more experience with C# and Java. (i know, i know...)
User is offlineProfile CardPM
+Quote Post

Nayana
RE: Programming For Multi-Core Processors
6 Dec, 2007 - 09:52 PM
Post #2

DIC Hawk - 나야나 नयन:
Group Icon

Joined: 14 Nov, 2007
Posts: 824



Thanked: 5 times
Dream Kudos: 175
My Contributions
C# and Java are both probably fine for working with multi-core processors. Not only that, but threading in those languages is a lot easier than in C++.

If your program isn't CPU intensive, it doesn't really matter if you optimise it for multi core anyway. If it is CPU intensive (or gets so at times) then it is a good time to think about it.

But as long as you split up intensive tasks, and run them in different threads, the OS should split them up between cores for you anyway. And from a program operation perspective, there won't be much difference between running the program on a single core, or multi-core machine, except that it will go a lot faster on a multi-core machine.
User is offlineProfile CardPM
+Quote Post

ReggaetonKing
RE: Programming For Multi-Core Processors
6 Dec, 2007 - 11:35 PM
Post #3

D.I.C Head
Group Icon

Joined: 16 Nov, 2006
Posts: 73



Thanked: 1 times
Dream Kudos: 100
My Contributions
Sweet. Thanks for clearing that up!
User is offlineProfile CardPM
+Quote Post

1lacca
RE: Programming For Multi-Core Processors
7 Dec, 2007 - 01:34 AM
Post #4

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 11 times
My Contributions
The main difference with multicore or multi cpu systems is that you can run into locking problems more easily (since the different threads will be executed simultaneously and not by switching between them, and some performance optimisation is different, because the cores have their own registers and cache, so the same code might behave really differently)
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 12:15AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month