Hey everyone. It's my first question here.
I have to simulate deadlock and then solve it. I did the simulating part by calling 3 process to lock text files.
but in order to solve the deadlock, i need to check whether the needed files are available before trying to lock them.
so my question is:
How can I call a process once both it's files are available? cuz it can be done using a while loop, bu then the while loop keeps on running so it can be efficient
I have to simulate deadlock and then solve it. I did the simulating part by calling 3 process to lock text files.
but in order to solve the deadlock, i need to check whether the needed files are available before trying to lock them.
so my question is:
How can I call a process once both it's files are available? cuz it can be done using a while loop, bu then the while loop keeps on running so it can be efficient