Thread: pthreads

  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    146

    pthreads

    Hello all,

    It will be of great help if you can direct me to some good reading material on pthreads in linux. I have just got started with linux. I know about process, threads , resource sharing conceptually. So, something that involves step by step implementation along with brief theory will help me a lot..

    Thanks
    Edesign

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445

  3. #3
    Registered User
    Join Date
    Feb 2008
    Posts
    146
    hey that was cool... the link...

    Btw...I'm through the link 2 but they assume user's familiarity with Linux... so I was finding it a little difficult to follow....

    Nvm, thanks for help...

    Edesign

  4. #4
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Try "POSIX threads" instead of just "pthreads".
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  5. #5
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    I really, really like the O'Reilly book Pthreads Programming: A POSIX Standard for Better Multiprocessing . Not too expensive, and covers the topic pretty completely.

    It assumes only a microscopic background in concurrency.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  6. #6
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by edesign View Post
    ...they assume user's familiarity with Linux...
    it's interesting that you point that out, given your original request:

    Quote Originally Posted by edesign View Post
    ...direct me to some good reading material on pthreads in linux
    I guess I assumed you had some familiarity with linux, given the fact that you're writing code for it.

    you could also look into boost::threads (C++ and other OO languages only). I have started using them a lot for my code, and I am pretty pleased with the results.

  7. #7
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by brewbuck View Post
    I really, really like the O'Reilly book Pthreads Programming: A POSIX Standard for Better Multiprocessing . Not too expensive, and covers the topic pretty completely.
    How would you compare with Butenhof's Programming with POSIX Threads?

    I've not seen the one you referenced, but it's about time I updated my library.

  8. #8
    Registered User
    Join Date
    Feb 2008
    Posts
    146
    Quote Originally Posted by Elkvis View Post
    I guess I assumed you had some familiarity with linux, given the fact that you're writing code for it.
    ya, I started with being familiar with linux and went through basic stuff first but it takes time... plenty of things you get to learn gradually...

    Thanks all for help... I've found some good stuff, tutorials to start with... in fact I've already started...

  9. #9
    VIM addict
    Join Date
    May 2009
    Location
    Chennai, India
    Posts
    43
    I started my experiment on POSIX thread with the help of this tutorial. i think it is well suited for the beginners. Check it out......

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. using pthreads with an API that uses pthreads
    By MK27 in forum C Programming
    Replies: 3
    Last Post: 03-06-2009, 02:47 PM
  2. Pthreads performance
    By C_ntua in forum C Programming
    Replies: 42
    Last Post: 06-17-2008, 11:29 AM
  3. Replies: 3
    Last Post: 04-16-2007, 12:02 PM
  4. Difference between win32 and linux pthreads
    By philipsan in forum C Programming
    Replies: 1
    Last Post: 02-07-2006, 04:57 PM
  5. pthreads and resources
    By ubermensch in forum C Programming
    Replies: 2
    Last Post: 02-07-2006, 02:27 AM