Zookeeper consistency

How does zookeeper maintains concurrency among these machines in which taks(file) is distributed

Please go through the chapter of Zookeeper, you will get a detailed answer to this.