Question:

Which is true about the fork ( ) system call ?

Show Hint

Think of fork() like a biological cell division. One process splits into two identical "cells" (processes). Use the return value to tell them apart: 0 for the child, and the Child's PID for the parent.
Updated On: Aug 6, 2026
  • It allocates memory
  • It creates a child process
  • It creates a program
  • It creates machine code
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Concept:
• In UNIX-like operating systems, fork() is the primary system call used for process creation.
• It creates a new process by duplicating the existing process (the parent).
• Both the parent and the child continue execution from the instruction immediately following the fork() call.

Step 1:
Understand the mechanism of fork()
When fork() is called, the kernel creates an exact copy of the parent process's address space.
This includes the code segment, data segment, heap, and stack.
The child gets a unique Process ID (PID).

Step 2:
Identify the primary purpose
The function of fork() is strictly to spawn a new execution context (a child process).
It does not "create a program" (that is what exec() does).
It does not "create machine code" (that is what a compiler/assembler does).
While it involves memory management, "creating a child process" is its fundamental definition.
Was this answer helpful?
0
0

Top CUET PG Data Science A.I Cyber Security and Computer Sci. Questions

View More Questions

Top CUET PG Operating Systems Questions

View More Questions