Subscribe to
Posts
Comments

Threads FAQ

Because I maintain this FAQ with blogging software, the most recently edited item tends to float to the top. If you want to browse a table of contents in “semi-sane” order, here it is.

7 Responses to “Threads FAQ”

  1. on 05 Jan 2007 at 22:55praneeth

    hi ,
    thanks

  2. on 27 Apr 2007 at 14:55francisco

    how i know if a thread finish?

  3. on 05 Oct 2007 at 12:57ElellaObebast

    There’s one special secret Sale link on Amazon:

    http://tinyurl.com/2r7ldr

    This is open every Friday and ONLY on Fridays!

    You can find very good discounts here, although some Fridays you can really get
    lucky and make off like an Amazon bandit - I´ve seen discounts there as low as 75%
    off sticker Price.

  4. on 12 Feb 2008 at 12:22Benson

    Hey there

    I am new to the subject of thread. Can someone tell me why is the average time that using pthread_create() to creat a thread is shorter than using fork() to create a process?

    My thought is that because parent process has to wait for each child process. On the other hand, thr_create.c includes which only needs to wait for the last thread. Am I correct?

  5. on 24 Feb 2008 at 22:15Paul

    Hi Benson,

    Threads are faster than a fork() because their overhead is much smaller, as they share the same memory space than their creator. This is why it takes about 30 times less time to create a pthread than fork the current process.

    As for the parent waiting for the children to terminate, it’s up to you. If you create your threads “detached”, they will liberate their own memory space automatically as they terminate. Otherwise, you have to join in order for the threads to return their memory to the heap cleanly.

  6. on 23 Jun 2008 at 17:01huilo43

    , , 3gp .

    ,

  7. on 23 Jun 2008 at 22:39Tawionzpondela

    discount laptops

Leave a Reply