System Call: Create an exception that invokes an OS function
- Why exception? Because accessing external memory needs kernel-level permissions.
- Syscall Identifier: Numeric value indicating the operation
- Kernel uses syscall table + identifier index to find the handler code
- Kernel must verify syscall arguments
Passing Parameters
x86 Syscall:
- Can pass 6 parameters through registers
- Pass the rest as a struct with pointer in the 6th register
Validating User Pointers: If a struct pointer is passed in, OS need to check if the calling process has access to the pointer