多核 CPU 是否共享 MMU 和页表? [英] Do multi-core CPUs share the MMU and page tables?

查看:30
本文介绍了多核 CPU 是否共享 MMU 和页表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在单核计算机上,一次执行一个线程.在每次上下文切换时,调度程序都会检查要调度的新线程是否与前一个线程在同一进程中.如果是这样,则无需对 MMU(页表)进行任何操作.在另一种情况下,需要使用新的进程页表来更新页表.

On a single core computer, one thread is executing at a time. On each context switch the scheduler checks if the new thread to schedule is in the same process than the previous one. If so, nothing needs to be done regarding the MMU (pages table). In the other case, the pages table needs to be updated with the new process pages table.

我想知道在多核计算机上会发生什么事情.我猜每个核心上都有一个专用的MMU,如果同一进程的两个线程同时在2个核心上运行,那么这个核心的每个MMU都只是引用同一个页表.这是真的 ?你能指出我关于这个主题的好的参考吗?

I am wondering how things happen on a multi-core computer. I guess there is a dedicated MMU on each core, and if two threads of the same process are running simultaneously on 2 cores, each of this core's MMU simply refer to the same page table. Is this true ? Can you point me to good references on the subject ?

推荐答案

看看这个方案.这是 Corei7 cpu 上单个内核中所有内容的高级视图.图片取自 Computer Systems: A Programmer's Perspective, Bryant and Hallaron.您可以在此处,第 9.21 节访问图表.

Take a look at this scheme. This is high level view of all that there is in a single core on a Corei7 cpu. The picture has been taken from Computer Systems: A Programmer's Perspective, Bryant and Hallaron. You can have access to diagrams in here, section 9.21.

这篇关于多核 CPU 是否共享 MMU 和页表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆