Giter Site home page Giter Site logo

assignment2's Introduction

Systems Programming - Assignment 2

Third year course at Griffith University - Bachelor of IT

Assignment 2 is split into three Milestones.

Milestone 1:

 The objective is to explore simple thread synchronisation using mutexes 
 by implementing a program that creates a child thread, reads (in the parent thread) 
 a line of input from the user, and sends that line to the child thread for printing (to stdout). 
 The parent thread should then wait for the user to hit return (or enter), 
 then notify the child thread to exit. The parent thread should wait for the child to exit, 
 then print "child thread is gone" and also exit.

Milestone 2:

Improve Milestone 1 to fix race conditions by creating manual Sempahores (not use existing POSIX Semaphore)

Milestone 3:

The goal of this milestone is to solve the Producer/Consumer problem 
for a random number generator by using semaphores from Milestone 2.

One thread acts as a random number generator that reads true random numbers 
from the reliable kernel random number source device /dev/random and puts them into a buffer. 

Another thread consumes these random numbers as they come in and prints them on standard output.

It is important that the buffer does not overflow (i.e., the random number generator 
does not try to put more random numbers into the buffer than the buffer can hold). 
It is also imporant that the buffer does not underflow.

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.