Giter VIP home page Giter VIP logo

advanced-os-6378-projects's Introduction

Advanced-OS-6378-Projects

Project to implement Lamport Mutual Exclusion algorithm between clients which act like peers. The servers perfrom read and write to files. These files are considered as critical resources

Steps to Build the project:

Inside the src/ folder, there are two folders: server/ and client/, which corresponds to the server and the client respectively. To build the server the following commands are to be given

$cd server/ $make server

Similarly for client: $cd client/ $make client

This will generate the executables in the respective folders. For the sake of convinience, the executables are already built in their respective folders. In order to clean them, go the respective folder and give the following command:

$make clean

Steps to Run the program:

After the exectables are built. The servers and the client exectables are to be copied to a total of 8 different machines (5 clients and 3 servers):

The command to run the client:

$./client <client_num>

client_num is a value that denotes the client number. It must be a number from 1 to 5.

The command to run the server

Before running the server, 3 folders, one corresponding to each server must be created in the file system. For the sake of example, let them be srv1/, srv2/ and srv3/. All these 3 folders must be in the same location as the client. One server executable generated in the previous step must be copied into each folder. For running the server:

$cd srv&lt;1, 2 or 3&gt; $./server

Important points to remember

  1. Each execution of the servers and the clients will generate two txt files in the root folder (the folder where client is present): ipaddrs.txt and serv_ipaddrs.txt. Prior to next execution, these two files must be manually deleted.
  2. Servers must be executed first, i.e, before the execution of clients. And the clients must be executed in order. This means, first ./client 1 must run, then ./client 2 (on a different machine ofcourse), then ./client 3 and so on.

advanced-os-6378-projects's People

Contributors

souravdasgupta avatar

Stargazers

 avatar

Watchers

 avatar  avatar

advanced-os-6378-projects's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.