Madhukar_Mythri
asked on
Diff b/w Logical address & Virtual address
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
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
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
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
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
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
ASKER
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???
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???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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???
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???
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:) )
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:) )
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}}
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}}
ASKER
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
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
AFAIK virtual adress and logical address are same thing ... it is a physical address which is different from these
Cheers!
sunnycoder