0% found this document useful (0 votes)
13 views2 pages

Process

A parent process creates child processes using system calls like fork(). The parent process has a unique process ID (PID) that differs from its child processes. Each child process also has its own PID that differs from its parent and sibling processes. Child processes inherit attributes like memory and file descriptors from the parent process. The parent process can control and terminate its child processes, while child processes can communicate with each other or their parent using inter-process communication mechanisms.

Uploaded by

goura1699
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Process

A parent process creates child processes using system calls like fork(). The parent process has a unique process ID (PID) that differs from its child processes. Each child process also has its own PID that differs from its parent and sibling processes. Child processes inherit attributes like memory and file descriptors from the parent process. The parent process can control and terminate its child processes, while child processes can communicate with each other or their parent using inter-process communication mechanisms.

Uploaded by

goura1699
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Difference between Process, Parent Process, and Child Process

Characteristic Process Parent Process Child Process

Creation A process can be created by A parent process creates a A child process is created
the operating system or by child process using system by a parent process.
another process. calls such as "fork".

Identification Each process has a unique The parent process has a Each child process has a
process ID (PID). PID that is different from different PID from its
its child processes. parent process and other
child processes.

Memory Each process has its own Each process has its own Each child process has its
address space and memory address space and memory own address space and
allocation. allocation. memory allocation.

Execution A process can execute a The parent process can A child process can execute
program or perform a task. also execute a program or a program or perform a task
perform a task, but it can independently from its
also create child processes. parent process.

Relationship A process can have no The parent process can A child process can have no
parent or child processes. have multiple child or one-parent process.
processes.

Termination A process can be terminated The parent process can A child process can be
by the operating system or terminate its child terminated by its parent
by a user. processes, and a child process.
process can terminate
itself.

Resources Each process has its own The parent process and its Each child process has its
system resources, such as child processes can share own system resources,
file descriptors and system resources. separate from its parent
environment variables. process and other child
processes.

Communication Processes can communicate The parent process and its Child processes can
with each other through child processes can communicate with each
inter-process communicate with each other using IPC
communication (IPC) other using IPC mechanisms.
mechanisms. mechanisms.

Control A process can't control The parent process can A child process can't
other processes. control its child's control other processes,
processes, such as including its parent process.
terminating them or
changing their priorities.
Inheritance A process can't inherit Child processes inherit A child process can't inherit
properties from other some properties from their properties from other child
processes. parent processes, such as processes.
memory and file
descriptors.

Scheduling Processes are scheduled by The parent process and its Child processes are
the operating system. child processes are scheduled by the operating
scheduled by the operating system.
system.

Priorities Processes have their The parent process can set Child processes have their
priorities set by the the priorities of its child's priorities set by the
operating system or a user. processes. operating system or a user.

Parent Process
All the processes in operating system are created when a process executes the fork() system call except the startup
process. The process that used the fork() system call is the parent process. In other words, a parent process is one
that creates a child process. A parent process may have multiple child processes but a child process only one
parent process. On the success of a fork() system call, the PID of the child process is returned to the parent process
and 0 is returned to the child process. On the failure of a fork() system call, -1 is returned to the parent process
and a child process is not created.
Child Process
A child process is a process created by a parent process in operating system using a fork() system call. A child
process may also be called a subprocess or a subtask. A child process is created as its parent process’s copy and
inherits most of its attributes. If a child process has no parent process, it was created directly by the kernel. If a
child process exits or is interrupted, then a SIGCHLD signal is send to the parent process.
A diagram that demonstrates parent and child process is given as follows −

You might also like