Assignment 1 (Process creation and Interprocess communication)


Hand over the hot cake

A process P forks k times ( 1<k<=4). Now you have k children +1 parent process.
The parent process creates a hot cake for one of its children. It then hands
it over to the eldest child which consumes the cake if it is meant for it,
else the child hands over the cake to its next sibling. This continues till the
cake is consumed. Design and Implement the hot cake system with following
constraints:

1. Accept 'k' and the 'consumer number' as parameters to P.
2. The system must be implemented with a single executable program.
3. Use IPC system calls of your choice
4. Every printed message must also carry the process id.

hand over the hot cake before Friday evening 5:00 pm through submit program on
everest.  Submit as in: ~oslab/submit 1 myfilename.c