system calls vs librery routines

can i know what is the differnece between using librery function and system calls for performing any of the operation like read, write and other operations

From a programming perspective, there is no difference between a system call or any other function call.

In general, a "system call" is the API through which a program can request OS level services such as read/write/open/close devices (disk, comm, etc.) utilizing the "kernel mode" processing. This is typically the "way in" to the device driver itself from an application. The basic difference is that when a system call is used, this will generate a "context switch" (interrupt) which can be expensive in terms of execution time (in RT systems).

A "library function" can be built upon and around system calls to allow for "the perception" of varied access to devices. It can also use no system level service at all. In general, library functions execute predominantly in "user space" unless they invoke a system level service request (system call).