[SOLVED] COMP2560 Assignment3- producer and a C program called consumer.c.

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon assign3-a2dzkl.zip (1.3 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

Write a bash program called producer and a C program called consumer.c. A text-based data file called storage initially contains an integer number between 5 and 90.

The producer checks the number in the storage. If the current number plus 8 will be 100 or larger, it will terminate. Otherwise, it will increase the number in the storage by 8 and then call the consumer to continue.

The consumer decreases the number in the storage by 3, and then calls the producer to continue.

Both the producer and the consumer can be the starter.

Sample runs:

 

 

 

 

 

  • assign3-a2dzkl.zip