【发布时间】:2021-09-30 03:28:59
【问题描述】:
我使用这个cgroups 包。
type Cgroup 有两个我感兴趣的接口。一个是Freeze() error,一个是Thaw() error。它们的描述如下:
...
// Freeze freezes or pauses all processes inside the cgroup
Freeze() error
// Thaw thaw or resumes all processes inside the cgroup
Thaw() error
...
还有两个linux命令可以暂停和恢复进程,分别是kill -STOP pid和kill -CONT pid。
我想知道如果一个cgroup中只有一个进程,那么这两种暂停和恢复进程的方式有什么区别吗?谢谢。
【问题讨论】:
标签: linux go operating-system cgroups