Logical address and physical address

Logical address (Logical Address)

Is generated by the program associated with the segment offset address portion.

For example, pointers in C programming you are doing, you can read the value of the pointer variable itself (& operation), in fact, this value is the logical address, it is relative to your current process data segment address, nothing to do with the absolute physical address. Only the Intel real mode, the logical address and physical address was the same (because there is no real mode segmentation or paging mechanism, Cpu does not automatically address translation); logic is the Intel protected mode program execution within the code segment limit long offset (assuming the code segment, data segment if exactly the same). Application programmers only need to deal with the logical address, while the segmentation and paging mechanism is completely transparent to you, only by system programmers involved. Although the application programmer can directly operate its own memory, it can only give you the operating system allocated memory segment operations.

Linear address (Linear Address)

Is a logical address to physical address translation between the middle layer. Code will produce a logical address, or a segment offset, coupled with the corresponding base of the segment to generate a linear address. If the paging mechanism is enabled, then the linear address can then by transformed to produce a physical address. If the paging mechanism is not enabled, then the linear address directly is the physical address. Intel 80386 linear address space capacity of 4G (2 ^ 32 that 32 of the address bus address).

Physical address (Physical Address)

Is that now the CPU external address bus addressing physical memory address signal, the end result is the address change the address. If the paging mechanism is enabled, then the linear address will be used in the page directory and page table entry converted into physical addresses. If the paging mechanism is not enabled, then the linear address directly to a physical address.

Virtual memory (Virtual Memory)

Refers to a computer showing a much larger memory than the actual possession of the amount of memory. Thus it allows programmers to compile and run the memory than the actual system has a much larger program. This has led many large projects with limited memory resources to the system to achieve.

Sometimes we have the logical address as the virtual address. Because the concept of virtual memory space is similar to the logical address and the actual physical memory is irrelevant.

Logical address and physical address of the "gap" is 0xC0000000, is due to the logical address -> linear address -> physical address mapping just bad this value. This value is specified by the operating system.

Logical address to physical address translation

Logical address to physical address conversion method is associated with architecture. In general there is segmentation, paging in two ways.

At the current x86 cpu, for example, sub-pages are supported. Memory Mangement Unit is responsible for the logical address to physical address from the conversion. Section identifies the logical address is the segment + offset form, MMU segment by querying the table, the logical address can be transformed into a linear address. If the cpu is not turned on paging, the linear address is the physical address; if the cpu on the paging feature, MMU page tables also need to check into the linear address to physical address:

----( Logical address linear address segment table )---> - (page table) -> physical address

Different logical addresses can be mapped to the same linear address; different linear addresses can be mapped to the same physical address; it is many to one relationship. In addition, the same linear address in the event after the feed may also be re-loaded to another physical address. So many to one mapping of this will change over time.

Original Address: http://my.oschina.net/alphajay/blog/5025

分类:OS 时间:2011-09-16 人气:281
blog comments powered by Disqus


  • ORA-01552: non-system tablespace 'TEST_DATA' can not use system rollback segment 2011-06-17

    ORA-01552: non-system tablespace 'TEST_DATA' can not use system rollback segment ORA-1552 cannot use system rollback segment for non-system tablespace Solve ========= In the system table space or other dictionary-managed table space to create a rollb

  • [Zz] large data volume, mass data processing Methods 2010-08-27

    Large data problem is that many interview questions that often appear in written examination, such as baidu google Tencent so some of the companies huge amounts of data involved is often asked. The following is my handling of mass data was a general

  • Android (e) of the five data storage network data exchange 2 2010-10-09

    3.ClientService class package com.changcheng.web.client.service; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.net.HttpURLConnection

  • Browser data types Url format, data: image / png, data: image / jpeg! 2011-03-20

    The so-called "data" type Url format in RFC2397 made, the purpose for some "small" data, can be embedded directly in web pages, rather than from an external file to load. For example, the img Tag, even if the picture is very, very smal

  • Large amount of data and massive data processing algorithms Summary 2011-04-28

    Large amount of data is often written a lot of interview problems, such as baidu google Tencent such massive amounts of data related to some of the companies are often asked. The following is my method of handling massive data a general summary of co

  • DML (Data Manipulation Language - data manipulation language) Analysis 2011-04-11

    DML (Data Manipulation Language - Data Manipulation Language) refers to the data in the table can add, delete, change operations against the database language. First, insert the related operations: ①. Basic insert statement: 1.insert into users value

  • Ext JS with Struts2 data form the data transmission between GridPanel 2009-09-01

    With the adoption of the struts 2 describes how to access data, filling the data to the Ext JS components GridPanel data forms, the part of the contents of the reference number of online tutorials. First of all, Struts 2 and EXT JS data transmission

  • Data Binding (JFace data binding framework) 2010-04-29

    18.4 Data Binding (JFace data binding framework) In the SWT programming, the interface components of the data read and write is a very heavy work, such as "Article 16.2 Wizard-style dialog box" is the more typical examples. The SWT component of

  • On the SUN JVM memory management and optimization of the application server SUN JVM memory management 2010-03-22

    Author: Jason SHChen Glossary: JVM (Java Virtual Machine): Java virtual machine, all Java programs run in the Java virtual machine. Metadata: In this article, the middle finger is used to describe classes and interface definitions of data. I do J2EE

  • Flex data formatting and data validation 2010-11-05

    Flex data formatting and data validation Formatter class Formatter class in the Flex framework. This class will format the data into a string. All classes are mx.formatters.Formatter formatting subclass, including: · CurrencyFormatter (formatting cur

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.821 (s). 12 q(s)