CSC112 homework assignment Due Soon Written part (individual assignment) chapter 8 number 8.2, 8.4, 8.8, 8.13 Programming part: To be completed as a group of no more than four. Devize a simulation of the dinning philosophers problem that is deadlock free, prevents starvation, and satisfy the "progress" condition. YOU MUST FIRST DESCRIBE THE SOLUTION IN ENGLISH (imagine you're in the eighteenth century and there are no computers). Explain which of the four necessary conditions for deadlock is prevented by your scheme. You must formulate a solution that is different from the one I did in class. You can consider the following solution: Write a separate "supervisor" thread that checks the philosophers and forces some of them to put down chopsticks. Associate a "hunger level" with each philosopher. Do not allow a philosopher to pick up chopsticks unless neither neighbor is hungrier. Becareful about not introducing a new possibility for deadlock. Note: this solution is harder than it first looks. There's only one mutex for all the philosophers. A thread may wake from pthread_cond_wait and still couldn't get chopsticks, but that doesn't necessarily mean that one of its neighbors got them first (it could be somebody elsewhere on the table). Have philosophers alternately leave the table for a certain duration. Implement the resource allocation graph algorithm (I may give extra credit if this is done well). --- This is a group assignment to be conducted as a miniature software engineering project. You are to form teams of 3-4 members each. Each group will have the following members: Organization Leader Technical Leader Design and Documentation Leader Freelance Consultant (if 4th member present) All members are to cooperate on all aspects of the project, but individual "leaders" represent the entire team in their responsible area. The organizational leader is responsible for getting team members together, making sure that the project is finished before the due date, resolve any conflicts, etc ... This does NOT mean however, that the organization leader doesn't have to do any programming. I stress that ALL teams members should collaborate on the entire project. The organizational member must keep a log of team activities. A one-page report will be expected from this leader at the conclusion of the assignment. The technical leader should be your best programmer. For example, if there's something about the C language that you need, this leader should assume reponsibility of finding the solution. The design and documentation leader should be someone good with English. This leader need to submit before spring break a half-page description of the algorithm the team will attempt to implement. In addition to making sure that sufficient comments exist in the program, this leader must also write a "user's manual" of the program, so one can interpret the results. If there's a freelance consultant in your team, you must be able to specify this person's duties. Write a one-paragraph statement describing the role of the consultant. This must be approved by the Supreme Leader. The freelance consultant must write a one-page summary of his or her activities at the completion of the assignment. In addition to an overall grade for the assignment, individual grades will also be given to each member of the group. I stress AGAIN that these roles are guidelines for areas where individuals should assume responsibility for the whole group. It does not mean that people will *only* be responsible for the area that they're supposed to "lead". Everyone should contribute to all aspects of the assignment.