You are to implement a very simple distributed text editor. For this purpose,
each user must be provided with a simple workspace where she can either read
or write plain text. You must implement the system in such a way that, at any
given point of time, only one user in the system holds write permission on the
shared workspace, while all the others simply have read permission on that.
All users start with an empty workspace. A user can request write access at
any point during the execution. If nobody has write permission at the time of
the request, the system must immediately grant write access. Otherwise, the
system caches the request and waits for the first time it can satisfy
it. While holding write access, a user can freely modify the current content
of the workspace. When a user releases write permissions, the workspace in
front of the other users must be updated to reflect the modifications just
introduced, if any.
Clearly, the problem is one of distributed mutual exclusion. You are requested
to implement this functionality using the classical Lamport's mutual exclusion
The set of hosts participating in the system can be given as input to the
program. Consider the network as fixed, i.e. do not consider disconnections or
hosts dynamically joining or leaving. Since not all processes start at the
same time, you must implement a distributed setup phase. Editing must be
disabled until all the processes in the system are ready. Centralized
solutions to handle the initial setup will not be accepted. For every aspect
that may result ambiguous make reasonable assumptions (and provide
justifications for them) or ask the instructor.
could any one can help me on this problem, i am really in trouble with this issue?