Using Semaphores Implemented Implement Readers Writers Problem Design Want Get Processes P Q37131528

Using the semaphores you have implemented, implement the Readersand Writers Problem. Design how you want to get the processes toprint, such that you can see which process if doing what (reading,writing, waiting, or in the “remainder section” etc). Run at least3 reader and 2 writer processes (more readers preferred).

I already have the code but I need you to debug it inproj-4.c so I can use gcc in linux to compile and run.

proj-4.c

#include “sem.h”#define READER 3#define WRITER 2TCB_t *runQ = 0;Sem *mx = 0;Sem *readerSemaphore = 0,Sem *writerSemaphore = 0;int x = 0;int readerCount = 0;int y = 0;int writerCount =

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.