a computer question

kulki

Senior member
Jul 18, 2001
739
0
0
Hey guys I wonder if some computer guru could help me out here.
I am getting really confused between a system call and a library function. Its obvious that there is some difference while there is no difference from aprogrammers point of view. So whats the differece between a library call and a system call.
I will be very grateful for clearing my question
thanks
 

IcemanJer

Diamond Member
Mar 9, 2001
4,307
0
0
I think it's:

syscall - kernel function
lib call - library function (compiled to DLLs or to /usr/lib)
 

Noriaki

Lifer
Jun 3, 2000
13,640
1
71
A library call can be any piece of Code. For example in Java or C there are standardly provided Math libraries. They are just functions written by someone else that you make use of. So you can ask the Math library to calculate the Sin of 7.4 for you. Instead of trying to write your own function to do it, you use a standardly provided "library".

A system call usually means you are making a request through the OS or some other low level driver system. For example when you use cout, printf or System.out.println (in C++, C or Java respectively) you are asking it to send a string to the display subsystem. That's a system call becuase it's going through the OS and through driver systems, etc.

It's really just the context and results of a function call whether it's a library call or a system call.

A system call is still a library call, just a special case when you are using the "System" library.

If you are using the Math library, the Strings library, or any other "library" it's just a plain old library call.