- Pakistan
- India
- Chile
- Canada
1 Answers
Option 4 : Canada
- Canada is the largest producer of lentils in the world with around 51% of the global production.
- Canada produces around 3.2 million tonnes of lentils on an annual basis.
- It is followed by India, Turkey and USA.
4 views
Answered
Related Questions
Consider the following solution to the producer-consumer synchronization problem. The shared buffer size is . Three semaphores empty, full and mutex are defined with respective initial values of 0, and 1. Semaphore empty denotes the number of available slots in the buffer, for the consumer to read from. Semaphore denotes the number of available slots in the buffer, for the producer to write to. The placeholder variables, denoted by P, Q, R, and S, in the code below can be assigned either empty or full. The valid semaphore operations are: wait ( ) and signal ( ). Producer: Consumer: do {
wait (P) ;
wait (mutex) ;
//Add item to buffer
signal (mutex) ;
signal (Q) ;
} while (1) ; do {
wait (R) ;
wait (mutex) ;
//Consume item from buffer
signal (mutex) ;
signal (S) ;
} while (1) ;
Which one of the following assignments to P, Q, R and S will yield the correct solution?
1 Answers
6 Views