Due by 11:59 PM on Sunday, Oct 18
Project 2 - Extra Credit: Off to the races
Extra points: 5%
Create a multi-threaded test for the mailbox system. You can use pthreads for this and link against it. When creating the test make sure that it runs for a relatively long time and writes plenty of data. A test that only writes a couple of bytes and exits will probably not do you any good. The test should work as follows:
You should have at least one “writer” thread creating some data (you could generate numbers with rand() for instance) and storing them in the system. You should also have at least one “reader” thread trying to read from the system in order to communicate with the writer thread. Then compare the numbers written to the numbers read. Or you can do something else for the two threads to communicate using the system. Be creative!
In your README file, answer the following: What did you observe? Did it work? If not, why do you suppose it didn’t? If it did, what are some of the dangers that one might run into with this implementation. Also tell us how your test works and what you are trying to showcase with that.
Your answer could be 1-2 paragraphs. You do not need to write a whole book report on this.
What to submit
- All the code files for your multi-threaded test, as well as a Makefile to build it
- Your answer to the question posed above
You could have a separate folder for this submission, (i.e. proj2ec) or you could add it with your other user-space drivers. Similarly you could have e separate readme for this part, or add it to the readme you used for the rest of the project. Just make it clear that you are answering the question.