?
Solved

Diff b/w Logical address & Virtual address

Posted on 2005-04-12
11
Medium Priority
?
1,412 Views
Last Modified: 2011-08-18
Hi all,
          In Device driver book of  O'reily i had read about Virtual address and logical address.. but, i could not understand clearly...
i hope
Kernel-Space ----> virtual address
User-Space      ----> Logical address
  is it???
        So what is Kernel logical address and Kernel virtual address ?

When we created a variable in a program(with main())
 whether the variable address is Logical address or Virtual address??

 Can any body plz clear my doubt...

Thanks & Rgds
Madhukar
0
Comment
Question by:Madhukar_Mythri
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 13759869
Hi Madhukar_Mythri,

AFAIK virtual adress and logical address are same thing ... it is a physical address which is different from these

Cheers!
sunnycoder
0
 

Expert Comment

by:shrinand_javadekar
ID: 13788282
Although only a limited amount of memory is allocated to a process, it would be much easier for that process to generate addresses as if all the memory were its own; otherwise everytime a process is loaded address used for all the symbols in the program will have to be changed.

In such a situation, the entire range of adresses is mapped to the allocated memory.
Eg. A process is allocated say 50K memory. Even if this is the case, the entire 4G (for 32 bit processors) of address are mapped to this 50K. Address generated by the program is one of the 4G addresses, but it is mapped to one of the 50K locations of  memory.

So in this situtaion, the 4G is the virtual address space and 50K is the physical address space.

There could be situations where a logical address = physical address. But this may not always be the case.


-Shri
0
 

Expert Comment

by:karana
ID: 13800338
hi,

     Before going to Linux device drivers , go for the book Advanced Microprocessor by AK Ray . Eventhough it is x86 architecture ,it will help u to have a good kowledege .

    When u write a program  and declare a variable ,  it is logical  . it is fed to mmu to generate a virtual address .If paging is supported , virual address -> physical is done bu paging unit .Else by MMU itself .

 


          Logical Address
                   |
                   |
                   V
             
                  MMU
 (generates  virtual address )
                   
                     |
                     |
                     |
                     V
             (Paging Unit )
  generates   physical address)

                      |
                      |
                      |
             Ram access , or page fult

0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 3

Author Comment

by:Madhukar_Mythri
ID: 13803809
Hi all,
         Thanks for all ....
Karana ur answer is very intresting....
               u mean to say that ...
Logical address will convert ----to-----> Virtual address and then it will convert -----to------->Physical address.

So logical will not directly convert to Physical address.... is it???

Whether this logical address and virtual address  conversions will differs from one O.S to another O.S.
                                                    "or"
it differs b/w  Processors???
0
 

Accepted Solution

by:
karana earned 375 total points
ID: 13804346
So logical will not directly convert to Physical address.... is it???


ans : logical will not directly convert to Physical address directly  only if paging mechanism is  supported .


Whether this logical address and virtual address  conversions will differs from one O.S to another O.S ?

 question is not clear for me .  MMU is architecture dependent .There are specific registers that u have to load . When u refer with virual address , address convertion is done by mmu .
Check protected mode tutorials by christopher  . best  tutorials ever available in net .

               
it differs b/w  Processors???

  i have worked only with x86 architecture .If u use a x86 processor  , the format is almost like the way i explained . Check "The intel microprocessors " by brey .

   Amd is somewhat different .(Not having enough knowledge )

         ur name , seems to be an indian .whre u from ?


 



0
 
LVL 3

Author Comment

by:Madhukar_Mythri
ID: 13804931
Hi karana,
  Thanks for quick response...

> question is not clear for me .  MMU is architecture dependent >.There are specific registers that u have to load . When u refer >with virual address , address convertion is done by mmu .
>Check protected mode tutorials by christopher  . best  tutorials >ever available in net .

              yeah MMU is architecture dependent...and the main aim  of MMU is to convert to Physical address.
       In generally CPU generates Logical Address only know...
U said logical will be converted to Virtual and then Physical...

So, this Logical to virtual conversion will differs from O.S to O.S????

ur name looks new.... & nice...
         Yeah, im Indain, from Chennai...
about u???
0
 

Expert Comment

by:shrinand_javadekar
ID: 13805200
As stated earlier, logical to virtual will be converted by the processor. In x86 processors, there is a Page directory and multiple Page tables that are used when converting from virtual to physical.

The O.S by itself does not have to do much. It just has to set the appropriate values at appropritate places. For eg. in x86 the CR3 register has the 'physical address' of the page directory, etc. The actual conversion of addresses is done by the processor.


Thanks
-Shri (me Indian too:) )
0
 

Expert Comment

by:karana
ID: 13806722
hi  ,

i m from kerala . In which firm u r working .
I will introduce u some of my friends , who r  
 in chennai . from whom ,u can get fast and good help .
               mail me if u want address:
  {{email addr deleted by jmcg during cleanup}}
     
     
0
 
LVL 3

Author Comment

by:Madhukar_Mythri
ID: 13813847
Thanks for reply Shri & Karana...

presently im working in Embedded Linux, Linux Device Drivers.
Im some what busy...
i will catch u later....

Shri where r u from???

my mailid: {{email addr deleted by jmcg during cleanup}}
bye
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month14 days, 6 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question