Machine-translated by Google. Questions are authored in English.
Top

Discussion

What is the purpose of the "fork" system call in UNIX-like operating systems ?

  • A.To terminate a process
  • B.To create a new process
  • C.To schedule processes
  • D.To load a program into memory

Answer: B

fork is used to create a new process.

The fork() system call creates a child process that is a copy of the calling process. It returns 0 in the child and the child's process ID in the parent, so the two can take different paths.

A process ends with exit(), scheduling is done by the kernel scheduler, and a new program is loaded into a process with exec(), which is often called right after fork.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.