This is an old revision of the document!
PHP's gd library is missing or unable to create PNG images
Week 13
Final Assignment / Parallel Composition in Golang
Final Assignment
- Due: end of classes
- Tue, May 5, 11:59pm
- Marc's office
- Logistics
- handout: paper copy of full assignment and problem descriptions
- submit electronically via submit377 script:
$ submit377 final my-final
- The S'mores Problem
- background clip from The Sandlot (S'mores scene): https://youtu.be/XlddDZkkxCc
- implement using Ruby/Rinda where processes coordinate using tuples as semaphores to make S'mores
- The Water Molecule Problem
- chem background: Water molecule made up of two hydrogen atoms and one oxygen atom
- implement using Golang, represent atoms as goroutines that must coordinate to form a water molecule (also a goroutine)
Parallel Composition in Golang
- this is ongoing research I've been doing with my RAs going back to before the pandemic
- recall Legoland as implemented in Peter Welch's occam slides: PDF
- implementing Legoland in golang presents a challenge: no PAR!
- demo without PAR
- demo with a PAR
- and some lambdas…
- demo of sort pump with PAR and Replicated PAR
Simulating Models of Concurrency
- Discussion: modeling one model of concurrency with another
- shared memory (critical sections, etc.)
- Golang: channels (message passing)
- Ruby/Rinda: Linda and Tuple Space
- We don't always get to choose our language/library/stack