Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Noo... fork() gives you a separate address space, whereas threads would require that you share an address space with the parent.

vfork() and clone() can almost give you what you want, but Linux threading is using something different (NPTL) nowadays.



You're correct. My position was that in Linux, threads weigh just as much as processes; the forking speed is identical, and extremely fast with COW. Compared to other OSes where processes and threads are completely different beasts.

Even with NPTL, both processes and threads have task_structs.


NPTL uses clone(2). fork(2) is implemented in terms of clone(2) also.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: