Thursday, 15 April 2010

c++ - What is the difference between "Linux Kernel API", "System Calls", "System Interfaces" and "GNU C Library"? -


After trying to implement system call , I am fully confused about Linux: D

Linux kernel API , system call , system interface and GNU C library ?

Linux kernel API

Linux system call

System Interface

GNU C Library < P>

I am confused about these tasks.

For example sprintf is present in Linux kernel API , but this function is also included in the System Interface functions list Some functions should not be used in kernel mode (such as printf ). Many tasks do the same thing with different names (like sys_open and open ), and so on ...

My question is this Is: What is the difference between Linux kernel API , system call , system interface and GNU C library ? Which function should I use, which function should I not use?

Oh! C standard library : forgot

  • C library C language applies the standard. This standard output is done by calling the operating-specific function, to ask to write. The C library can be applied to many more systems, such as Linux, Windows, DOS and various micro controllers.

    The term "GNU C Library" has probably been referred to with a special implementation C library, perhaps with the GNU Compiler Collection.

  • The operating system displays a standard interface, in which system calls in Linux. So for example, writing standard output is done by calling writing system call. Linux (and more generally Pox) systems provide a C library around the call so they are convenient to use.

    You can apply the C library using this system interface. For example, the system call file can be applied with the code descriptor 1 to the putc from the c library.

    MS Windows provides an analog system API, which is called the Windows API, it can also be used to implement the C library.

  • The kernel is programmed inside the API kernel, e.g. For drivers to write or provide new system calls.

No comments:

Post a Comment