/    /  OS – System Calls

Introduction to System Calls

 

What is a system call?

 

A system call is a request by any computer program, to the kernel of the operating system, it is executed upon. It is normally made when a program needs access to a resource. It provides an essential interface between the program and the operating system. 

 

Categories of system calls:

 

System calls can be categorized into six major categories:

 

  • Protection

 

  • It sets file permissions.

Example: SetFileSecurity() in Windows and umask() in Unix.

 

 

  • Communication

 

  • It helps the OS to transfer status information.
  • It creates and deletes communications connections.
  • Helps to send and receive messages.

Example: CreatePipe() in Windows and pipe() in Unix.

 

 

  • Process control

 

  • Performs tasks like process creation and process management.

Example: CreateProcess() in Windows and fork() in Unix.

 

 

  • File management

 

  • Handles file manipulation jobs like deleting a file, creating a file, etc.

Example: CreateFile() in Windows and open() in Unix.

 

 

  • Device management

 

  • Handles device manipulation jobs like reading and writing into device buffers, etc.

Example: WriteConsole() in Windows and write() in Unix.

 

 

  • Information maintenance

 

  • System calls handle information transfer between the OS and the user program.

Example: SetTimer() in Windows and alarm() in Unix.

 

What are the services provided by System Calls?

 

The services provided by System Calls are,

  1. Managing the main memory.
  2.  Handling I\O devices.
  3. Process management and creation.
  4. Networking
  5. Protection
  6. File management

 

References:

System calls of operating system.