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.

时间: 2024-12-22 12:38:01

logical vs physical address的相关文章

Logical Address->Linear Address->Physical Address

3 registers for starting pos: LDTR, GDTR( register for starting addr of DT) ---段描述符每个段由一个8字节(64位)的段描述符来描述,他表示段的各项属性.段描述符放在叫全局描述符表(Global Descriptor Table:GDT )或局部描述符表(Local Descriptor Table:LDT)中.GDT和LDT可以理解为数组.而段选择符里的索引是用于选择在这个数组当中的元素.如:GDT[index],表

Life of an Oracle I/O: tracing logical and physical I/O with systemtap

https://db-blog.web.cern.ch/blog/luca-canali/2014-12-life-oracle-io-tracing-logical-and-physical-io-systemtap Luca Canali on 01 Dec 2014 Topic: This post is about tracing logical and physical reads in Oracle using SystemTap. You find here a few examp

Linear to physical address translation with support for page attributes

Embodiments of the invention are generally directed to systems, methods, and apparatuses for linear to physical address translation with support for?page attributes. In some embodiments, a system receives an instruction to translate a memory pointer

Logical read, Physical read (SET STATISTICS IO)

在查询性能优化时,Logical Read非常重要,它的计数一般与查询出来的结果集数量成正比,与数据读取的速度也成正比. 1,SET STATISTICS IO 显式Disk IO的信息 Syntax SET STATISTICS IO { ON | OFF } Output item                           Meaning             Table Name of the table. Scan count Number of scans performe

[转载]PAE ( Physical Address Extension )

转自:http://blog.chinaunix.net/uid-20384269-id-1954602.html 首先,内存访问和管理是一个跨越应用程序,操作系统,硬件平台的一个复杂过程,不能单纯的讲32bit系统就支持4G内存,从而认为这个过程只是OS和内存两者之间的关系 理论上:32位系统,32bit的地址总线位数,寻址空间2^32B=4GB. 64位系统,寻址空间2^64. 至于在实际应用环境中,对于有4G物理内存而OS最多只能识别3G的情况,主要是主板的问题,丢掉的内存被PCI设备占用

Variability aware wear leveling

Techniques are presented that include determining, for data to be written to a nonvolatile memory, a location in the nonvolatile memory to which the data should be written based at least on one or more wear metrics corresponding to the location. The

Solid-state storage management

Solid-state storage management for a system, the management including establishing, externally to a solid-state storage board, a correspondence between a first logical address and a first physical address on solid-state storage devices located on the

Partitioning

COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION The simplest scheme for partitioning available memory is to use fixed-size partitions, as shown in Figure 8.13. Note that, although the partitions are of fixed size, they

Application binary interface and method of interfacing binary application program to digital computer

An application binary interface includes linkage structures for interfacing a binary application program to a digital computer. A function in a relocatable shared object module obtains the absolute address of a Global Offset Table (GOT) in the module