This course focuses on lock-based data structures in Go. It covers synchronization mechanisms like mutexes and condition variables to implement thread-safe data structures. Students will learn how to create lock-based concurrent data structures like stacks, queues, and lists, and understand the benefits and challenges of using locks for synchronization.
Overview
Syllabus
- Unit 1: Thread Safe Stack Locks
- Fix Pop Error Handling in Go Threadsafe Stack
- Implement Empty Method in ThreadsafeStack
- Implement Thread-Safe Push for ThreadsafeStack
- Unit 2: Thread Safe Go Queues
- Implement Push in Thread-safe SongQueue using sync.Cond
- Implement TryPop for a Thread-Safe Queue in Go
- Implement WaitAndPop with sync.Cond in ThreadsafeQueue
- Unit 3: Thread Safe Go Lists
- Implement PushFront and Node for StarThreadSafeList in Go
- Thread-Safe List ForEach with Hand-over-Hand Locking in Go
- Implement SearchFirstIf in a Thread-Safe Go List
- Implement RemovePlanetIf for a Thread-Safe List