Skip to content

This project uses C++ multithreading (producer-consumer model) in order to draw the well known Barnsley fern.

Notifications You must be signed in to change notification settings

hannesk95/ConsumerProducerModel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Consumer-Producer Model using Mutex in C++


Preface

This project showcases a producer-consumer model using mutual exclusions (Mutex) using C++ in order to draw the well known Barnsley fern (see resulting image below). Therein, the computational workload can distributed among several workers in order to speed up the entire process. The number of workers is selectable and can be adjusted according to the computational hardware at hand.

resulting barnsley fern


Repository Structure

  • assets includes image of the final Barnsely fern
  • src contains source files of the project

Prerequisits for Linux Enviroment (Tested on Ubuntu 20.04)

  • CMake - Platform for build automation, testing and packaging using a compiler-independent method
    sudo apt-get update
    sudo apt-get install cmake gcc clang gdb built-essential

  • imagemagick library and dependencies in order to be able to work with PNG images
    sudo apt-get install imagemagick libpng-dev zlib1g-dev


Execution

In order to make use of the code, please invoke make compile in the root directory of this repository. Subsequently:

  1. cd src/
  2. cd build/
  3. ./BarnselyFern

About

This project uses C++ multithreading (producer-consumer model) in order to draw the well known Barnsley fern.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages