ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Memory Management
This section describes memory management techniques, logical v/s actual address space and
various paging techniques.
emorymanagementisthe functionalityof anoperatingsystemwhichhandlesor
managesprimarymemory.Memorymanagementkeepstrackof eachand every
memorylocationeitheritisallocatedtosome processoritis free.Itcheckshow
much memoryisto be allocatedtoprocesses.Itdecideswhichprocesswill getmemoryatwhattime.It
tracks wheneversome memorygetsfreedorunallocatedandcorrespondinglyitupdatesthe status.
Memory Manager
The purpose of the memorymanageris
ï‚· To allocate primarymemoryspace toprocesses
ï‚· To map the processaddressspace intothe allocatedportionof the primarymemory
ï‚· To minimize the accesstime usingacosteffective amountof primarymemory
Memory managementprovidesprotectionby using two registers,a base registerand a limitregister.
The base registerholds the smallestlegal physical memoryaddress and the limit registerspecifiesthe
size of the range.For example,if the base registerholds300000 and the limitregisteris1209000, then
the program can legallyaccessall addressesfrom300000 through411999.
M
How at execution time address binding is done in OS?
up
vote1down
votef avor it e
I am readin Galvin's Operating System book. In memory management's
address binding it said about 3 types of address binding. compile time, load
time, execution time. And about Execution time address binding:" The
physical address are computed at the time of execution." But my question is
that these computations for the physical address is for the memory's base
address to load the process into memory. To execute the process first it has
to be loaded into memory. For that it requires some physical memory address.
Then how at execution time these addresses are computed? I am confused.
Can some provide explanation for this.
Thanks
operating-system
share| improve this question asked Jun 1 '11 at 15:10
poddroid
305619
add a comment |
3 Answers
activeoldest votes
up
vote7down
voteaccept ed
You are correct in your thinking. The difference between load-time and run-
time binding is that in run-time every time there is a memory lookup it goes
through a "relocation register" which is like the base register and then you add
an offset.
In load-time binding it does the same thing but subsequent lookups don't
require evaluation of this register. The addresses are set when it is first pulled
into memory. Hence if the base address changes you need to re-load the
whole process to fix up all the relocatable addresses.
In the case of run-time, you can move the process around in physical memory
and not need to worry about re-loading it to fix the mapping up because every
time there is an access to memory it maps it then.
Load-time binding results in matching logical/physical addresses but run-time
results in differing logical/physical addresses.
I hope this is clearer for you. I've just started learning about Memory
Management too :)
share| improve this answer answered Oct 5 '12 at
11:13
I King
8612
add a comment |
Did you find this question interesting? Try our newsletter
Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).
Subscribe
up
vote0down
vote
When it says that the actual base address is generated at execution time it
means that that the address in RAM (physical address) is determined at
execution time from the virtual address using the MMU. This whole address
conversion is done on the fly. For executing the process the starting virtual
address has to be known. When the process is to be run its virtual page table
is loaded in the MMU and then the MMU quickly calculates the physical
address(in RAM) and the execution goes on with MMU generating physical
addresses from page tables. Consider reading Tanenbaum's Modern
Operating Systems. I find it better.
share| improve this answer answered Jun 2 '11 at
19:29
lovesh
1,7632465
add a comment |
up
vote0down
vote
Execution time address binding usually only applies to variables in programs
and is the most common form of binding for scripts, which do not get
compiled. In this scenario, the program requests memory space for a variable
in a program the first time that variable is encountered during the processing
of instructions in the script. The memory will be allocated to that variable until
the program sequence ends, or unless a specific instruction within the script
releases the memory address bound to a variable.

More Related Content

Compile,loadx time

  • 1. Memory Management This section describes memory management techniques, logical v/s actual address space and various paging techniques. emorymanagementisthe functionalityof anoperatingsystemwhichhandlesor managesprimarymemory.Memorymanagementkeepstrackof eachand every memorylocationeitheritisallocatedtosome processoritis free.Itcheckshow much memoryisto be allocatedtoprocesses.Itdecideswhichprocesswill getmemoryatwhattime.It tracks wheneversome memorygetsfreedorunallocatedandcorrespondinglyitupdatesthe status. Memory Manager The purpose of the memorymanageris ï‚· To allocate primarymemoryspace toprocesses ï‚· To map the processaddressspace intothe allocatedportionof the primarymemory ï‚· To minimize the accesstime usingacosteffective amountof primarymemory Memory managementprovidesprotectionby using two registers,a base registerand a limitregister. The base registerholds the smallestlegal physical memoryaddress and the limit registerspecifiesthe size of the range.For example,if the base registerholds300000 and the limitregisteris1209000, then the program can legallyaccessall addressesfrom300000 through411999. M
  • 2. How at execution time address binding is done in OS? up vote1down votef avor it e I am readin Galvin's Operating System book. In memory management's address binding it said about 3 types of address binding. compile time, load time, execution time. And about Execution time address binding:" The physical address are computed at the time of execution." But my question is that these computations for the physical address is for the memory's base address to load the process into memory. To execute the process first it has to be loaded into memory. For that it requires some physical memory address. Then how at execution time these addresses are computed? I am confused. Can some provide explanation for this. Thanks operating-system share| improve this question asked Jun 1 '11 at 15:10 poddroid 305619 add a comment | 3 Answers activeoldest votes up vote7down voteaccept ed You are correct in your thinking. The difference between load-time and run- time binding is that in run-time every time there is a memory lookup it goes through a "relocation register" which is like the base register and then you add an offset. In load-time binding it does the same thing but subsequent lookups don't require evaluation of this register. The addresses are set when it is first pulled into memory. Hence if the base address changes you need to re-load the whole process to fix up all the relocatable addresses.
  • 3. In the case of run-time, you can move the process around in physical memory and not need to worry about re-loading it to fix the mapping up because every time there is an access to memory it maps it then. Load-time binding results in matching logical/physical addresses but run-time results in differing logical/physical addresses. I hope this is clearer for you. I've just started learning about Memory Management too :) share| improve this answer answered Oct 5 '12 at 11:13 I King 8612 add a comment | Did you find this question interesting? Try our newsletter Sign up for our newsletter and get our top new questions delivered to your inbox (see an example). Subscribe up vote0down vote When it says that the actual base address is generated at execution time it means that that the address in RAM (physical address) is determined at execution time from the virtual address using the MMU. This whole address conversion is done on the fly. For executing the process the starting virtual address has to be known. When the process is to be run its virtual page table is loaded in the MMU and then the MMU quickly calculates the physical address(in RAM) and the execution goes on with MMU generating physical addresses from page tables. Consider reading Tanenbaum's Modern Operating Systems. I find it better. share| improve this answer answered Jun 2 '11 at 19:29
  • 4. lovesh 1,7632465 add a comment | up vote0down vote Execution time address binding usually only applies to variables in programs and is the most common form of binding for scripts, which do not get compiled. In this scenario, the program requests memory space for a variable in a program the first time that variable is encountered during the processing of instructions in the script. The memory will be allocated to that variable until the program sequence ends, or unless a specific instruction within the script releases the memory address bound to a variable.