Which of the following system calls does not return control to the calling point, on termination?Select one:a. execb. forkc. waitd. ioctl
Question
Which of the following system calls does not return control to the calling point, on termination?
Select one:
- a.
exec
- b.
fork
- c.
wait
- d.
ioctl
Solution
The correct answer is a. exec.
The exec system call replaces the current process image with a new process image. It does not return control to the calling point because the original calling process no longer exists after the exec system call has been made.
On the other hand, fork, wait, and ioctl are all system calls that do return control to the calling point.
-
fork creates a new process by duplicating the existing process. The new process (child) gets a different process ID and has its own copy of the parent's descriptors. Both processes continue to execute from the point right after the fork system call.
-
wait is used to make a parent process wait until one of its child processes exits. After the child process has finished execution, then the control is returned to the parent process from the wait system call.
-
ioctl stands for "input-output control". It provides a generic interface for device-specific operations. After performing the operation, control is returned to the calling point.
Similar Questions
estion: What is the purpose of the "fork" system call in Unix-like operating systems?A) To create a new processB) To terminate a processC) To wait f
Which control statement is used to exit the current method and return a value?Question 2Answera.continueb.returnc.exitd.break
Which control statement is used to prematurely terminate a loop and skip the remaining iterations?Question 1Answera.breakb.continuec.returnd.exit
Which of the following is not a valid flow control statement?Optionsbreakexit()continuereturn
Which system call in Unix is responsible for creating a new process?a.none of the mentionedb.forkc.created.new
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.