Address Binding in Operating Systems | OS Tutorials YASH PAL, June 12, 2026June 12, 2026 In Operating System Address binding is a method to generate compile-time and load-time identical logical and physical addresses for programs. However, the execution time address-binding scheme results in differing logical and physical addresses. In this case, we usually refer to the logical address as a virtual address. We use logical address and virtual address interchangeably in this context. The set of all logical addresses generated by a program is a logical address space; the set of all physical addresses corresponding to these logical addresses is a physical address space. Thus, in the execution-time address-binding scheme, the logical and physical address spaces differ.Table of Contents Address Binding in OSLogical and Physical Address SpaceAddress Binding in OSMemory consists of a large array of words or bytes, each with its own address. Usually a program resides on a disk as a binary executable file. The program must be brought into memory and placed within a process for it to be executed. The collection of processes on the disk that are waiting to be brought into memory for execution forms the input queue.The normal procedure is to select one of the processes in the input queue and to load that process into memory. As the process is executed, it accesses instructions and data from memory.The process términates, and its memory space is declared available. Most systems allow a user process to reside in any part of the physical memory.In most cases, a user program will go through several steps-some of which are optional before being executed, as shown in Figure 1.Figure 1: Multistep Processing of a User ProgramAddresses may be represented in different ways during these steps. Addresses in the source program are generally symbolic.A compiler will typically bind these addresses to relocatable addresses. The linkage editor or loader will bind these addresses to absolute addresses. Each binding is a mapping from one address space to another.The binding of data and program to memory addresses can be done at any of the following steps:Compile Time: Binding at compile time generates absolute addresses, where prior knowledge is required of where a process resides in the memory. After some time, if the starting location of a process in memory is changed, then the entire process must be recompiled to generate the absolute address again.Load Time: If it is not known at compile time where the process will reside in memory, then the compiler must generate relocatable code. In this case, final binding is delayed until load time. If the starting address changes, then we need only to reload the user code to incorporate these changed values.Execution Time: If the process can be moved during its execution from one memory segment to another, then binding must be delayed until run time.Special hardware is available for implementing this scheme to work, as shown in Figure 2. Most of the general-purpose operating systems use this method.Figure 2: Dynamic Reallocation Using Relocation RegisterRelocation: It is a method of shifting a user program from one memory location to another. Two types of relocation exist:Statie RelocationDynamic RelocationStatic Relocation takes place at load time and remains fixed once the program is loaded.Dynamic Relocation occurs at runtime.Logical and Physical Address SpaceLogical and physical addresses are generated by the compile-time and load-time address binding, which are identical, whereas address binding generated at execution time results in differing logical and physical addresses.An address generated by the CPU is commonly referred to as a logical address, whereas an address seen by the memory unit is commonly referred to as a physical address and is loaded into the memory address register.Generally, we refer to a logical address as a virtual address.The set of all logical addresses generated by a program is referred to as a logical address space, and the set of all physical addresses corresponding to these logical addresses is referred to as a physical address space.Physical address space in a computer’s memory is depicted in Figure 2.Figure 3: Computer’s Physical Address SpaceThe runtime mapping from virtual (logical) to physical addresses is done by the Memory Management Unit (MMU), which is basically a hardware device, as shown previously in Figure 2.The relocation register is also called the base register. Relocation is performed by hardware and is invisible to the user.Dynamic relocation makes it possible to move a partially executed process from one area of memory into another without affecting it.Both logical and physical addresses are contiguous in nature, meaning that each consecutive address refers to a cell.Physical addresses are used in system mode, while logical addresses are used in user mode.If the size of physical memory is 4 megabytes (222 bytes), then the physical addresses will run from 0 to 222-1 with the assumption that physical memory is divided into small memory cells of size 1 byte (8 bits).Hence, a computer system has only one physical address space, but can have several logical address spaces.The concept of a logical address space that is bound to a separate physical address space is central to proper memory management. engineering subjects Operating System Operating System