EXAMRADAR

Question: In bounded buffer problem Which of the following Assumption Stands TRUE: <ol> <li>I. We assume that the pool consists of n buffers, each capable of holding one item.</li> <li>II. The mutex semaphore provides mutual exclusion for accesses to the buffer pool and is initialized to the value 1.</li> <li>III. The mutex semaphore provides mutual exclusion for accesses to the buffer pool and is initialized to the value 0.</li> <li>IV. The empty and full semaphores count the number of empty and full buffers.The semaphore empty is initialized to the value n; the semaphore full is initialized to the value 0.</li> <li>V. The empty and full semaphores count the number of empty and full buffers.The semaphore empty is initialized to the value 0; the semaphore full is initialized to the value n.</li> </ol>  

Answer:

In problem, the producer and consumer processes share the following data structures:

 

int n;

semaphore mutex = 1;

semaphore empty = n;

semaphore full = 0

 

We assume that the pool consists of n buffers, each capable of holding one item.

The mutex semaphore provides mutual exclusion for accesses to the buffer pool and is initialized to the value 1. The empty and full semaphores count the number of empty and full buffers. The semaphore empty is initialized to the value n; the semaphore full is initialized to the value 0.

MCQ: In bounded buffer problem Which of the following Assumption Stands TRUE: <ol> <li>I. We assume that the pool consists of n buffers, each capable of holding one item.</li> <li>II. The mutex semaphore provides mutual exclusion for accesses to the buffer pool and is initialized to the value 1.</li> <li>III. The mutex semaphore provides mutual exclusion for accesses to the buffer pool and is initialized to the value 0.</li> <li>IV. The empty and full semaphores count the number of empty and full buffers.The semaphore empty is initialized to the value n; the semaphore full is initialized to the value 0.</li> <li>V. The empty and full semaphores count the number of empty and full buffers.The semaphore empty is initialized to the value 0; the semaphore full is initialized to the value n.</li> </ol>  

Correct Answer: A. 1,3,5

Explanation:

In problem, the producer and consumer processes share the following data structures:

 

int n;

semaphore mutex = 1;

semaphore empty = n;

semaphore full = 0

 

We assume that the pool consists of n buffers, each capable of holding one item.

The mutex semaphore provides mutual exclusion for accesses to the buffer pool and is initialized to the value 1. The empty and full semaphores count the number of empty and full buffers. The semaphore empty is initialized to the value n; the semaphore full is initialized to the value 0.

Discuss a Question

Related Questions

You may be interested in:

OS Process Synchronization MCQs

Recently Added Articles

How Can AI Simplify the Academic Life of Students?

How Can AI Simplify the Academic Life of Students?

Last updated on: April 16, 2025Posted by: ExamRadar

Want to Clear IBPS RRB PO? Master These Mock Test Hacks!

Last updated on: March 10, 2025Posted by: ExamRadar

Top AI Tools for Instantly Detecting Plagiarized Writing

Last updated on: December 5, 2024Posted by: ExamRadar

5 Important Tools for System Administrators

Last updated on: December 1, 2024Posted by: ExamRadar

Image to Text Conversion Made Easy: Online Tool Insights

Last updated on: April 12, 2024Posted by: ExamRadar

Tips to Write an Email: Pro Email Writing Tips

Last updated on: March 20, 2024Posted by: ExamRadar

Yellow diamond: the market worth and value

Last updated on: March 9, 2024Posted by: ExamRadar