Middle
What are system calls? Which ones do you know?
sobes.tech AI
Answer from AI
System calls (syscalls) are the interface between a user application and the kernel of the operating system. They allow programs to request the OS to perform operations that require kernel privileges, such as working with files, networks, processes, and memory.
Examples of system calls in Unix-like OSes:
open()— open a fileread()— read data from a filewrite()— write data to a filefork()— create a new processexec()— execute another programwait()— wait for a child process to finishkill()— send a signal to a processmmap()— map a file or device into memory
Each syscall is usually implemented as an interrupt that switches the processor to kernel mode to safely perform the operation.