1.
Which of the following system calls does not return control to the calling point, on termination?
Answer: Option 'B'
exec
2.
The following program:
main() { if(fork()>0) sleep(100); }
results in the creation of:
Answer: Option 'B'
a zombie process
3.
Which of the following system calls transforms executable binary file into a process?
Answer: Option 'B'
exec
4.
The following C program :
main() { fork();fork();printf("yes"); } prints yes:
Answer: Option 'C'
four times
5.
A fork system call will fail if :
Answer: Option 'B'
the limit on the maximum number of processes in the system would be executed
6.
Which of the following calls never returns an error?
Answer: Option 'B'
getpid
7.
If a process does not call exec after forking,
Answer: Option 'B'
all the threads should be duplicated
8.
If a thread invokes the exec system call,
Answer: Option 'B'
the program specified in the parameter to exec will replace the entire process
9.
If exec is called immediately after forking,
Answer: Option 'A'
the program specified in the parameter to exec will replace the entire process