a) count the number of empty and full buffers
b) count the number of empty and full memory spaces
c) count the number of empty and full queues
d) none of the mentioned
Answer: a
Explanation: In the bounded buffer problem, there are the empty and full semaphores that count the number of empty and full buffers
Related Posts
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);
}What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 2, y = 2;
x /= x / y;
printf(“%d\n”, x);
return 0;
}What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 2, y = 1;
x *= x + y;
printf(“%d\n”, x);
return 0;
}What will be the output of the following C code snippet?
#include <stdio.h>
void main()
{
unsigned int x = -5;
printf(“%d”, x);
}What will be the output of the following C code snippet?
#include <stdio.h>
void main()
{
1 < 2 ? return 1: return 2;
}What will be the output of the following C code?
#include <stdio.h>
void main()
{
char a = ‘a’;
int x = (a % 10)++;
printf(“%d\n”, x);
}What will be the output of the following C code?
#include <stdio.h>
void main()
{
int k = 8;
int x = 0 == 1 && k++;
printf(“%d%d\n”, x, k);
}
Join The Discussion