Operating System MCQs

1019 MCQs  (Page 70 of 102)

The following program results in the creation of? main() { if(fork()>0) sleep(100); }
A. An orphan process
B. A zombie process
C. A process that executes forever
D. None of the mentioned
A fork system call will fail if ______________
A. The previously executed statement is also a fork call
B. The limit on the maximum number of processes in the system would be executed
C. The limit on the minimum number of processes that can be under execution by a single user would be executed
D. All of the mentioned
If a thread invokes the exec system call ____________
A. Only the exec executes as a separate process
B. The program specified in the parameter to exec will replace the entire process
C. The exec is ignored as it is invoked by a thread
D. None of the mentioned
If exec is called immediately after forking ____________
A. The program specified in the parameter to exec will replace the entire process
B. All the threads will be duplicated
C. All the threads may be duplicated
D. None of the mentioned
If a process does not call exec after forking ____________
A. The program specified in the parameter to exec will replace the entire process
B. All the threads should be duplicated
C. All the threads should not be duplicated
D. None of the mentioned
What is Thread cancellation?
A. The task of destroying the thread once its work is done
B. The task of removing a thread once its work is done
C. The task of terminating a thread before it has completed
D. None of the mentioned