1. Threads


Thread = "thread of execution"

1.1 Why threads?

Express Concurrency

  1. IO concurrency
  2. Multicore parallelism
  3. Convenience

1.2 Thread Challenges

  1. Race Conditions
  2. Coordination
  3. Deadlocks

<aside> 💡 Go’s two plans

  1. No sharing memory → Use channels
  2. Shared memory → Use locks + condition variables </aside>

2. Remote Procudure Call, RPC


Goal: $\text{RPC} \approx \text{PC}$

client app        handler fns
 stub fns         dispatcher
 RPC lib           RPC lib
   net  ------------ net

2.1 Semantics Under Failures