API and system calls | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

API and system calls

API is an acronym that stands for “application programming interface,” and it allows apps to send information between each other. While there are numerous protocols and technologies involved, the underlying purpose of APIs is always the same: to let one piece of software communicate with another. ~googled In computing, a system call (commonly abbreviated to syscall) is the programmatic way in which a computer program requests a service from the kernel of the operating system on which it is executed. System calls provide an essential interface between a process and the operating system. ~ wikipedia My question is : For me system call and API are looking two different modules. Then why and hoe the question arises that what is the difference between api and system call and how can one answer it perfectly. Please some one give me a real life example for API except the Flight Scheduleing and Hotel Waiter, Im not getting them.

26th Oct 2021, 11:06 PM
HK Lite
HK Lite - avatar
1 Answer
+ 2
The difference is stated clearly in the definition itself. API - works between two pice of softwares, they can be independent, even from some other system, it's like an end point where someone can tap to get some info. Systemcall happens within the system, that's why it says , a 'system program' request a service from the kernel of operating system. For the functioning of your system, system call is important, but api isn't. Also if you wanna see what's similar, may be you can say, if an app or program makes a call to api, it's similar to a program making a call to os kernel, but in the end, both are in totally different context.
27th Oct 2021, 12:15 AM
Aravind - avatar