Processes questions

Q25

GATE CS 2024 CS-1Processes and ThreadsMSQ1 mark
Which of the following process state transitions is/are NOT possible?
More than one option can be correct.
Show answer without attempting

Answer: B, C

Q57

GATE CS 2024 CS-1Processes and ThreadsNAT2 marks
Consider the following code snippet using the 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--;
}
The total number of times the printf statement is executed is _______
Show answer without attempting

Answer: 14

Q25

GATE CS 2024 CS-2Processes and ThreadsMSQ1 mark
Consider a process P running on a CPU. Which one or more of the following events will always trigger a context switch by the OS that results in process P moving to a non-running state (e.g., ready, blocked)?
More than one option can be correct.
Show answer without attempting

Answer: A, B

0/30 correct0 marks

Related topics in Processes and Threads