为什么 cpu 负责设置脏和访问位,而 OS 负责清除它们?

Why does the cpu responsible for setting the dirty and accessed bits but the OS is responsible for clearing them?

为什么通常CPU负责设置脏和访问位,而OS负责清除它们?

内核无法设置访问位,除非它拦截了所有 内存访问。那会破坏性能。与脏位一样,CPU 设置它更容易、更简单、更便宜,因为它实际上是在写。

清除脏位不能由CPU完成,因为它是分页和交换的一部分,只能由OS处理。