Concurrent programming in Go (Adrian Tung)

Readings

Concurrent computing Wikipedia Page http://en.wikipedia.org/wiki/Concurrent_computing

Go Wikipedia Page http://en.wikipedia.org/wiki/Go_(programming_language)

Introduction to Concurrent Programming by Rob Pike http://herpolhode.com/rob/lec1.pdf

Concurrent Programming in Go http://www.cs.ucla.edu/~rohitkk/go_manual.pdf

How to Write Go Code - http://golang.org/doc/code.html

Reading Questions

1. Name two advantages two challenges of concurrent programming.

2. What are the three main goals of Go?

3. What is a package and what is the syntax to import one?

4. What is the main form of synchronization in Go?

5. How do you send / receive values through a channel?

Lecture notes

Go PowerPoint

Homework

Once you have done the readings, follow these installation instructions: http://golang.org/doc/install

Implement a fibonacci function in Go. Your function should return a function that returns successive fibonacci numbers.

Quiz Questions

1. What is a goroutine and how do you start one?

2. What is a channel and how do you create one?

3. What is the use of the select statement?

Further Reading

The Go Programming Language Blog - http://blog.golang.org/

Writing Web Applications - http://golang.org/doc/articles/wiki/

The Go Programming Language (1 hour tech talk) - http://www.youtube.com/watch?v=rKnDgT73v8s#t=8m53

The Little Book of Semaphores. Downey, Allen B. - http://www.greenteapress.com/semaphores/downey08semaphores.pdf