OpenSource For You

Birth of a process

-

The life of a process is created by another process, which means a process must have its parent process. A fork API is used to create a process from the user space. The API gives a clone system call, which calls the do_fork function, which in turn calls the copy_process function, inside which is the dup_task_struct that creates the new process. Creating a new process means creating a new kernel stack, new task_ struct and new thread_info.

Before kernel 2.6, task_struct was created statically and the kernel stack had a pointer to this structure. Now task_struct is created by the slab allocator and the kernel stack

Newspapers in English

Newspapers from India