Kernel thread exit in linux

Posted by Raffo on Stack Overflow See other posts from Stack Overflow or by Raffo
Published on 2010-05-11T10:29:05Z Indexed on 2010/05/11 10:34 UTC
Read the original article Hit count: 231

Filed under:
|
|

Hi guys, I'm here to ask you the difference between a process and a thread in linux. I know that a thread for linux is just a "task", which shares with the father process things that they need to have in common (the address space and other important informations). I also know that the two are creating calling the same function ('clone()'), but there's still something that I'm missing: what really happens when a thread exit? What function is called inside the linux kernel? I know that when a process exits calls the do_exit function, but here or somewhere else there should be a way to understand if it is just a thread exiting or a whole process. Can you explain me this thing or redirect to some textbook?? I tried 'Understanding the linux kernel' but I was not satisfied with it. I'm asking this thing because a need to add things to the task_struct struct, but I need to discriminate how to manage those informations for a process and its children.

Thank you.

© Stack Overflow or respective owner

Related posts about linux-kernel

Related posts about threads