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 |
What is the explanation for modular programming?
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(x+2,y-10)); } the output of the program is a.8 b.6 c.7 d.none
In C programming, how do you insert quote characters (‘ and “) into the output screen?
write a program of palindrome(madam=madam) using pointer?
write an algorithm to display a square matrix.
What is this infamous null pointer, anyway?
Explain what is page thrashing?
Is it possible to have a function as a parameter in another function?
how many argument we can pas in in a function
WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c file management?
28 Answers 3D PLM, Code Studio, Deltech, IBM,