操作系统中的逻辑和物理地址, [英] logical and physical address in operating system,

查看:100
本文介绍了操作系统中的逻辑和物理地址,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么需要逻辑地址?CPU可以直接为不同进程生成物理地址.

Why is the logical address needed?The CPU can directly produce the physical address for the different processes.

我的第二个问题是CPU如何产生此逻辑地址?

My second question is How is this logical address produced by CPU?

推荐答案

Logical address is an address that is from the virtual memory. Its virtual because it actually does not exist.

为什么需要逻辑地址?

Why is the logical address needed?

答案是,通常程序员不知道主内存的实际地址是什么(物理地址),此外,OS设计人员还希望每个程序员都知道什么是物理地址.将这些虚拟地址转换为RAM的实际物理地址的全部负担是 内存管理单元 .

The answer is that normally programmers do not know what is the actual addresses of the main memory(the physical address) and besides the OS designers do expect every programmer to know what are the physical addresses. All the burden of translating these virtual addresses to actual physical addresses of RAM is the job of Memory Management Unit.

CPU如何产生此逻辑地址?

How is this logical address produced by CPU?

CPU只是从分配了特定进程的虚拟内存量中生成这些地址,这通常是一个很好的连续块,但是访问的实际地址不必是连续的,并且地址转换单元 (页表,TLB等)可以在后台获取正确的实际物理地址.

The CPU simply generates these addresses from the amount of virtual memory the particular process is allocated, which is usually a nice contiguous block, but the actual address being accessed need not be contiguous and address translation unit(page table,TLB,...) works under the hood to get the right actual physical addresses.

在这里 是一段很漂亮的视频,肯定会清除您的疑问.

Here is a beautiful video that will definitely clear your doubts.

这篇关于操作系统中的逻辑和物理地址,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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