Process Synchronization using Wait() System Call
Introduction:
In my previous article, I wrote about how CPU schedules multiple processes using Time Slicing. We saw the output of how the print statements were intertwined. Now the question arises, what if we want one process to finish first, only then the second process to execute? In this article, I would like to show how to achieve that, i.e. Process Synchronization using the wait() system call.
Process Synchronization
Ensuring that the OS finishes execution of one process and only then…