Learn through the super-clean Baeldung Pro experience:
>> Membership and Baeldung Pro.
No ads, dark-mode and 6 months free of IntelliJ Idea Ultimate to start with.
Last updated: March 18, 2024
In this tutorial, we’ll learn about system calls and their types.
System calls are mechanisms that provide the operating system’s services to computer programs. Computer programs use system calls to request a service from the operating system’s kernel. Moreover, if a program requires a resource from the operating system, it needs to make a system call.
System calls provide many services to computer programs. They are categorized into five categories based on the services that they provide:
Process control system calls are used to create and manage processes. For example:
File management system calls are used to manipulate files. Some of them are:
Device management system calls are used to manipulate or manage devices. For example, ioctl (input/output control) controls a device by sending a device-dependent request code.
Information maintenance system calls are used to manage and transfer information between the operating system and computer programs. For example, getpid is a system call that returns the process id (PID) of the calling process when it’s called by a program.
They’re used for communication between different processes. For example, pipe is a system call that creates a pipe, a unidirectional data channel that connects two processes.
In this tutorial, we learned about system calls and their types.