2026-04-13 | architecture | #threading #Reactor #Proactor #goroutine #virtual-thread #async #C10K
thread-per-request、Reactor、Proactor、协程——不同线程模型决定了系统的并发上限和架构形态。本文从 C10K 问题出发,逐一拆解 select/poll/epoll 的演进、Reactor 与 Proactor 的设计差异、Go goroutine 的 GMP 调度、Java 21 Virtual Thread 的实现原理、Rust async/await 的零成本抽象,并通过 Nginx、Node.js、Netty 的工程实践说明线程模型如何约束整个系统架构。
2026-04-17 | os | #thread #nptl #futex #green-thread #m-n #goroutine #virtual-thread #async-await
同样一个 'concurrent' 的需求,OS 级 1:1 线程、用户态 N:1 协程、调度器混合 M:N、运行时虚拟线程各给出了不同答案。本文梳理 LinuxThreads → NPTL 的演进、Solaris LWP 的失败、Go GPM / Java Loom / Erlang BEAM / async-await 的选择,以及 M:N 模型的阿克琉斯之踵:阻塞 syscall。