
- Operating System Tutorial
- OS - Home
- OS - Overview
- OS - Components
- OS - Types
- OS - Services
- OS - Properties
- OS - Processes
- OS - Process Scheduling
- OS - Scheduling algorithms
- OS - Multi-threading
- OS - Memory Management
- OS - Virtual Memory
- OS - I/O Hardware
- OS - I/O Software
- OS - File System
- OS - Security
- OS - Linux
- OS - Exams Questions with Answers
- OS - Exams Questions with Answers
- Operating System Useful Resources
- OS - Quick Guide
- OS - Useful Resources
- OS - Discussion
What are the Process Management System Calls?
System call provides an interface between user program and operating system. The structure of system call is as follows −
When the user wants to give an instruction to the OS then it will do it through system calls. Or a user program can access the kernel which is a part of the OS through system calls.
It is a programmatic way in which a computer program requests a service from the kernel of the operating system.
Types of system calls
The different system calls are as follows −
System calls for Process management
System calls for File management
System calls for Directory management
Now let us discuss process management system calls.
System calls for Process management
A system is used to create a new process or a duplicate process called a fork.
The duplicate process consists of all data in the file description and registers common. The original process is also called the parent process and the duplicate is called the child process.
The fork call returns a value, which is zero in the child and equal to the child’s PID (Process Identifier) in the parent. The system calls like exit would request the services for terminating a process.
Loading of programs or changing of the original image with duplicate needs execution of exec. Pid would help to distinguish between child and parent processes.
Example
Process management system calls in Linux.
fork − For creating a duplicate process from the parent process.
wait − Processes are supposed to wait for other processes to complete their work.
exec − Loads the selected program into the memory.
exit − Terminates the process.
The pictorial representation of process management system calls is as follows −
fork() − A parent process always uses a fork for creating a new child process. The child process is generally called a copy of the parent. After execution of fork, both parent and child execute the same program in separate processes.
exec() − This function is used to replace the program executed by a process. The child sometimes may use exec after a fork for replacing the process memory space with a new program executable making the child execute a different program than the parent.
exit() − This function is used to terminate the process.
wait() − The parent uses a wait function to suspend execution till a child terminates. Using wait the parent can obtain the exit status of a terminated child.
- Related Articles
- What are the types of system calls used in file management?
- What are system calls in Operating System?
- What are the different system calls in the operating system?
- How are system calls connected to the operating system?
- What is the purpose of System Calls?
- What Are the Phases of the Project Management Process?
- Different types of system calls
- What are the calling conventions for UNIX & Linux system calls on i386 and x86-64
- What is Process Management?
- What is the Query management process?
- System Calls in Unix and Windows
- Timer in C++ using system calls
- The most Common POSIX System Calls in Python
- The fcntl and ioctl System Calls in Python
- Major Activities of an Operating System with Regard to Process Management
