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-201951:week9 [2019/04/03 13:33]
mlsmith [Channels]
courses:cs377-201951:week9 [2019/04/04 13:33] (current)
mlsmith
Line 23: Line 23:
     * {{onelanebridgemonitor.pdf|PDF}} (with thanks to Charlie Hughes!)     * {{onelanebridgemonitor.pdf|PDF}} (with thanks to Charlie Hughes!)
  
-==== Channels ====+===== Channels =====
  
   * CSP and Go!   * CSP and Go!
Line 29: Line 29:
     * Go implementation of examples from paper: https://godoc.org/github.com/thomas11/csp     * Go implementation of examples from paper: https://godoc.org/github.com/thomas11/csp
   * Rob Pike's Google I/O 2012 - Go Concurrency Patterns: https://youtu.be/f6kdp27TYZs   * Rob Pike's Google I/O 2012 - Go Concurrency Patterns: https://youtu.be/f6kdp27TYZs
-  * Peter Welch's slides introducing CSP and occam (but we will use Go this semester!) +  * Peter Welch's slides introducing CSP and occam-pi (but we will use Go this semester!) 
-    * [[courses:cs377-201951:lang-resources|Language Resources]] +    * [[courses:cs377-201951:welch-lectures:top|Occam-pi Lecture Notes]] 
 +    * Next time: **//Objects Considered Harmful//** (slide 27 of motivation.pdf slides) 
 +  * Demo and codewalk of csp-dining-philosophers.go 
 +    * Go language features highlighted: 
 +      * channels 
 +      * select 
 +    * Design basis for solution in Go: go routines (processes) 
 +      * room (communicates with philosophers over channels) 
 +        * for philosophers to enter/leave -- at most 4 at a time to prevent deadlocking, 5th philosopher blocks  
 +      * forks (communicate with philosophers over channels) 
 +      * philosophers (communicate with forks over channels)