what is the difference between. system call and library
function?
Answers were Sorted based on User's Feedback
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 |
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 |
application attempts to perform an operation?
Write a program to use switch statement.
0 Answers Agilent, Integreon, ZS Associates,
Can we add pointers together?
How to get string length of given string in c?
Why is c not oop?
What is sorting in c plus plus?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
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....
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?
What is the equivalent code of the following statement in WHILE LOOP format?
How to add two numbers without using semicolon at runtime