Question: Create two processes that write to the same shared memory area (you can use SysV shared memory or mmap() ). Make sure that you can
Create two processes that write to the same shared memory area (you can use SysV shared memory or mmap() ). Make sure that you can demonstrate repeatable race conditions. I will suggest that in each process, you write one byte, pause 1 second (by using a loop or sleep()), then that the next byte.
Then use SysV semaphore to avoid the race conditions.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
