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)