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

5 Best Amazon Advertising Agencies for Growing Brands

Last updated on: November 6, 2026Posted by: ExamRadar

Best Free AI Humanizers for Academic Writing

Last updated on: October 30, 2026Posted by: ExamRadar

How Image to Text Conversion Make Printed Study Materials Easier to Use?

Last updated on: October 23, 2026Posted by: ExamRadar

7 Best Online Exam Makers for Teachers, Schools, and Businesses

Last updated on: October 21, 2026Posted by: ExamRadar

How to pick a Bintan resort when you’ve only got 48 hours

Last updated on: September 23, 2026Posted by: ExamRadar

Features to Look for While Choosing the Best Automation Tool

Last updated on: July 15, 2026Posted by: ExamRadar

AI vs Machine Learning: Key Differences Every Professional Should Know

Last updated on: February 13, 2026Posted by: ExamRadar