In my previous post, about the Linux kernel,
the structure
task_struct
represents threads i.e. light weight processes, but not processes.processes are not represented by any structure, but by groups of threads sharing the same thread group id.
I was wondering how differently or similarly a typical Unix kernel (System V, FreeBSD, ...) implements processes and threads at a high level? Thanks.
task_struct
represents both processes and threads. – Johan Myréen Jan 02 '19 at 06:22createProcess
is expensive. Unix: but we can just useselect
/pole
, or if we need concurrency we can usefork
. It is faster than yourcreateProcess
and safer. MS: yes but we have threads. Eventually Unix added threads, for comparability. And they were a little faster to create thanfork
. – ctrl-alt-delor Feb 10 '20 at 21:58