Solved

Assume the Shared Buffer Is Implemented as a Circular Array

Question 6

Multiple Choice

Assume the shared buffer is implemented as a circular array with two logical pointers: in and out. The variable in points to the next free position in the buffer; out points to the first full position in the buffer. Which of the following is true?


A) The buffer is empty when in == out; the buffer is full when ((in + 1) % BUFFER SIZE) == out;
B) The buffer is full when in == out; the buffer is empty when ((in + 1) % BUFFER SIZE) == out;
C) All the elements of the buffer can be used;
D) Both A and C

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions