# 2.6.3 组调度

前面讨论CFS时我们忽略了组调度的逻辑，本章我们将详细讨论一下这个话题。

> 实时进程（RT）与CFS都支持组调度，本节只讨论CFS中组调度的实现。编译内核时如果设置了 `CONFIG_FAIR_GROUP_SCHED=y`, 则CFS将使能组调度的功能。

组调度是随着CFS加入到内核中的，在此之前没有任何一个调度器支持该功能。组调度让CFS能够更灵活地给任务分配时间，也是[cgroups](https://en.wikipedia.org/wiki/Cgroups)的基础，而cgroups又是当前大火的容器技术的基础，因此从根本上理解组调度的运行机制是很有必要的。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://s3.shizhz.me/linux-sched/cfs-sched/group.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
