$29
Readers and Writers
Using the semaphores you have implemented, implement the Readers and Writers Problem. Design how you want to get the processes to print, such that you can see which process if doing what (reading, writing, waiting, or in the "remainder section" etc).
Run at least 3 reader and 2 writer processes (more readers preferred).
Submission and Grading:
Your project must consist of 5 files
1. TCB.h (uses ucontext.h)
2. q.h (includes TCB.h)
3. threads.h (includes q.h)
4. sem.h (includes threads.h)
5. proj-3.c (includes sem.h) – must contain your name(s) in comments @ beginning (make sure the compile command, “gcc proj-3.c” does the correct compilation).
All 5 files are to be ZIPPED into one zip or gzip file and upload in blackboard.
Note: We will be using gcc on Ubuntu to test. It is in your interest to make sure the program compiles and runs in the target test platform.