LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-25-2008, 05:10 PM   #1
jonty_11
Member
 
Registered: Sep 2004
Posts: 127

Rep: Reputation: 15
Question Execution threads vs normal threads


Do execution threads differ from normal threads we create in our Programs.

I am reading that execution threads are related to the CPU you have.
Say for a Dual Core Xeon Processor, you can have 2 Exeecution threads.

However, when we create threads in our software those are limited by a configuration parameter in the system file and are much larger in number per Process (1000 or more)

How are the 2 types of threads related?
 
Old 03-25-2008, 09:43 PM   #2
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
Well, think of the regular threads as like processes or programs. Now on a regular, single core machine, you have only one thread of execution and many processes. We handle this by switching back and forth between these programs really fast. It's the same thing in a multithreaded environment. The only difference is that since we have two threads of execution, we can run two at a time instead of one at a time.

Last edited by PatrickNew; 03-25-2008 at 09:50 PM.
 
Old 03-26-2008, 10:37 AM   #3
jonty_11
Member
 
Registered: Sep 2004
Posts: 127

Original Poster
Rep: Reputation: 15
when I show /proc/cpuinfo and it shows 4 CPUs, does that mean I have 4 threads of execution I can use to run my programs(and the threads within them)
 
  


Reply

Tags
execution, threads


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Threads execution question mvorlov Programming 7 09-19-2006 08:13 AM
"Find all threads started by user" not showing all threads Nylex LQ Suggestions & Feedback 3 12-28-2005 08:28 PM
0 reply threads and new threads aneroid LQ Suggestions & Feedback 7 12-18-2005 06:20 AM
Java threads listed using kill -3 does not contain all threads found using ps -auxww coneheed Programming 2 11-14-2005 08:57 AM
Java Threads vs Native Threads rjmendez Programming 0 08-16-2004 05:58 AM


All times are GMT -5. The time now is 07:59 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration