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 |
hello everybody can we change a the adress of a variabl i mean can i put for exemple for a int *p: &p=6 ?????????
What is optimization in c?
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)
why we are using float in C
What is break in c?
Are negative numbers true in c?
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
give an example of type casting by a simple c program
What is difference between Structure and Unions?
Explain how can you tell whether two strings are the same?
sir, i cannot find the way how to write aprogram by using array on queue
What is key word in c language?