All Exams Test series for 1 year @ ₹349 only
Question

Which is true about the fork() system call ?

The correct answer is
It creates a child process

Understanding the fork() System Call

The $fork()$ system call is a fundamental operation in Unix-like operating systems.

  • Core Function: The primary purpose of $fork()$ is to create a new process. This new process is called the child process, and it is an almost exact duplicate of the process that called $fork()$, known as the parent process.
  • Process Duplication: After a successful $fork()$ call, both the parent and child processes continue execution from the point immediately after the $fork()$ call. They share the same code but have separate memory spaces (though initially copy-on-write).

Analysis of Options

  • Option 1 (It allocates memory): While the child process gets its own memory space (initially shared via copy-on-write), memory allocation is not the primary or defining function of $fork()$. Functions like $malloc()$ handle dynamic memory allocation.
  • Option 2 (It creates a child process): This accurately describes the main behavior of the $fork()$ system call.
  • Option 3 (It creates a program): $fork()$ executes an existing program; it does not create a new program file or source code.
  • Option 4 (It creates machine code): Machine code generation is the job of a compiler, not the $fork()$ system call.

Based on its functionality, the most accurate statement about the $fork()$ system call is that it creates a child process.

Was this answer helpful?

Important Questions from Miscellaneous

  1. Which of the following relationships is/are not true?
    (A). Most probable velocity = $\sqrt{\frac{2RT}{M}}$
    (B). PV = $\frac{3}{2}kT$
    (C). Compressibility factor Z = $\frac{pV}{nRT}$
    (D). Average kinetic energy of gas = $\frac{1}{2}kT$
    Choose the correct answer from the options given below
  2. Match List-I with List-II
    List-IList-II
    Electronic ConfigurationFirst Ionisation energy (kJ mol$^{-1}$)
    (A). ns$^2$(I). 2100
    (B). ns$^2$np$^1$(II). 1400
    (C). ns$^2$np$^3$(III). 800
    (D). ns$^2$np$^6$(IV). 900

    Choose the correct answer from the options given below:
  3. The shielding constant of a 2p electron (calculated using Slater's rules) is
  4. Match List-I with List-II
    List-IList-II
    SpectroscopyProperty
    (A). Raman(I). Polarizability
    (B). FTIR(II). Dipole Moment
    (C). UV-Visible(III). Absorbance
    (D). NMR(IV). Spin

    Choose the correct answer from the options given below:
  5. The structure of protein comprises of:
    (A). Primary structure of protein is associated with amino acids
    (B). Secondary structure of protein is associated to peptides
    (C). Tertiary structure of protein is associated with polypeptide chains
    (D). Quaternary structure of protein is associated with polypeptide chains
    Choose the correct answer from the options given below:
Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App