LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-18-2008, 03:41 AM   #1
Ashok_mittal
Member
 
Registered: Dec 2007
Posts: 73

Rep: Reputation: 15
Question How to program MPCORE


Hi all,

How we can give instructions in our program to use mpcore.
Like say we have dual core system so how can be use both core simultaneously by using threads and how to instruct the processor for this?
Is there any instruction set.
 
Old 08-19-2008, 02:34 AM   #2
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,062

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
So you have an ARM synthesiable multi-core architecture part? (e.g., http://www.arm.com/products/CPUs/ARM...processor.html )

Is your question about how to set core affinity for a process or is it the more general one of how is multi-core programming done? Threads may or may not be relevant, depending on your OS and what you are trying to do, so plesae say more.

Note that the link above gives a link to details of the thumb instruction set.
 
Old 08-25-2008, 05:50 AM   #3
Ashok_mittal
Member
 
Registered: Dec 2007
Posts: 73

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by salasi View Post
So you have an ARM synthesiable multi-core architecture part? (e.g., http://www.arm.com/products/CPUs/ARM...processor.html )

Is your question about how to set core affinity for a process or is it the more general one of how is multi-core programming done? Threads may or may not be relevant, depending on your OS and what you are trying to do, so plesae say more.

Note that the link above gives a link to details of the thumb instruction set.
Thanks for reply.
The thing is that suppose we have an application which is already multi threaded now if we want to use the similar applications on Multi core how can we do this, what kind of changes we require for this and can we instruct the processor that let's say - this part of the program should be paralleled and this should be sequential, i mean it is automatic or there are instructions for making the application parallel.
 
Old 08-26-2008, 05:48 AM   #4
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,062

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
Quote:
Originally Posted by Ashok_mittal View Post
how can we do this, what kind of changes we require for this and can we instruct the processor that let's say - this part of the program should be paralleled and this should be sequential, i mean it is automatic ...
Depends what you mean; if you have a multi-threaded app and your OS can run multiple tasks at once, then that part is sort-of automatic. The tasks can be run and the OS can take care of running the list of runnable tasks and should try to employ its cores usefully. And that's nice, but there is still a massive problem.

If there are data dependancies between different parts of your app, then one part has to wait for the appropriate data to be available. Not only is curing this not automatic, it can't happen. The data still has to be available before you can use it and that isn't about to be cured, as far as I can tell. So whatever your cores can do for you, they don't make data available before its available and you have to think about structuring your application so this wait for data doesn't cause it to fail.

So, while superficially you might think 'all I've got to do is use binary division and divide my app into n parallel sub-sections and my n cores will automagically give me n times the performance' practically, this won't happen because of the unavailabilty of the data for some of the processing to happen. And, worse than that, you probably have to design in intercommmunication/synchronisation facilities that don't let the individual sub-processes to run away with 'bad' data until the 'good' data arrives.
 
Old 08-29-2008, 04:44 AM   #5
Ashok_mittal
Member
 
Registered: Dec 2007
Posts: 73

Original Poster
Rep: Reputation: 15
Smile

Quote:
Originally Posted by salasi View Post
Depends what you mean; if you have a multi-threaded app and your OS can run multiple tasks at once, then that part is sort-of automatic. The tasks can be run and the OS can take care of running the list of runnable tasks and should try to employ its cores usefully. And that's nice, but there is still a massive problem.

If there are data dependancies between different parts of your app, then one part has to wait for the appropriate data to be available. Not only is curing this not automatic, it can't happen. The data still has to be available before you can use it and that isn't about to be cured, as far as I can tell. So whatever your cores can do for you, they don't make data available before its available and you have to think about structuring your application so this wait for data doesn't cause it to fail.

So, while superficially you might think 'all I've got to do is use binary division and divide my app into n parallel sub-sections and my n cores will automagically give me n times the performance' practically, this won't happen because of the unavailabilty of the data for some of the processing to happen. And, worse than that, you probably have to design in intercommmunication/synchronisation facilities that don't let the individual sub-processes to run away with 'bad' data until the 'good' data arrives.
Whatever you explained it's totally true and i know it what i am trying to ask here is that like some part (as you have explained) would surely be sequentially executed but there are some part which are independent to each other and can be executed parallel, so what changes do we need on mpcore to make them truly parallel like OpenMP or any other kind of optimization techniques are necessary or the existing compiler automatically will assign the tasks (which can be) to different cores (as the application is already multithreaded).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ARM MPcore------ any program Ashok_mittal Linux - Software 0 04-03-2008 05:16 AM
LXer: ARM MPCore Multicore Processor Enables Next-Generation Triple-Play Gateway to the Home LXer Syndicated Linux News 0 10-23-2006 05:54 PM
A program for FC4 to communicate with a Windows Hyperterminal Program at other end vhasun Linux - Software 2 05-19-2006 02:54 PM
Total recovery: Which program? ghost4linux, YaST2? Best drive imaging program? lagu2653 Linux - Software 1 06-20-2005 01:44 PM
Gtk-Warning but program still works... I close konsole, program closes Laptop2250 Linux - Software 2 11-14-2003 11:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration