【系统设计】并发相关概念
CheatSheet
 Num Name Summary
 1 Inter-process communication Pipe; Signal; Shared memory; MQ; socket; RPC
 2 Synchronization primitives mutex, semaphore
 3 Atomic operations Test-and-set; GET_ADD; Redis INCR; CPU CAS;
 4 Spinlocks Locks which spin on mutex. Continuously poll until condition gets met
 5 Sleeping locks Put threads to wait queue.
 6 Critical section The code between the lock and unlock calls to the mutex
 7 Mutex MUTual EXclusion
 8 Semaphores It solves the problem of lost wakeup calls. Semaphores: binary and counting
 9 Conditional variables A queue of threads, associated with a monitor
 10 futex A fast userspace mutex
 11 Starvation(Lived Lock) When a thread waits for an indefinite period of time to get the required resource
 12 Recursive Mutexes Re-entrant lock
 13 Reader/Writer Mutexes 
 14 Dead lock 
 15 Memory barrier 
 16 Callbacks 
 17 Per-CPU locking 
 18 Asynchronous I/O 
 19 Thread Design Patterns Thread pool, Peer and Pipeline
 20 Actor model vs CSP model
                    
                
                
            
        
浙公网安备 33010602011771号