zoukankan      html  css  js  c++  java
  • logical vs physical address

    Logical vs physical address  

      1) An address generated by the CPU is a logical address. Whereas, an address seen by the memory unit, that is, the one loaded into the memory-address register of the memory, is a physical address.

     

      2) The user program never sees the physical addresses. The program creates a pointer to a logical address, say 346, stores it in memory, manipulate it, compares it to other logical addresses- all as the number 346. 

      Only when a logical address is used as memory address, it is relocated relative to the base/relocation register. The memory-mapping hardware device called the memory- management unit(MMU) converts logical addresses into physical addresses.
      

      3) Logical addresses range from 0 to max. User program that generates logical address thinks that the process runs in locations 0 to max. Logical addresses must be mapped to physical addresses before they are used. Physical addresses range from (R+0) to (R + max) for a base/relocation register value R.
      

      4) Example: 

      Mapping from logical to physical addresses using memory management unit (MMU) and relocation/base register.
      
      The value in relocation/base register is added to every logical address generated by a user process, at the time it is sent to memory, to generate corresponding physical address.
      
      In the above figure, base/ relocation value is 14000, then an attempt by the user to access the location 346 is mapped to 14346. 
     
  • 相关阅读:
    JUnit常用断言及注解
    centos7 yum快速安装LNMP
    ceph问题汇总
    selinux介绍/状态查看/开启/关闭
    linux 修改主机名
    CentOS 7部署 Ceph分布式存储架构
    如何判断当前系统运行在物理机上还是虚拟机上,返回虚拟机的类型
    Golang操作结构体、Map转化为JSON
    PHP强制修改返回的状态码
    composer问题集锦
  • 原文地址:https://www.cnblogs.com/mengdie/p/4582080.html
Copyright © 2011-2022 走看看