Skip to main content

Introduction to Operating Systems

System Calls and Interrupts

0:00
LearnStep 1/3

System Calls

System Calls: The OS API

A system call is a programmatic way for a program to request a service from the kernel.

Types of System Calls

CategoryExamplesPurpose
Process Controlfork(), exec(), exit()Create, run, terminate processes
File Managementopen(), read(), write(), close()File operations
Device Managementioctl(), read(), write()Device I/O
Informationgetpid(), alarm(), sleep()System information
Communicationpipe(), shmget(), mmap()Inter-process communication

System Call Flow

c

User Mode vs Kernel Mode

  • User Mode: Limited access, cannot directly access hardware
  • Kernel Mode: Full access to hardware and memory