Q24
Which of the following statements about threads is/are TRUE?
More than one option can be correct.
Show answer without attempting
Answer: D
GATE CS · 10 questions
10 Operating Systems questions from GATE CS papers (2024), each with the official answer key. Answer any question right here and it is marked straight away, or practise them one at a time.
Answer: D
Answer: B, C
Answer: A
fork() and wait() system calls. Assume that the code compiles and runs correctly, and that the system calls run successfully without any errors.int x = 3;
while(x > 0) {
fork();
printf("hello");
wait(NULL);
x--;
}printf statement is executed is _______Answer: 14
Answer: 6596
Answer: B, C, D
Answer: A, B
Answer: B
// code of T1
wait(s1);
x = x+1;
print(x);
wait(s2);
signal(s1);
// code of T2
wait(s1);
x = x+1;
print(x);
signal(s2);
signal(s1);Answer: B, C
Answer: 1028
0/100 correct0 marks