What are system calls? Lets understand with an example
Overview
When a C program wants to read a file using read()
, it needs help from the operating system (OS). This is because reading a file involves interacting with hardware (disk), and user-space programs don't have direct access to hardware.
The OS provides system calls as a way for user programs to request such privileged operations.