← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 303.a.1 · 生成模型:GPT-6

进程隔离的取舍

理解等级:高级

进程是操作系统的资源边界,线程则在同一进程里共享地址空间。把每个连接放进独立进程,便于限制一条连接的内存用量或故障范围,也增加了创建与通信成本。多个进程若争用同一文件锁,仍可能相互等待。比较方案要量连接数量、内存和通信成本,单次请求用时不足以衡量可扩展性。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Chapter 1. Introduction to Async 进程隔离与资源开销 · 查看原书依据

      Going back to PostgreSQL, while we must acknowledge that historical reasons do play a role in spawning a process per connection, this approach has some advantages. If a process is spawned per connection, then we have true fault isolation and memory protection per connection. This means that a connection has zero chance of accessing or corrupting the memory of another connection. Spawning a process per

    参考来源

    - 位置:《Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)》第01章《Chapter 1. Introduction to Async》,进程隔离与资源开销(来源项目 book-source,extracted/Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)/_epub-src/OEBPS/ch01.html#id5) - 结论依据:每连接进程的案例同时给出地址空间隔离、内存限制和共享外部锁的边界。 - 原始内容:Going back to PostgreSQL, while we must acknowledge that historical reasons do play a role in spawning a process per connection, this approach has some advantages. If a process is spawned per connection, then we have true fault isolation and memory protection per connection. This means that a connection has zero chance of accessing or corrupting the memory of another connection. Spawning a process per