| | |
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?
>i am really in trouble with this issue?
Yes you are. Definitely, over your head if you can't read.
Yes you are. Definitely, over your head if you can't read.
"If it moves, tax it. If it keeps moving, regulate it, and if it stops moving, subsidize it" - Ronald Reagan
•
•
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 |
Tag cloud for C
#include * append array arrays asterisks binarysearch calculate changingto char character cm command copyimagefile cprogramme creafecopyofanytypeoffileinc database directory dynamic execv feet fgets file fork forloop framework function functions givemetehcodez grade graphics gtkwinlinux hacking histogram homework include incrementoperators input intmain() iso kernel keyboard km lazy license linked linkedlist linux list lists locate logical_drives looping loopinsideloop. lowest matrix microsoft motherboard mqqueue number oddnumber odf opensource overwrite owf pdf performance pointer posix problem probleminc process program programming radix recursion recv recvblocked research reversing scanf scripting segmentationfault sequential socket socketprograming spoonfeeding standard string student systemcall testing threads turboc unix user variable wab whythiscodecausesegmentationfault windowsapi






