FOR FREE CONTENT

Difference between System Call and Library Call:

 

Library calls

  • a)  All functions are a part of the standard library file of programming languages.
  • b)  It is executed in user mode.
  • c)  It has less privileged because it is run at user mode.
  • d)  Execution is faster because there is no context switch.

 

System Calls

  • a)  All functions are a part of Kernel.
  • b)  It is executed in kernel mode.
  • c)  It has high privileged because run in the supervisory mode.
  • d) System call is slow compare to library functions call because there is a context switch involved.

 

 

Here fork() and write() are system calls. fork() creates a child process and the execution of fork() and write() is in kernel mode because it is part of the operating system and the conversation takes place from user mode to supervisor mode. Execution of supervisor mode involves the software interrupt which handles Interrupt Service Routine (ISR).