-1

I have read that logical addresses are generated by a program.

  1. What is meant by logical address?
  2. What do they look like?
  3. Why do we need logical addresses even though we have physical addresses?
  4. How does the program generate logical addresses?

These are my confusions about addressing. Can some one help me quickly...

Radiodef
  • 37,180
  • 14
  • 90
  • 125

1 Answers1

-1

From Networking perspective A Logical Address is your IP whereas your Physical Address would be your Mac address. Mac address doesn't specify to which application u would like to connect in your system , but your logical address (with port) handles it in Network translation.

You Might need to study http://en.wikipedia.org/wiki/Data_link_layer to understand network translation

If Your Question is with respect to Programming A logical address is just an relative address for your program execution.

sathi006
  • 1
  • 1
  • The original Question asked by user was "What is meant by logical address and what do they look like?" Above Answer still holds true w.r.t the original question. Please validate your response before saying the answer is not useful. – sathi006 Jan 25 '14 at 16:26
  • This is a programming Q&A site, and the question even talked about addresses "generated by a program", so an answer about networking instead of programming is clearly off-point. The actual programming answer is too short and throwaway to be useful, in addition to being incorrect. Logical addresses look continuous to the program, but they are mapped to physical addresses by the system, and are not necessarily (usually are not, in fact) "relative" to anything. – Crowman Jan 25 '14 at 17:04
  • They are not relative to anything? really ? they are relative to each other in the context where they are executed. They are translated into physical address when actual memory/cache registers come into picture at assembly level. Please get the facts right. – sathi006 Jan 25 '14 at 17:15
  • try a simple Google search if you are not aware Paul No offence meant to Gogle – sathi006 Jan 25 '14 at 17:19
  • Physical addresses are "relative to each other", too, so that's not a helpful distinction. They are translated to physical addresses at runtime, a long time after assembly has occurred. – Crowman Jan 25 '14 at 17:20
  • A relative address is an instance of Logical address. A machine may decide to skip few blocks of physical memory while executing as there cannot be be contiguous memory space always. But the logical address defines the relative offset. – sathi006 Jan 25 '14 at 17:23
  • You can follow the link to the question of which this one is a duplicate, if you want to learn how it really works. Logical addresses and relative addresses are not the same thing. Relative addressing still takes place within the context of logical addresses as far as your program is concerned. I'm not going to debate it with you any further. – Crowman Jan 25 '14 at 17:27