GOMATHY GOWRI NARAYANAN
999-07-6251

FILES INCLUDED:
PROJECT4.c
config.txt
p
Sample log 
(a folder containing 4 log files, OUT1,OUT2,OUT3 and OUT4(When the sites are working fine))
and a OUT5, a log of the crashed site when it recovers back.

* Sending and Recieving of messages are done in the same program. So we have to run 
  the same program on as many sites as needed.

* To run, say 4 sites, there should be 4 consoles open on 4 different machines. 

* The processes will not start execution until all processes are started. So please 
  make sure that all processes are strated correctly.

* p is the executable.

* samplelog has the sample log file that was run on 4 sites with 5 processes each
  sending 2 request messages each.  

* RICART AGRAWALA MUTAUL EXCLUSION - CRASH RECOVERY has the documentation and a brief explanation of the design and 
  implementation of the project. 

* config.txt is the configuration file. Please make sure that the config.txt file 
  is in the same directory as that of PROJECT.c

TO COMPILE:

* To compile the program use

	g++ -lpthread -lsocket -lnsl -lposix4 -o p PROJECT2.c


EXECUTION:

Please make sure that the port number and the machine name given in config.txt matches with
what is given during run time. 

TO RUN:

* To run the program normally at the beginning, type 

	p ID MACHINENAME PORTNUMBER STATE

For eg., p 1 net04 5500 working

* To run the program after crash, type 

	p ID MACHINENAME PORTNUMBER STATE

For eg., p 1 net04 5500 recovers



LOG FILES:

* There are no seperate log files maintained. The output is shown on the console.
  At the runtime, the output is written in a script file or log file,
  one for each process.

For eg., At the console, type 

script out1 

and at the script prompt, type 

p 1 net04 5500 

and type exit after the execution is over to open the files. 

