LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 07-01-2011, 03:56 AM   #1
manaila
LQ Newbie
 
Registered: Apr 2010
Posts: 29

Rep: Reputation: 0
Question pthreads


Hi
In my code I want to have two different functions to be executed simultaneously (in parallel) in a single processor system. I tried to use pthreads but they happened to be executed one after another. I have heard about fork, some saying that its no longer recommended since its functions can be achieved by pthreads.
So I am kind of confused...how can I achieve parallelism.

cheers
 
Old 07-01-2011, 11:59 AM   #2
rramesh1
LQ Newbie
 
Registered: May 2011
Posts: 14

Rep: Reputation: 1
Its very hard to say without seeing what you have in your code, you will need to post that to see if your code is right in the first place.
 
  


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
Pthreads in c++ brevleq Programming 11 11-14-2009 04:52 AM
Pthreads a12ctic Linux - Software 1 06-09-2005 10:05 PM
pthreads ftgow Linux - Software 0 07-08-2004 03:55 AM
pthreads socket9001 Programming 2 12-29-2003 12:23 AM
pthreads Keith Hampton Linux - Software 1 10-23-2003 01:46 PM

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

All times are GMT -5. The time now is 04:02 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