Process Control

These types of system calls deal with process creation, process termination, process allocation, deallocation etc. Basically manages all the process that are a part of OS.

  • fork(): Creates a new process (child) by duplicating the current process (parent). This call is made when a process makes a copy of itself and the parent process is halted temporarily until the child process finishes its execution.
  • exec(): Loads and runs a new program in the current process and replaces the current process with a new process. All the data such as stack, register, heap memory everything is replaced by a new process and this is known as overlay. For example, when you execute a java byte code using command – java “filename”. Then in the background, exec() call will be made to execute the java file and JVM will also be executed.
  • wait(): The primary purpose of this call is to ensure that the parent process doesn’t proceed further with its execution until all its child processes have finished their execution. This call is made when one or more child processes are forked.
  • exit(): It simply terminates the current process.
  • kill(): This call sends a signal to a specific process and has various purpose including – requesting it to quit voluntarily, or force quit, or reload configuration.

Different Types of System Calls in OS

System calls are interfaces provisioned by the operating system to allow user-level applications to interact with low-level hardware components & make use of all the services provided by the kernel, which is a core component and the heart of an operating system that manages all the hardware and the services provided by the OS. These system calls are essential for every process to interact with the kernel and leverage the services provided by it.

System calls are basically an interface between a process and the operating system. And they’re the only way to switch from user mode to kernel mode.

Similar Reads

Types of System Calls

Services provided by an OS are typically related to any kind of operation that a user program can perform like creation, termination, forking, moving, communication etc. Similar types of operations are grouped into one single system call category. System calls are classified into the following categories :...

1. File System Operations

These system calls are made while working with files in OS, File manipulation operations such as creation, deletion, termination etc....

2. Process Control

These types of system calls deal with process creation, process termination, process allocation, deallocation etc. Basically manages all the process that are a part of OS....

3. Memory Management

These types of system calls deals with memory allocation, deallocation & dynamically changing the size of a memory allocated to a process. In short, the overall management of memory is done by making these system calls....

4. Interprocess Communication (IPC)

When two or more process are required to communicate, then various IPC mechanism are used by the OS which involves making numerous system calls. Some of them are :...

5. Device Management

The device management system calls are used to interact with various peripherial devices attached to the PC or even the management of the current device....

Conclusion

System calls are a great way to take full advantage of the services provided by the kernel. Every system call is made in background completely hidden from the user. And every action you perform in a computer like creating, deleting, copy and other operations have many number of system calls done in background which are hidden from the user for simplicity....

FAQs on System Calls

Q.1: What is the purpose of System Calls?...