1.

What is the fork() system call?

Answer»

This is used to create ANOTHER process that duplicates the entire process structure and address SPACE. The newly created process is CALLED the child process and the one from which it got replicated is called the parent process. This was used to achieve parallelism before threads. The fork() system call takes no arguments and returns an integer. 

  • 0 means that the child process is created successfully, and 0 REFERS to the child process within the parent process. 
  • –1 means that the system was unable to create another process. 
  • default positive integer > 0 is returned to the parent process which represents the process ID of the child process.


Discussion

No Comment Found