concurrency - How likely are two processes to grab a "free" directory? -


If I have a multilanguage system in which a group of directories need a process, 1 directory per process, how likely it is What are the procedures to capture two same directories?

Say I have dials / 1 99. I think if i touch a. If the claimed file is working on the process, then there will be no conflict. Are there problems with my attitude?


There is a bit more complication as this is not only multi-process, but it has been distributed in many computers.

I remember something about directory creation atom, but the file is not created, so your The claim should be a directory - though I do not remember which OS is applicable.

I have a different perspective: List all the directories on which you want to process, write the output in a pipe , which act as a work queue IIRC system pipe semantics (name or anonymity) that read through pipes is a nuclear operation: Two processes will not be able to read the same data.

A master can write a list in the process pipe and worker processes arise, or the worker process can only block until you manually write the list in the pipe.


Comments