MSQ1 mark
With respect to deadlocks in an operating system, which of the following statements is/are FALSE?
One or more correct
GATE CSE previous year questions · Operating Systems
One or more correct
Numerical answer
One or more correct
Numerical answer
int main () {
int i;
for (i = 0; i < 3; i++){
if (fork() == 0){
continue;
}
break;
}
printf("Hello!");
return 0;
}
The total number of times that the printf statement gets executed is ________. (*answer in integer*)Numerical answer
Numerical answer
Single correct
Wait(A);
Print(*);
X = X+1;
If (X == 2)
{
Print($);
Signal(B);
}
Signal(A);
Wait(B);
Print(#);
Signal(B);
Assume that any of the three processes can start to execute first and context switching can happen between these processes at any arbitrary time and in any arbitrary order.
Which of the following patterns is/are possible to be generated as an outcome of the execution of these three processes?One or more correct
Numerical answer
Numerical answer
Numerical answer
Single correct
int main()
{
int x=0,i=0;
scanf("%d",&x);
for(i=0; i<20; i++)
{
x = x+20;
printf("%d\n",x);
}
return 0;
}Numerical answer
Single correct
Numerical answer
Numerical answer
Single correct
One or more correct
One or more correct
Numerical answer