Giter Site home page Giter Site logo

avinash-coder / service-counter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ajinkya-w/service-counter

0.0 0.0 0.0 7 KB

Service counter with two service personnel on a queue of customers for demonstration of concurrency control.

Java 100.00%

service-counter's Introduction

Service-counter

There is a service counter which has a limited waiting queue outside it.
It works as follows:
i)The counter remains open till the waiting queue is not empty
ii)If the queue is already full, the new customer simply leaves
iii)If the queue becomes empty, the outlet doors will be closed (service personel sleep)
iv)Whenever a customer arrives at the closed outlet, he/she needs to wake the person at the counter with a wake-up call

Implemented the above-described problem using semaphores or mutuexes along with threads. Also shown how it works, if there are 2 service personel, and a single queue.
Tried to simulate all possible events that can take place, in the above scenario.

service-counter's People

Contributors

ajinkya-w avatar

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.