Giter Club home page Giter Club logo

process-synchronization's Introduction

Process-Synchronization

Operating Systems Homework

Assignment#2 - Covid-19 Test Unit

Goal

In this assignment, you will solve the synchronization problem using semaphores and mutex. You should suffer from deadlock and/or starvation. You are expected to simulate and solve the “COVID-19 Test Unit” synchronization problem, which its details are given.

Implementation Details & Requirements

Today, the units that make Covid-19 tests in medical centers have a very important and critical role. With the increase in cases and patients, this may cause the density in these units after fillation studies. Before the test is applied, people are waiting for a long time at the entrance of the hospitals. Because there is a limited number of test units and healthcare staff. We are launching the “Covid-19 Test Unit” application to facilitate this. This will prevent both people from creating long queues and to lock the waiting rooms before being full. Also it will provide an efficient and fair sharing because units will contain people up to its capacity

With your simulation and solution with mutex and semaphores students hopefully will no longer wait so long for working.
● Each waiting room has 3 people.
● People will come to the unit in continuous and random periods.
● The hospital has 8 units and also 8 healthcare staff. So, each unit contains one staff.
● The states for each unit:
○ Entry free state: Staff will announce to the people his remaining places to get in the waiting room, if it has one or more people in the room. For example, each room has 2 people and waits for one more person and the staff calls “The last people, let's start! Please, pay attention to your social distance and hygiene; use a mask.”
○ Idle (Empty) state: If there are no people in the room, the staff will ventilate the room. Being idle is forbidden for the staff. If any people came, they should open the room. Don't forget that no people are waiting.
○ Full and busy state: If there are 3 people in the room, the room will be in a busy state.
● The states for each people:
○ Waiting in room: When a person comes at room, she/he gets in the nearly full capacity room. If there are no people in the room, the first person alerts the staff if he is ventilating. And the people prepare for the test and fill out the form until the room’s full. After the room is full, the test process will be applied to them and together they empty the room.
○ Waiting at hospital: If there is no empty room, she/he's gonna wait for a room at the outdoor waiting hole of the hospital.

Screen Shot 2021-01-09 at 23 00 04

process-synchronization's People

Contributors

gokselelpeze avatar

Watchers

 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.