a) less efficient
b) more efficient
c) equal
d) none of the mentioned
Answer: a
Explanation: The Banker’s algorithm is less efficient than the resource allocation graph algorithm.
Related Posts
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 2, y = 0;
int z = y && (y |= 10);
printf(“%d\n”, z);
return 0;
}What will be the final values of i and j in the following C code?
#include <stdio.h>
int x = 0;
int main()
{
int i = (f() + g()) | g();
int j = g() | (f() + g());
}
int f()
{
if (x == 0)
return x + 1;
else
return x – 1;
}
int g()
{
return x++;
}What will be the final values of i and j in the following C code?
#include <stdio.h>
int x = 0;
int main()
{
int i = (f() + g()) || g();
int j = g() || (f() + g());
}
int f()
{
if (x == 0)
return x + 1;
else
return x – 1;
}
int g()
{
return x++;
}In expression i = g() + f(), first function called depends on __________
What will be the output of the following C function?
#include <stdio.h>
void reverse(int i);
int main()
{
reverse(1);
}
void reverse(int i)
{
if (i > 5)
return ;
printf(“%d “, i);
return reverse((i++, i));
}What will be the output of the following C function?
#include <stdio.h>
int main()
{
reverse(1);
}
void reverse(int i)
{
if (i > 5)
exit(0);
printf(“%d\n”, i);
return reverse(i++);
}What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 1, y = 0;
x &&= y;
printf(“%d\n”, x);
}
Join The Discussion