System Calls

There are lots of library functions, written for convenience. Most of them aren't syscalls (operate within an application) - e.g. memcpy, strcmp.

BUT there are also system calls that need to interact with the kernel. E.g. open, close, read, write

Basically the OS relinquishes control of the system to run a program, then when a syscall, an interrupt (e.g. a period of time passing) it resumes control to handle it.

Types of Syscalls

  • Process Management
    • E.g. fork or pid
  • File I/O
    • E.g. read or open or lseek
  • Directories management
    • E.g. mkdir, rmdir, mount
  • Other
    • E.g. time, chmod, kill