Linux kernel's task_struct: a guide to the process descriptor's fields
The task_struct is the C structure the Linux kernel uses to represent a single task, which can be either a process or a thread. Every running program has at least one of these, and it stores or links to the kernel's full knowledge of that task, including its state, identifiers, parent, memory, open files, signals and scheduling data. Defined in include/linux/sched.h and also known as the process descriptor, it has grown to a few hundred fields in modern kernels, many conditional on configuration options. Much of the heavy data is held in separate structures that the task_struct points to, and threads of the same program can share some of them. The author's post groups the important fields into sections, showing simplified listings and explaining each field's type, meaning and any older names used in 2.6-era kernels.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in