Next: Processes Vs. Threads
Up: Threads
Previous: Semaphores for Threads
Contents
- Whenever you call pthread_create to create a new thread, Linux creates a new process that runs that thread.
- However, this process is not the same as a process you would create with fork; in particular, it shares the same address space and resources as the original process rather than receiving copies.
- The manager thread is created the first time a program calls pthread_create to create a new thread. http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/thread-pid.cthread-pid.c (see Fig. 5.6)
Figure 5.11:
Print Process IDs for Threads
|
Cem Ozdogan
2007-05-16