Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
courses:cs377-202651:week13 [2026/04/30 14:02] – [Parallel Composition in Golang] mlsmithcourses:cs377-202651:week13 [2026/04/30 15:03] (current) – [Simulating Models of Concurrency] mlsmith
Line 30: Line 30:
       * and some lambdas...       * and some lambdas...
   * demo of sort pump with PAR and Replicated PAR   * 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.)
 +      * we've seen implementing semaphores with monitors/condition variables (Java)
 +      * can we model condition variables with semaphores?
 +    * Golang: channels (message passing)
 +      * motto: //Don't communicate by sharing memory, share memory by communicating.//
 +      * simulate memory accesses with a goroutine? 
 +    * Ruby/Rinda: Linda and Tuple Space
 +      * tuples are semaphores! 
 +      * immutable so no race conditions / critical sections
 +      * similar perils to using semaphores, but offer more possibilities
 +    * Simulate Linda/TS with another model?
 +      * with combination of dictionaries, nested dictionaries, hashmaps
 +      * shared memory with semaphores
 +      * goroutines to protect access
 +    * other ideas? 
 +  * We don't always get to choose our language/library/stack
 +