【系统设计】并发|并行编程常见问题

CHEATSHEET: CONCURRENCY & PARALLEL PROGRAMMING
在这里插入图片描述
知名的并发问题:
1 ABA problem: loss updates
2 Readers-writers problem Read/write access the same shared resource at one time
3 Producer-consumer problem a.k.a the bounded-buffer problem
4 Dining philosophers problem Leetcode: The Dining Philosophers
5 Cigarette smokers problem Assume a cigarette requires 3 ingredients: tobacco, paper, and matches
6 Sleeping barber problem Keep a barber working when there are customers, resting when none
7 Guarded suspension

十二个常见的并发设计问题:
1 How to implement a spinlock Github: link
2 How to implement a mutex Github: link
3 How to implement a condition variable Github: link
4 How to implement a reader-writer locker Github: link
5 How to implement a bounded blocking queue Github: link
6 Create two threads cooridnated by mutex in C Github: code-example/threads/threadmutex.c
7 IPC: use shared memory without kernel copy Github: code-example/shared-memory
8 Support in-memory kv store transactions Github: link
9 Design a thread-safe Hashmap
10 Delayed task scheduling
11 Implement a lock-free queue with multiple readers/writers Github: link
12 Implement a api rate limiter with token bucket algorithm

七个常见的并发coding问题:
1 Semaphores to maintain the order Leetcode: Building H2O
2 Web Crawler Multithreaded LeetCode: Web Crawler Multithreaded
3 Print Zero Even Odd Leetcode: Print Zero Even Odd
4 Map/Reduce: scheduler + workers Leetcode: Fizz Buzz Multithreaded
5 Design Bounded Blocking Queue Leetcode: Design Bounded Blocking Queue
6 Avoid deadlock and starvation Leetcode: The Dining Philosophers
7 Claim ownerhip of a single resource LeetCode: Traffic Light Controlled Intersection

posted @ 2020-12-15 01:36  EvanMeetTheWorld  阅读(32)  评论(0)    收藏  举报