First page Back Continue Last page Overview Graphics
Confusion about the terms «process», «thread» and «task»
In Unix, a process is created using fork() and is composed of
- An address space, which contains the program code, data, stack, shared libraries, etc.
- One thread, that starts executing the main() function.
- Upon creation, a process contains one thread
Additional threads can be created inside an existing process, using pthread_create()
- They run in the same address space as the initial thread of the process
- They start executing a function passed as argument to pthread_create()