USing two seperate programmes on same FIFO

hi this is a problem statement i have tried real hard but could not come up with a satisfactory program can someone help

you are to create a pair of programs that do the following in this order:

1 one of the program creates a FIFO which another program should be able to write into
2 the program which created the FIFO should be able to read msg from it, which have been written by the other program
3 set up an alarm that will terminate both processes after 10 sec
4 get the writing process to repeatedly write 10 byte msg into the FIFO, maintaining as it goes, a count of the number of messages it has written. this process shoould do this continously and without delay
5 get the other process to read these messages as fast as they arrive and maintain a count of the number of messages it has read
6 once this has been happening for 10 sec n alarm is to terminate both processes and print out a score of total no of messages written and read and also an approximate transmission rate in bytes per sec

ensure every system call you make has its return value checked in your program

Is this homework?

Well then post what you have tried so far...