LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 08-07-2007, 10:21 AM   #1
jamesaugusty
LQ Newbie
 
Registered: Aug 2007
Posts: 1

Rep: Reputation: 0
Threads and processes with respect to virtual memory


Hi,
I had a few questions regarding threads and processes in linux with respect to virtual memory.

1)does each thread use the MMU to start at Virtual Memory zero, or is that a process only concept.
2)if threads don't use the MMU, then can data pointers be shared among threads within a process.
3)if a thread is pulled out into its own process, then will we have a problem sharing memory pointers
4)what is the performance impact of having all processes instead of threads.

Please do let me know if anyone has any answer for these questions

Thanks & Regards
JAmes
 
Old 08-09-2007, 01:18 AM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
I'll take two of those questions.

POSIX threads share the same address space. This improves performance, but it makes debugging difficult.

If your execution streams (for lack of a better generic term) communicate with each other very frequently or with great intensity, threads can help performance. Otherwise, stick with separate processes. It is very easy with threads to inadvertently do something silly, and silly in a complex way.

Hope this helps.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with threads & processes fuuzuu Programming 1 02-05-2007 07:37 AM
Threads are created as seperate processes blackhole123 Programming 3 03-16-2006 09:57 PM
Show processes, not threads Martin Strand Linux - Newbie 1 06-14-2005 08:46 AM
Piping keyboard input to two processes (or threads) caffeinebot Programming 3 05-17-2005 04:51 PM
Threads showing up as processes on ps command eDubster Linux - General 1 04-28-2003 04:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:42 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
Open Source Consulting | Domain Registration