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 "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 can use Process Control related system transfer to create processes, implement process scheduling, process management, etc. Why does the user program not directly access the services provided by the system kernel? This is because in Linux, in order to better protect the kernel space, the running space of the program is divided into kernel space and user space (known as the kernel State and user state), they run at different levels, are logically isolated from each other. As a result, user processes typically do not allow access to kernel data, nor can they use kernel functions, which can only manipulate user data in user space and invoke user-space functions. However, 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 to specify the user process into the specific location of the kernel space.  When making a system call, the program run space needs to enter the kernel space from the user space, and then return to the user space after processing. The system call mentioned earlier is not directly interacting with the programmer, it is just an interface that submits a request to the kernel through a soft interrupt mechanism to get the kernel service. In practice, programmers call the user programming interface--apiThe System command is a layer higher than the API, and it is actually an executable program that internally references the user programming interface (API) to implement the appropriate functionality.



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

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.