EmbLogic's Blog

Library functions vs. System Calls

  • Standard functions can be divided in two main categories :-
    1. Library function calls.
    2. System function calls.
  • The functions which are a part of standard C library are known as Library functions. For instance, strcmp(), strlen() etc are all library functions.
  • The functions which change the execution mode of the program from user mode to kernel mode are known as system calls. For instance, socket(), open(), read() , write() etc are all system calls.
  • A library function is linked to the user program and executes in user space but a system call is not linked to a user program and executes in kernel space.
  • A library function execution time is counted in user level time but a system call execution time is counted as a part of system time.
  • Library functions can be debugged by using a debugger but System calls cannot be debugged because they are executed by the kernel.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>