Question: 1) Implement clean, executable and effective C program for the following. Please ensure the code runs properly a)Implement the dining philosopher problem with C program:

1) Implement clean, executable and effective C program for the following. Please ensure the code runs properly

a)Implement the dining philosopher problem with C program: The problem: We have a certain number(n) of philosophers seated around a table, there are 3 states: eating, thinking and be hungry.

Constraints: -There are n forks. But for a philosopher to eat he needs 2 forks(1 left, 1 right) and when u are hungry u can only eat 1 cocoyam at a time.

-You are not supposed to impose to the philosophers how they have to think and the amount of time they have to think

-Don't impose to the philosopher how he is supposed to eat.

-One philosopher should not have for example 0 cocoyam while they others have more cocoyams.

-Each philosopher has two forks, both forks should be available for the philosopher to eat

-When he eats one cocoyam he drops the forks

The program should run and it should be effective.

b) Implement the multi level queue scheduling

c)write a program the split tasks amongst many processes (distributed programming).

I'll appreciate it if you don't use ai.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!