what is the difference between. system call and library
function?

Answers were Sorted based on User's Feedback



what is the difference between. system call and library function?..

Answer / vishnu948923

system calls are provided by the system and are executed in
the system kernel. They are entry points into the kernel and
are therefore NOT linked into your program. These are not
portable calls.
ยท Library calls include the ANSI C standard library and
are therefore portable. These functions are linked into your
program.
It is worth noting that, because system calls are part of
the O/S. The program has to make a context switch to the
kernel when they are called and because of this, they have a
high startup overhead. The upside is that the time executing
these routines is assigned to the OS and not the user program.

Is This Answer Correct ?    66 Yes 9 No

what is the difference between. system call and library function?..

Answer / eng abedalmohdi almomani

system call can be called from either kernel space or user
space(in this case include switch to privilage mode) and
executed in kernel space while library called only from
user programm and may call systemcall to perform it is
function like "printf" that need "write" system call while
other not need kernel at all like sin(),cos().....

systemcall examples : write,read,close,mmap,open,.......
library examples: fopen,fclose,printf,scanf,fscanf,.....

Is This Answer Correct ?    38 Yes 8 No

Post New Answer

More C Interview Questions

application attempts to perform an operation?

0 Answers  


Write a program to use switch statement.

0 Answers   Agilent, Integreon, ZS Associates,


Can we add pointers together?

0 Answers  


How to get string length of given string in c?

0 Answers  


Why is c not oop?

0 Answers  






What is sorting in c plus plus?

0 Answers  


What is Dynamic memory allocation in C? Name the dynamic allocation functions.

1 Answers  


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

0 Answers   RBI,


what is the differnce between AF_INET and PF_INET?

5 Answers   Systems Plus, Wipro,


How can I access memory located at a certain address?

3 Answers   Verizon,


What is the equivalent code of the following statement in WHILE LOOP format?

0 Answers  


How to add two numbers without using semicolon at runtime

2 Answers  


Categories