# Process Representation in Linux System

Operating SystemLinuxProgramming Scripts

Linux can manage the processes in the system, each process is represented by a task_struct C data structure. It is found in the <linux/sched.h> include file in the kernel source-code directory. The task vector is an array of pointers to every task_struct data structure in the system. As well as the normal type of process, Linux supports real time processes. All the required information i.e; the state of the process, scheduling and memory-management information, list of open files, and pointers to the process’s parent and a list of its children and siblings are contained in this structure.

A process who creates a process is called parent of that created process; its children are any processes that it creates and siblings are children with the same parent process.

Some of these fields include −

long state; /*denote state of the process */
struct sched entity se; /*denote scheduling information */
struct task struct *parent; /*denotes this process’s parent */
struct list head children; /*denotes this process’s children */
struct files struct *files; /* denotes list of open files */
struct mm struct *mm; /* denotes address space of this process */
/*denotes, op = original parent, p = parent, c = youngest child, ys = youngest sibling, os = older sibling */