Solved

logical address space

Posted on 1998-09-28
9
261 Views
Last Modified: 2010-04-21
null
0
Comment
Question by:ashfawad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
9 Comments
 
LVL 3

Accepted Solution

by:
braveheart earned 30 total points
ID: 2007125
Yes, that's about right. Also, memory is usually divided into pages of the same size which can be swapped in and out of memory so that a program can use far more memory than the machine has available. Imagine that you have just enough memory for 2 pages and that the operating system fits in 1. Then it could load 1 page of your program into the other page, execute it and load the next page into the same slot when it needs to do so. Obviously this is an extreme example but you get the picture. This is virtual memory - a sort of extension of logical memory.
0
 

Author Comment

by:ashfawad
ID: 2007126
I am confused about the way this book is using the terminology,
They say copile time and load time address binding result in logical and physical space being the same  then they turn around and say,
"...if it is anot knwn at compile time where the process will reside in memor, then the compiler must generate relocatable code. In this cae, final binding is delayed until load time..."

Well this implies theat the compile time and load time address binding are differeint. In compile time, the logical and physical sp address space  is the same. Where as at load-time the logical space is relocatable. . Which means at load time the logical addresses are mapped to
0
 

Author Comment

by:ashfawad
ID: 2007127
I am having hard ime adding comment to my questions. In the comment section the background is black. Must be something wrong with my system. I am just typing into this blindly. So excuse me if I make a lot of typos. I am trying not to.

Anyways,  I want to know which of the following statements are correct,


1)compile time and load time address binding result in an environment whre logical address space and physical address space are the same.
2) compile time address binding results in logical and physical address space eing the same.
3) load time address binding is relocatable. Which means The addrdss will be generated of the form (14 bytes from the base address) and whebn the module is actually loaded into into memory, then the logical address is mapped to the physical address. Which in my opinion resutlts in an environment where logical and physical address apaces are different from each other . This is as oppsed to what the book is saying

I ho



S
so please tell me which one of the above statement is correct. I am confused.

tahnks
0
Industry Leaders: 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!

 

Author Comment

by:ashfawad
ID: 2007128
I am confused about the way this book is using the terminology,
They say copile time and load time address binding result in logical and physical space being the same  then they turn around and say,
"...if it is anot knwn at compile time where the process will reside in memor, then the compiler must generate relocatable code. In this cae, final binding is delayed until load time..."

Well this implies theat the compile time and load time address binding are differeint. In compile time, the logical and physical sp address space  is the same. Where as at load-time the logical space is relocatable. . Which means at load time the logical addresses are mapped to
0
 
LVL 3

Expert Comment

by:braveheart
ID: 2007129
Not all compilers, linkers and loaders behave in the same way, or else they have their actions determined by command line options.

In firmware applications it may be important that code is not relocatable and that the physical and logical address space coincide.

For other applications, code should normally be relocatable.

Compilers usually generate relocatable code but don't have to.
Linkers typically combine relocatable code generated by compilers and may either bind the address then and there, but more usually let the code remain relocatable.
Loaders take linked code and bind the address at load time.

So addresses may be bound at compile, link or load time but once the addresses are bound, they can not be unbound (or else it is very difficult to do so).

Relocatable code means that the physical and logical address space are not the same until actually loaded into memory. In a multi-tasking environment, the physical address space may even vary between each timeslice in which it executes, although that is rare. However, there are no hard and fast rules - it is all a question of design.
0
 

Author Comment

by:ashfawad
ID: 2007130
Is there any thing as "run-time binding"? If there is then, is it different from "load-time" binding?

Thanks
0
 
LVL 3

Expert Comment

by:braveheart
ID: 2007131
Yes, run-time binding is used with dynamic linking with shared libraries. For instance, most flavours of UNIX make extensive use of shared libraries (.so's). If you are using X11, say, you link a program with libX11.so which is a shared library. The binding is only made at run time, so that if you were to run the same program on a different machine in the network, you might actually be using different versions of the X11 library.
0
 

Author Comment

by:ashfawad
ID: 2007132

0
 

Author Comment

by:ashfawad
ID: 2007133

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

734 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