System Calls vs. Library Functions¶
System Calls¶
The kernel is not a library ⟶ no direct function calls, but rather System Calls.
Entry points into the kernel
Every system call has a unique number and a fixed set of parameters and registers (ABI)
Changes context from user mode to kernel mode
Implementation is CPU specific (software interrupt …)
Numbers, parameters, etc. are Linux specific
⟶ “kernel acts on behalf of a process”
System Calls And The C-Library¶
System calls are never used directly by a program … #include <unistd.h>
int main() {
write(1, "hallo\n", 6);
return 0;
}
|
Library Function Or System Call?¶
Distinction is not always clear ⟶ manual pages
System calls ( |
No system calls ( |
---|---|
|
|
Manual Pages¶
man [section] name
For example: man man
⟶
User Commands
System Calls
C Library Functions
Devices and Special Files
File Formats and Conventions
Games et. Al.
Miscellanea
System Administration tools and Daemons