| | |
need some help
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Oct 2008
Posts: 1
Reputation:
Solved Threads: 0
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
algorithm
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?
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
algorithm
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?
•
•
Join Date: Oct 2008
Posts: 15
Reputation:
Solved Threads: 1
Go get some paper or a whiteboard with a few colored markers. Take a few hours / days to illustrate how all of your components should work together. Start with the smallest components and write them until you are done. I'm sure people here would be happy to help with isolated problems you are having.
![]() |
Other Threads in the C Forum
- Previous Thread: Trie's in C
- Next Thread: need help for basic c progamming
| Thread Tools | Search this Thread |
* ansi api array arrays bash binarysearch calculate centimeter changingto char character convert copyanyfile copypdffile createcopyoffile createprocess() csyntax directory dynamic fflush file floatingpointvalidation fork forloop frequency getlasterror getlogicaldrivestrin givemetehcodez graphics gtkgcurlcompiling gtkwinlinux hardware highest homework i/o ide inches initialization intmain() iso km license linked linkedlist linux linuxsegmentationfault list logical_drives loopinsideloop. lowest match matrix microsoft motherboard mqqueue multi mysql oddnumber odf open opendocumentformat openwebfoundation pdf pointer pointers posix power program programming pyramidusingturboccodes read recursion recv recvblocked repetition reversing scanf scheduling segmentationfault send shape single socketprogramming stack standard strchr string strings suggestions test testautomation unix urboc user variable whythiscodecausesegmentationfault win32api windows.h windowsapi






