Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Justin08784/prod-cons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

prod-cons

All tests were run with the following settings:

  • #define PROD_LIMIT 1000 // max # of production cycles
  • #define CONS_TIME 10000 // in microseconds
  • #define PROD_TIME 1000 // in microseconds
  • size_t num_producers = 1;
  • size_t num_consumers = 10;

Approach 1:

  • Dynamically allocated buffer blocks
  • Free space management through queue of free blocks
  • Time: 1.054421866s

Approach 2:

  • Pre-allocated buffer blocks
  • Free space management through array of free blocks
  • Time: 1.064258219s

Approach 3:

  • Pre-allocated buffer blocks
  • Free space management through (pseudo-)bit array of free blocks
  • Time: 1.064304521s

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published