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
    1. The user program calls the system library
      • Uses a normal procedure call (which is a normal function call)
    2. 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
    3. Traps to kernel mode
    4. Kernel dispatcher reads the SysCall number
      • Looks up vector table and makes internal call to code that carries out the system call
    5. System returns to library
    6. Library returns to user program