Description:

The producer-consumer problem can be stated as follows: A shared data structure can be concurrently read by any number of tasks, but when a task must write to the data structure, it must have exclusive access. Think of a program that has the same nature as the producer-consumer problem, and use the language of your choice to illustrate the producer-consumer problem. Examples: a program to demonstrate the activities of a bank account; a store web site that manages the product information (updating the price of a product should be mutually exclusive); a program with an array that serves as a global variable where different processes will insert elements to it, etc. You can write your own codes to achieve the mutual exclusion or use the functions that come with the language. Your program must illustrate the concurrent access.

Requirements:

  • Your project should be meaningful and has a specific purpose.
  • Your project should run correctly according to the design and has functions to illustrate reading and writing.
  • Mutual exclusion must be achieved.
  • Multiple threading or concurrency must be implemented.
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.