Linux system call and User programming interface (API)

Source: Internet
Author: User

system Callsthe so-called system call refers to the operating system provided to the user program calls a set of "special" interface, the user program through this set of "special" interface to obtain the service provided by the operating system kernel. For example, the user is able to create processes, implement process scheduling, process management, and so on through process control related system tuning.

Why can't the user program directly access the services provided by the system kernel? This is because in Linux, in order to better protect the kernel space, the execution space of the program is divided into kernel space and user space (that is, the commonly known kernel state and user state), which are executed at different levels, are logically isolated from each other.

So. The user process does not normally agree to access the kernel data, nor can it use kernel functions. They can only manipulate user data in user space. A function that invokes user space.

But. In some cases, the process of user space needs to obtain a certain system service (call kernel space program), then the operating system must take advantage of the system provided to the user's "special Interface"-system calls the user process into the kernel space of the detailed location. When making system calls. The program execution space needs to enter the kernel space from the user space. Return to user space after processing is complete. The system calls mentioned earlier do not interact directly with the program ape. It's just a soft interrupt mechanism that submits a request to the kernel to get the interface of the kernel service.

In the actual use of the program Ape call is generally user programming interface--api

The System command is a little higher than the API, and it is actually a running program that internally references the user programming interface (API) to implement the corresponding functionality.



Linux system call and User programming interface (API)

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.