Linux kernel interfaces

This is an old revision of this page, as edited by Siddhant (talk | contribs) at 20:29, 20 February 2014 (clean up, removed stub tag using AWB). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The Linux kernel provides several interfaces to user-space applications that are used for different purposes and that have different properties by design.

File:SUS History.svg
Chronological hierarchy of relationships of various UNIX API standards that ultimately gave rise to POSIX.1-2008/SUSv4. Solid lines indicate direct descent, whereas dashed lines indicate a case where either 1) one standard influenced another 2) one standard was incorporated into another, or 3) one standard deferred to another.

There are two types of application programming interface (API) in the Linux kernel that are not to be confused: the "kernel user-space" API and the "kernel-internal" API.

Kernel user-space API

 
The Linux kernel API versus the POSIX API.

The kernel user-space API is the API that allows programs in user space to access system resources and services of the Linux kernel. This API, by choice, never breaks. The POSIX API is only a small part of the Linux kernel API.

Much available free and open-source software is written for the POSIX API. But since the last POSIX version is from 2008, and since so much more development is going on with the Linux kernel as compared to the other POSIX-compatible kernels, various software has been developed that target solely the Linux kernel user-space API. Well-known examples are systemd and Weston.

People such as Lennart Poettering openly advocate writing software solely for the Linux kernel user-space API instead of POSIX, where this offers advantages.

In-kernel API

By choice, the Linux kernel has no stable in-kernel API (a.k.a. Binary Kernel Interface).[1]

See also

  • C standard library – the library for the C programming language made available across implementations
    • GNU C Library – the GNU Project's implementation of the C standard library
  • system call – is a function to facilitate programs to requests services from the kernel
    • netlink – Netlink was added by Alan Cox during Linux kernel 1.3 development as a character driver interface to provide multiple kernel and user-space bidirectional communications links. Then, Alexey Kuznetsov extended it during Linux kernel 2.1 development to provide a flexible and extensible messaging interface to the new advanced routing infrastructure. Since then, Netlink sockets have become one of the main interfaces that kernel subsystems provide to user-space applications in Linux.
    • mmap – a system call
    • fanotify – a system call
    • dnotify - a system call
    • inotify – a system call
    • netlink – socket family used for IPC between kernel and user space processes, designed as the successor of ioctl
  • Windows API – article on various API available on Microsoft Windows operating systems
  • Wine – a compatibility layer between Linux and programs written for Microsoft Windows

References

  1. ^ "The Linux Kernel Driver Interface".