I'm working on a C project, and I require troubleshooting assistance. The project is experiencing errors that need to be fixed.
Are you familiar with such a project:
Write two programs that operate in NON-BLOCKING mode and communicate Hello messages
back and forth. The programs must be named Exercise11_4a.c and Exercise11_4b.c. The two
programs use a single shared file for messaging and a semaphore for synchronization.
Program A (Exercise11_2a) will start the exchange by sending Hello B to B (Exercise11_2b) and,
once the message is received, B will print the message and then send Hello A to A. Program A
will then print the message from B and respond with Hello B. This should continue until the
programs are stopped. The output should look something like this:
Hello B
Hello A
Hello B
Hello A
Program A sends messages to B by writing data to the shared file where it is read by B.
Program B sends messages to A by writing data to the same shared file where it is read by A.
The programs are both reading from and writing to the same file, so the operations must be
synchronized. Synchronization is performed using a semaphore. Each process must wait
(sem_wait) for the semaphore before access the file and must post the semaphore (sem_post)
when finished accessing the file.
Use the provided makefile to build, run and kill the programs. To make the programs, just type:
"make".
To run the programs, type: "make run".
To stop the programs type: "make kill".
C Programming C++ Programming C# Programming Software Architecture Linux
20 proposals Remote project Active 3 weeks ago