Ad
Sponsored by Sir Tauqeer
CLICK HERE TO JOIN SIR TAUQUEER WHATSAPP GROUP
FOR PREPARATION CLASSES AND JOBS UPDATES
Join Now

In Unix, which system call creates the new process?

A. Exec
B. Fork
C. Wait
D. Kill
Correct Answer: B. Fork

The correct answer is Fork. because the fork() system call is the explicit command utilized in Unix and Unix-like operating systems to create a brand-new child process.

  • Step 1 (Process Duplication): When a running program triggers the fork() system call, the operating system creates an exact duplicate clone of the existing process.
  • Step 2 (Parent and Child): The original process becomes the parent, and the freshly created clone becomes the child process, with both executing concurrently from the exact point of split.
  • Incorrect Options:
    • Exec is incorrect because the exec() system call replaces the current process memory image with an entirely new program binary, rather than creating a new process.
    • Wait is incorrect because wait() instructs a parent process to pause its execution until its child processes have finished running.
    • Kill is incorrect because the kill() command sends a system termination signal to abort or stop an actively running process.

Leave a Comment

Join Our WhatsApp Channel ×
Scroll to Top