System calls and APIs

Source: Internet
Author: User
  • System calls
In a computer, system call, also known as a system call, refers to a service running in user space (user state) that requests the operating system kernel to run with higher privileges. System calls provide an interface between the user program and the operating system. Most system interactive operational requirements are performed in the kernel state. such as device IO operations, interprocess communication.

  • Api

APIs (application Programming Interface, application programming interfaces) are pre-defined functions designed to provide the ability of applications and developers to access a set of routines based on a piece of software or hardware without having to access the source code. Or understand the details of the internal working mechanism.

  • System calls and APIs
  1. The API focuses on providing services to the upper layer, while system calls focus on sending a clear request through the core of the down layer of soft interrupts. The API belongs to the user state, and the system call belongs to the kernel state.
  2. In general, the API libraries provided by the operating system follow certain standards to achieve portability of applications over different systems. The standard provides an API up-to-the-shelf interface, and the operating system can vary depending on how the API is implemented.
  3. An API is an interface to an application that implements more than just the underlying services and resources, but also encapsulates other applications, so that API and system calls are not necessarily linked. First: An API can not invoke any system calls, providing only user-configured services (such as functions for mathematical operations). Second: An API may invoke multiple system calls. Third: Multiple APIs can invoke the same system call that encapsulates the different functionality.

System calls and APIs

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.