Giter Site home page Giter Site logo

mood-thieves's Introduction

Mood Thieves

Description

Mood thieves roam the streets. As soon as they spot someone in a good mood, they immediately steal that good mood and disappear to the laboratory, where they transform the stolen mood into illegal chewing gum.

There are K thieves involved in this operation. There are indistinguishable resources S for mood theft equipment available, as well as a Laboratory with N indistinguishable workstations. A thief takes 1 piece of equipment, then randomly travels around the city for a certain amount of time. Randomly, they may encounter someone in a good mood, and in that case, they occupy 1 workstation in the laboratory. The equipment is not immediately released after use - it is set aside and takes some time to regain its power before returning to the pool of available resources.

mood-thieves's People

Contributors

ivysochyn avatar

Watchers

 avatar

mood-thieves's Issues

Enhance the algorithm

In the current version of the algorithm, there's only one critical section without an option to define the number of 'thieves' that could enter it.

The task is to evolve the algorithm to handle multiple users in a critical section and add a 'laboratory' (second) critical area.

Create initial implementation using Lamport's algorithm

The task is to declare and implement all the essential tools needed for performing Lamport's algorithm.

The project should be divided into:

  • Utils header containing useful structs/types/methods
  • Thieves containing the implementation of the thieves
  • Main.cpp file containing a function to start the program

Project should be completely compatible with the CMake build system.

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.