Topics

System Calls

System calls are an API provided by the OS to applications that run in user space. They are used to preform privileged operations that can only occur in kernel space.

Note

Most programming languages access system calls through a high-level API rather than the syscall interface. This decreases coupling between the kernel and application, and increases portability.

Common APIs:

Most implementations for syscalls use software traps. There may also be a syscall instruction for faster transfer of control to the kernel.

Parameter Passing

To pass argument to system calls three different methods may be used:

Note

The pure register method is rarely used due to the number/size of parameters that may be passed to the call. Although its the fastest, it is not the most practical.

On the other hand the block and stack methods do not limit the number or length of parameters being passed.

Types of Calls

System calls fall under these categories:

System Programs

These are user-level programs that are shipped with the OS. They ease the job of program development and execution.

Note

System programs are not part of the OS kernel

System programs fall into these categories:

Reference

  1. Kulkarni, Prasad Various Lectures The University of Kansas 2024

Related