By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,834 Members | 1,903 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,834 IT Pros & Developers. It's quick & easy.

library function vs system calls

P: n/a
Dear all,

I was going through peter van der linden's book expert C programming
there i found the following:-

Library call
------------

*call to a routine in a library
*linked with user program
*executes in user address space
*counts as a part of user time
*has the lower head overhead of procedure call.

system call
-----------
* call to the kernel for a service
* is an entry point to the OS
* executes in the kernel address space
* has high overhead switch to kernel and back

then the author says that , remember many routines in the C library do
their work by making system calls and system() call is
actually a library call.

then how valid is the above explanation on the differences between
library call versus system call ?

why system() call is treated as a library call ?
Nov 30 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
so**********@gmail.com wrote:
) why system() call is treated as a library call ?

The library call 'system()' and the term 'system call' just happen to have
the word 'system' in them. That doesn't mean they are related in any way.

You can write 'kernel call' instead of 'system call', but it wouldn't
make sense to rename the system() function to kernel().
SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
Nov 30 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.