Solved

Assume the Shared Buffer Is Implemented as a Circular Array

Question 26

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents