Skip to content

A bunch of monitors I implemented to learn why I don't want to implement monitors :)

Notifications You must be signed in to change notification settings

benSepanski/monitorwarehouse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 

Repository files navigation

Monitor Warehouse

This contains implementations of various monitors at various granularities to impress upon myself the lunacy of writing monitors by hand! Example monitors largely come from the expresso paper.

In the src directory, the following monitors are implemented with a monitor and a driver in the following directories:

  • rwlock/ holds standard read-write monitors which make sure readers don't enter during a write and writers don't enter during a read.
  • boundedbuffer/ holds a monitor which blocks threads wanting to write on a buffer until there is sufficient space and blocks threads trying to read n items from the buffer until there are n items on the buffer
  • sleepingbarber holds a monitor which
    • lets a barber wait until a customer wakes them up or one is in the waiting room, then cuts their hair
    • lets customers come into the shop, wake up the barber if necessary or take a spot in the waiting room if the barber is cutting hair (and there is a spot available, otherwise leave without a haircut)

About

A bunch of monitors I implemented to learn why I don't want to implement monitors :)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published