Operating system mcqs threads fork exec

DOWNLOAD ALL SUBJECTS PDF <<CLICK HERE>>

Operating system mcqs threads fork exec

Question 1 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
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
Question 2 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following calls never returns an error?
A
getpid
B
fork
C
ioctl
D
open
Question 3 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
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
Question 4 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
How many times the following C program prints yes? main() { fork();fork();printf("yes"); }
A
only once
B
twice
C
four times
D
eight times
Question 5 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
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
There are 5 questions to complete.

DOWNLOAD FREE PDF <<CLICK HERE>>