System calls

  • https://en.wikipedia.org/wiki/System_call
  • Programmatic way in which a computer program requests a service from the OS on which it is executed
  • Number of System calls depends on:
    • Kernel Version (OS version)
    • Hardware Architecture (x86, x86_64, ARM)
  • For x86_64/AMD64, ~450 system calls defined

Standard C Library

Process Control

  • exec
  • fork
  • wait
  • exit
  • kill

File Management

  • open
  • read
  • write
  • close

Communication

  • pipe
  • libraries:
    • libevent
    • libuv
  • select, poll
  • epoll — replacement for select and poll

strace

  • It can be used to print system calls getting called internally
strace ls -al