System Calls
- Involves a context switch into kernel mode for execution
- Usually there is a system library entry point
- Calling the system library is similar to a procedure call
- Process
- The user program calls the system library
- Uses a normal procedure call (which is a normal function call)
- Inside the system library routine, the system call is actually made
- Parameters and system call numbers are stored by the system library routine at specific spaces
- Traps to kernel mode
- Kernel dispatcher reads the SysCall number
- Looks up vector table and makes internal call to code that carries out the system call
- System returns to library
- Library returns to user program