go-questions icon indicating copy to clipboard operation
go-questions copied to clipboard

关于 P 的状态流转

Open questocat opened this issue 1 year ago • 0 comments

问题描述

image

请问这个 P 的状态流转图中:_Prunning -> _Pidle 由 retake 方法触发是否准确呢(图中红色线框)?

我猜测指的是:随着 preempt 发生,G 解绑后,进入新的调度,此时发现该 P 没有可运行的 G 了,然后还是调用的 releasep 方法将 P 的状态由 _Prunning 改为 _Pidle 的?

questocat avatar Nov 27 '22 11:11 questocat