Linux kernel and analysis sixth week analysis of the process of creating a new process for the Linux kernel

Source: Internet
Author: User

Experimental process

Clone the corresponding mengning/menu.git on 1.github

2. Test Menuos, test fork Direct execution results

3. Configure debug system, go to gdb Debug, use file Linux-3.18.6/vmlinux and target remote:1234 to configure loading initial debugging environment

4. Set breakpoints in the Linux kernel process to create the points that may be used, respectively, sys_clone,do_fork,dup_task_struct,copy_thread,copy_process and Ret_from_fork.

Summarize:

1. Create the process by calling Do_fork;

2. Copy the parent process PCB--task_struct to create a new process and assign a new kernel stack to the new process ;

3. Modify the copied process data, such as PID, process chain list and so on to execute copy_process and Copy_thread 4, successfully create a new

Wang Xue Cheng

Original works reproduced please indicate the source

"Linux kernel Analysis" MOOC course http://mooc.study.163.com/course/USTC-1000029000

Linux kernel and analysis sixth week analyzing the process of creating a new process for the Linux kernel

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.