Please Read Instructions Carefully Failure Follow Instructions Make Test Script Fail Subje Q37231993

Please read the instructions carefully. Failure to followinstructions will make the test script fail and will be subject topenalty.

Download the program ‘hw7.c’. It is a multi-threaded programsimulating dining philosophers problem.

The code ‘hw7.c’ creates as many threads as THREAD_NUM and allthe printf messages are already there in function ‘philosopher()’.But you need to add your code to synchronize thephilosophers using semaphores. No two adjacentphilosophers can’t eat at the same time. Don’t remove or change theorder of the printf statements given in the function‘philosopher()’. Make sure to use the constants THREAD_NUM,MAX_ITERATION. Testing script used for grading can change theirvalues. For example, it is

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.