70 likes | 195 Views
Repository. read. read. write. Sally. Ira. Harry. Repository. Repository. A. A. read. read. Harry. Sally. Harry. Sally. A. A. A ’. A ”. Two users read the same file. They both begin to edit their copies. Repository. Repository. A ”. A ’. write. write. Harry. Sally.
E N D
Repository read read write Sally Ira Harry
Repository Repository A A read read Harry Sally Harry Sally A A A’ A” Two users read the same file. They both begin to edit their copies. Repository Repository A” A’ write write Harry Sally Harry Sally A’ A” A’ A” Sally accidentally overwrites Harry’s version! Harry publishes his version first.
Repository Repository A A LOCK LOCK read Harry Sally Harry Sally A A’ Harry “locks” file A, then copies it for editing. While Harry edits, Sally’s lock attempt fails. Repository Repository A’ A’ read write UNLOCK LOCK Harry Sally Harry Sally A’ A’ A’ Harry writes his version, then releases his lock. Now Sally can lock, read, and edit the latest version.
Repository Repository A A read read Harry Sally Harry Sally A A A’ A” Two users copy the same file. They both begin to edit their copies. Repository Repository A” A” write write Harry Sally Harry Sally A’ A” A’ A” Harry gets an “out-of-date” error! Sally publishes her version first.
Repository Repository A” A” read Harry Sally Harry Sally A’ A” A” A* A” Harry compares the latest version to his own. A new merged version is created. Repository Repository A* A* write read Harry Sally Harry Sally A* A* A* A” The merged version is published. Now both users have each others’ changes.
/ calc Makefile integer.c button.c paint Makefile canvas.c brush.c
0 1 2 3