I am a student doing research involving Linux processes, and I need to learn more about them to proceed with my experiment. In reading a couple books and things online, I've come across task_struct
, which I'm not sure I'm understanding fully, and would like confirmation/correction onto my existing thought.
From what I think I've understood, task_struct
is the C structure that acts as the process descriptor, holding everything the kernel might need to know about a processes. At the end of the process kernel stack lives another struct, thread_info
, which has a pointer to the processes task_struct
.
Another question: how does one access the task_struct
of a process? Is there a calculation to find the location of it's thread_info
? Is there a macro/function within the kernel?