Linux Process Creation

Source: Internet
Author: User

1. Creation of Processes

Create a process can be created with fork (), the child process copies the various segments of the parent process (text segment, data segment, stack, heap), the child process can independently modify these memory segments, in addition to the text segment (both shared, can not be modified by the quilt process).

The virtual address of the parent and child is the same, but when mapped to physical memory, a piece of space is created for the child process, which can modify the space independently.

The process created with fork (). The order in which the child process and the parent process executes is not necessarily a scheduler decision.

A process created with vfork () guarantees that the child process executes first. and Vfork () parent-child processes share data segments.

Fork () Create process diagram:



650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7E/B4/wKiom1cHYMXxDZX3AABBFPEuzTQ718.png "title=" Sub. png " alt= "Wkiom1chymxxdzx3aabbfpeuztq718.png"/>
























This article is from the "Output Diamond pattern" blog, so be sure to keep this source http://10541571.blog.51cto.com/10531571/1761781

Linux Process Creation

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.