From 57594f3ca0ae0db77bc8b4cad8d7e082fda92189 Mon Sep 17 00:00:00 2001 From: kizzy <36686544+kk456852@users.noreply.github.com> Date: Tue, 17 Oct 2023 15:23:19 +0800 Subject: [PATCH] =?UTF-8?q?Fixed=20=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BD=BF=E9=98=85?= =?UTF-8?q?=E8=AF=BB=E6=9B=B4=E9=A1=BA=E7=95=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- book/zh-cn/part2runtime/ch06sched/mpg.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/zh-cn/part2runtime/ch06sched/mpg.md b/book/zh-cn/part2runtime/ch06sched/mpg.md index 8af7d94..9bd0bae 100644 --- a/book/zh-cn/part2runtime/ch06sched/mpg.md +++ b/book/zh-cn/part2runtime/ch06sched/mpg.md @@ -21,7 +21,7 @@ P 的存在不太好理解,我们暂时先记住这个概念,之后再来回 每个 M 在某个时刻有且只能调度一个 G。根据抽屉原理,可以很容易的证明这两条性质: - 性质 1:当用户态代码创建了 $p (p > n)$ 个 G 时,则必定存在 $p-n$ 个 G 尚未被 M 调度执行; -- 性质 2:当用户态代码创建的 q (q < n) 时,则必定存在 n-q 个 M 不存在正在调度的 G。 +- 性质 2:当用户态代码创建的 $q (q < n)$ 个 G 时,则必定存在 $n-q$ 个 M 不存在正在调度的 G。 这两条性质分别决定了工作线程的 **暂止(park)** 和 **复始(unpark)** 。