+/EE360P

distributed systems

git clone https://git.julia.blue/+/EE360P

vijaygarg1init5384742

master
1.2 KiB41 linesraw
1This directory contains distributed algorithms.
2name:		NameServer
3dist:		Basic Routines for sending and receiving messages
4clocks:		Clock Algorithms
5mutex:		Mutex Algorithms
6snapshot:	Snapshot Algorithms
7
8
9All algorithms depend upon the NameServer to be running.
10This is the first step in running any algorithm.
11You can run it as 
12  java name/NameServer
13
14
15The address of NameServer should be in name/Symbols.java.
16By default it is assumed to be running on localhost:7033.
17
18
19All algorithms extend the class dist.Process.
20Any such algorithm can then send messages using sendMsg(destId, object..).
21It should also override a mathod called handleMsg which is called whenever a message
22is received.
23
24
25
26Let us say you want to run Lamport's mutex algorithms on 3 processes.
27   
28   Start three processes as follows:
29
30  java mutex/LamportMutex p 0 3  // machine 0
31  java mutex/LamportMutex p 1 3  // machine 1
32  java mutex/LamportMutex p 2 3  // machine 2
33
34  The meaning of the arguments (p 0 3) is as follows:
35  p : the name of the process group. 
36  0 : process id
37  3: total number of processes in the group
38
39  Thus, the above commands starts three processes p0, p1 and p2 on different machines. They find each other
40  using the NameServer.
41