[Linux] basic concepts of C language and Linux System Programming process

Source: Internet
Author: User

[Linux] basic concepts of C language and Linux System Programming process

 

1. If files are the most important abstract concept of unix systems, processes are second only to files. A process is the target code in execution: active, surviving, and running programs.

In addition to the target code process, it also contains data, resources, statuses, and virtualized computers.

 

2. Process System:

Each process has a unique positive integer identifier, namely, the process ID (pid). The pid of the first process is 1, and then each process receives a new unique pid.

In linux, processes have a strict hierarchy, which is a well-known process tree. The process tree takes the first process, that is, the init process as the root. The new process is created by calling the fork () system. Fork () copies the calling process. The original process is called the parent process, and the new process is called the child process. In addition to the first process, each process has a parent process.

 

3. Signal

A signal is a one-way asynchronous notification mechanism. A signal may be sent from the kernel to a process, from a process to a process, or from a process to itself. Signals are generally used to notify the process of certain events.

The Linux kernel implements about 30 signals, each of which is represented by a constant bright number and a text name. In addition to SIGKILL and SIGSTOP, processes can be controlled based on received signals.

 

4. inter-process communication

One of the most important tasks of the operating system is to allow processes to exchange information and notify each other of events. The Linux kernel implements the traditional unix inter-process communication (IPC) mechanism.

The inter-process communication mechanisms supported by linux include pipelines, named pipelines, semaphores, message queues, shared memory, and fast user space mutex.

Related Article

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.