LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-12-2006, 03:06 AM   #1
markelo
Member
 
Registered: Mar 2004
Distribution: Red hat 9 -> 64bit fedora
Posts: 190

Rep: Reputation: 30
Dual / multi-core programming questions


Ok. I bought dualcore system. I know how to make multiple threads program and multiproces program but how can I make sure that thread2 uses other cpu core than thread2?
 
Old 11-12-2006, 04:08 AM   #2
slantoflight
Member
 
Registered: Aug 2005
Distribution: Smoothwall
Posts: 283
Blog Entries: 3

Rep: Reputation: 35
Quote:
Originally Posted by markelo
Ok. I bought dualcore system. I know how to make multiple threads program and multiproces program but how can I make sure that thread2 uses other cpu core than thread2?
Its remotely possible. But you have to know ASM and stuff.

You just have to rely on the operating system to intelligently decide which cpu to go to. Generally not worth the effort trying to make a thread go to a particular cpu. Plus, unless you're smarter than the kernel developers, theres no real advantage.
 
Old 11-12-2006, 04:23 AM   #3
markelo
Member
 
Registered: Mar 2004
Distribution: Red hat 9 -> 64bit fedora
Posts: 190

Original Poster
Rep: Reputation: 30
Does kernel do a proper job with hyperthreaded dualcore CPUs ( 2 cores which look like 4 cores ). I mean that if I have two very CPU demanding threads both threads will be executed in real CPU core and not some kind of logical core ?
 
Old 11-12-2006, 05:43 PM   #4
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
Hopefully, if on an SMT & SMP system, the kernel will be compiled with SMT awareness in addition to SMP
 
  


Reply



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
Dual-Core Questions... sancho Linux - Hardware 6 08-30-2006 10:41 AM
C/C++ Multi-Threaded Programming Debugging powah Programming 2 04-24-2006 07:03 PM
Setting up a multi-user programming environment pembo13 Linux - General 3 01-16-2006 12:21 AM
multi-boot questions cwhh Fedora 4 09-18-2005 07:08 AM
Multi-Platform Development/Programming al042077 Linux - Software 1 04-05-2004 05:34 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:51 AM.

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
Open Source Consulting | Domain Registration