Giter Club home page Giter Club logo

comp2240_a2's Introduction

COMP2240 - Operating Systems

Assignment 2

Task

Assignment was split into three separate problems

  1. Create a starvation free controller for a system of Warehouse Assistance Robots (WAR's) that are concurrently operating on two intersecting tracks to ensure that no WAR will enter the intersection at the same time as another. Using Semaphores, start threads for each WAR read in from a file and output the results in real time as the WARs wait at the intersection, cross, and then either unload at the dock or load at the storage and return to the intersection
  2. Simulate a printer with three concurrent print heads. Use a monitor to ensure mutual exclusion as jobs are run according to data read from a file. The printer can handle both Monochrome jobs and Colour jobs, although when the printer is in Monochrome mode, all print heads can only run Monochrome jobs and Colour jobs must wait, and vice versa. Solution should be starvation free, that is, a long stream of Monochrome jobs should still run any Colour jobs as they arrive in the queue.
  3. Repeat the implementation of Problem 2, but using a Semaphore instead of a Monitor

Compile

  1. javac P1/P1.java
  2. javac P2/P2.java
  3. javac P3/P3.java

Run

  1. java P1/P1 P1/P1-1in.txt
  2. java P2/P2 P2/P2-1in.txt
  3. java P3/P3 P3/P2-1in.txt

comp2240_a2's People

Contributors

lachlancourt 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.