Why System Calls Aren’t Just Ordinary Function Calls: A Deep Dive
System calls differ from regular function calls by using the CPU’s privileged syscall instruction, indirect indexing via registers, and a mode switch from user to kernel space, allowing the OS to control which kernel functions applications can invoke, while ordinary calls use direct addresses and stay in user mode.
