Fact-checked by Grok 2 weeks ago

Virtual memory

Virtual memory is a memory management technique in operating systems that provides processes with the illusion of having a large, contiguous, and private that exceeds the available physical main , achieved by mapping virtual addresses to physical addresses through and software mechanisms such as the (MMU). This abstraction allows programs to operate as if they have access to a vast, uniform store, while the system automatically transfers between physical and secondary like disk drives to manage limited resources. The concept of virtual memory originated in the late 1950s with the development of the Atlas computer at the , where it was implemented as a "one-level store" system to unify main memory and drum storage, providing users with the appearance of a single large memory space of up to 1 million words. This innovation was further advanced in the 1960s through projects like , a collaborative effort by , , and , which introduced segmented virtual memory to support hierarchical file systems and inter-process sharing with protection mechanisms. Virtual memory gained widespread adoption in commercial systems during this era, including the Model 67 and others, and was later incorporated into Unix in the 1970s, with demand paging added in Version 7 (1979) on PDP-11 models supporting units, enabling efficient multiprogramming. At its core, virtual memory relies on address translation, where virtual addresses generated by a are converted to physical addresses via page tables or tables, often implemented in two primary forms: , which divides memory into fixed-size (typically 4 KB), and , which uses variable-sized for logical divisions like code and data. Demand paging defers loading into physical memory until accessed, triggering a that invokes the operating system to fetch the required from disk, while algorithms like least recently used (LRU) manage page replacement to minimize thrashing—excessive swapping that degrades performance. Hardware support, including translation lookaside buffers (TLBs) for caching address mappings, accelerates this process and is standard in modern processors. Virtual memory enables key operating system capabilities, such as running multiple processes concurrently by isolating their spaces for and allowing efficient memory sharing for common libraries, while supporting larger applications than physical would permit through to disk. Despite overhead from translation and potential I/O , it remains a foundational in virtually all contemporary systems, from desktops to supercomputers, evolving with advancements like huge pages and NUMA-aware allocation to address modern workloads.

Overview

Definition and Basic Concept

Virtual memory is a memory management technique that abstracts the underlying physical memory, providing each process with the illusion of a large, contiguous, and private address space that can exceed the size of available RAM. This abstraction enables programs to execute without direct awareness of the physical constraints of the system's main memory. It relies on a combination of hardware mechanisms and operating system software to manage memory allocation and access. At its core, virtual memory assigns a unique virtual address space to each running process, consisting of logical addresses that the process uses to reference memory locations. These virtual addresses differ from physical addresses, which correspond to actual locations in the system's . The (MMU), a dedicated hardware component typically integrated into the CPU, handles the translation from virtual to physical addresses, ensuring that each operates within its isolated space while sharing the physical memory efficiently. When physical memory becomes insufficient, virtual uses secondary storage—such as a disk—as a backing store to hold portions of a process's that are not currently active. This backing store allows the total virtual memory to be much larger than physical , with the operating system transparently moving data between disk and as needed to maintain . The virtual-to-physical can be illustrated simply: a generates a virtual , which the MMU maps to a physical in if available, or signals the need to retrieve it from disk storage, all without altering the process's view of its .

Purpose and Benefits

Virtual memory addresses key limitations of physical memory in computing systems by allowing programs to operate within a that exceeds the size of available . One primary purpose is to enable the execution of larger programs than could fit entirely in physical memory, achieving this by treating secondary storage, such as disk, as an extension of through techniques like demand paging. This extension effectively enlarges the usable memory, permitting complex applications to run without requiring equivalent physical resources. Another core purpose is to facilitate multiprogramming, where multiple processes can execute concurrently; this is accomplished by assigning each process its own isolated , which prevents one process from accessing or corrupting the memory of another. Additionally, virtual memory simplifies program relocation, as software can be written and compiled using virtual addresses without concern for the specific physical memory locations, easing development and deployment across diverse hardware configurations. The benefits of virtual memory extend to enhanced system security and efficiency. Memory protection is a fundamental advantage, enforced through mechanisms like page tables that restrict processes to their designated address spaces, thereby safeguarding against unauthorized access and improving overall system stability in multi-user environments. It promotes efficient utilization by enabling memory sharing among processes (such as for common libraries) and inactive pages to disk, which maximizes the residency of actively used data in physical . Programming is simplified since developers need not manage physical addresses or worry about memory layout, allowing focus on logical structures; this abstraction also provides , as the system can recover from memory shortages by paging data to disk without halting execution. In practice, virtual memory allows multiple applications to run simultaneously without interference, as each operates in its private —for instance, a and a can coexist securely , with the operating handling transparently. Compared to earlier fixed partitioning schemes, which suffered from internal fragmentation due to unused within partitions, virtual memory significantly improves in multiprogrammed setups through dynamic allocation and loading. While these gains higher degrees of multiprogramming and better CPU throughput, virtual memory incurs some overhead, such as the time required for address translation during memory access.

Properties

Core Characteristics

Virtual memory fundamentally decouples logical addressing from physical addressing, enabling programs to use a contiguous without regard to the actual location or availability of physical memory or secondary storage. This separation allows for dynamic allocation of memory resources, where the operating system maps virtual addresses to physical ones on demand, providing flexibility in resource management. A core property of virtual memory is its transparency to application programs, which operate exclusively on virtual addresses and remain unaware of the underlying physical mappings or the use of backing store such as disk. Programs are insulated from hardware constraints, treating memory as a uniform, large resource regardless of actual physical limitations. This abstraction simplifies by eliminating the need for explicit memory management in user code. Virtual memory creates the illusion of a flat, linear for each , masking physical memory fragmentation and providing uniform access to memory locations. Applications perceive a continuous range of addresses, even if physical memory is non-contiguous or partially backed by slower , ensuring consistent access semantics. Isolation and form another intrinsic characteristic, where each receives its own private , preventing unauthorized access to other processes' . mechanisms, such as the (MMU), enforce these boundaries at the architectural level by translating virtual addresses and checking access permissions. This separation safeguards system integrity and data confidentiality across concurrent processes. The effectiveness of virtual memory relies on the principle of , encompassing both temporal and spatial aspects, which posits that programs tend to reuse recently accessed memory locations (temporal locality) and reference nearby addresses in close succession (spatial locality). These patterns justify the paging approach, as only a subset of the —the —is actively used at any time, allowing the system to prioritize keeping these pages in physical memory while evicting others to disk. By exploiting locality, virtual memory minimizes costly disk I/O operations, as faults occur infrequently for the localized active regions, thereby maintaining efficient overall performance.

Advantages Over Physical Memory

Physical memory management, often employing fixed partitioning, suffers from internal fragmentation where allocated partitions remain partially unused, leading to inefficient utilization of available RAM. Additionally, variable partitioning in physical systems introduces external fragmentation, as free memory becomes scattered into small, unusable holes over time. Programs in such systems typically use absolute addressing, requiring manual adjustments to code addresses whenever relocation to a different memory location is needed, which complicates loading and increases error risk. Virtual memory addresses these issues through automatic relocation, where the operating system maps virtual addresses to physical ones dynamically without altering program code. This eliminates external fragmentation by allowing non-contiguous allocation of physical pages to virtual address spaces. It also supports processes of variable sizes by providing a uniform, large virtual address space regardless of physical constraints, enabling flexible memory assignment. Furthermore, virtual memory facilitates overcommitment, permitting the allocation of more virtual memory than physically available RAM, as only actively used portions are backed by physical or secondary storage. In physical memory systems, the degree of multiprogramming—the number of concurrent processes—is strictly limited by the size of , often restricting systems to just a few programs. Virtual memory extends this limit to the total capacity of secondary , dramatically increasing concurrency; for instance, 1960s mainframes with kilobytes of could support only minimal multitasking, whereas modern systems routinely handle dozens of processes using gigabytes of virtual space backed by terabytes of disk. This enhances overall system throughput by better utilizing idle memory across processes. Demand paging in virtual memory further improves efficiency by loading only referenced pages into physical memory on access, reducing initial I/O overhead compared to loading entire programs as in physical systems. This approach minimizes unnecessary disk transfers, allowing faster program startup and higher multiprogramming levels without proportional increases in I/O. Additionally, virtual memory's address isolation, a core property, prevents processes from interfering with each other's memory spaces, enhancing and beyond physical management's shared addressing risks.

Usage in Operating Systems

Integration with Processes

In operating systems, virtual memory provides each with a private virtual upon creation, ensuring isolation from other processes and the . This is typically divided into distinct segments: the text segment for executable code, the for initialized and uninitialized global variables, and the stack segment for local variables, function parameters, and return addresses. The operating system kernel plays a central role in managing these mappings during process creation and execution. When a process is created via the fork() system call in Unix-like systems, the kernel duplicates the parent's address space, often using copy-on-write to initially share pages read-only, allowing the child process to start quickly without immediate full copying. During an exec() call, the kernel loads the new program's binary into the address space, allocating virtual memory for the text, data, and stack segments while mapping them to physical frames as needed. For context switches, the kernel updates the memory management unit (MMU) by loading the new process's page table base register, switching the hardware translation context to enforce the private address space without altering physical memory contents. Throughout a process's lifecycle, virtual memory is allocated on demand as the process accesses new regions, such as expanding the or , while the tracks and maps these virtually without requiring immediate physical commitment. Code libraries are shared across processes by mapping the same read-only physical pages into multiple virtual address spaces, promoting efficient memory usage without duplication. Upon process termination, the deallocates the entire virtual address space, reclaiming associated physical pages and updating shared mappings as necessary. This integration enables effective support for in process scheduling, as virtual memory allows multiple processes to execute concurrently by pages in and out of physical memory, preventing suspensions due to insufficient resident memory and maintaining responsive multitasking. In systems, the mechanism during () exemplifies this efficiency, creating lightweight child processes that share the parent's memory until modifications occur, thus minimizing overhead in process creation for applications like shells and servers.

Demand Paging Mechanism

Demand paging is a core mechanism in virtual memory systems that loads pages from secondary storage into physical memory only upon their first access by a process, rather than loading the entire address space at startup. This technique relies on the principle of locality, where programs tend to reference a small subset of their address space repeatedly, allowing efficient use of limited physical memory. By starting with a minimal resident set—typically just the initial executable code or zero-filled pages—demand paging enables processes to begin execution quickly while dynamically incorporating additional pages as needed. The technique was first implemented in the Atlas computer in the early 1960s. It was later advanced in the operating system during the late 1960s, where it was implemented using the Honeywell 645 processor to support demand loading of paged segments, thereby reducing initial program load times by avoiding unnecessary transfers of unused data from drum storage. In modern operating systems, this integrates seamlessly with process creation, as a new process's is initialized with all pages marked as non-resident, permitting the —the actively used pages—to grow organically based on runtime access patterns without preallocating physical frames. A page fault triggers the demand paging process when a program references a mapped to a non-resident , generating a hardware trap from the due to an invalid entry. The operating system's handler then intervenes: it validates the to ensure it belongs to the 's legal , selects and allocates a free physical frame if available, schedules disk I/O to transfer the from backing storage into the frame, updates the to reflect the new mapping, sets the page's valid bit, and restarts the faulting instruction to resume execution transparently. This sequence ensures the remains unaware of the underlying , treating the fault as a brief interruption. The number of page faults in a demand paging system equals the number of memory accesses directed to non-resident pages, a direct consequence of the on-demand loading policy: \text{Page faults} = \sum \text{accesses to non-resident pages} This metric highlights the dependency on access patterns, where sequential or localized references minimize faults after initial loading. Although effective, demand paging incurs overhead from page fault handling, including the costs of context switching to the kernel and performing disk I/O, which can take thousands of CPU cycles per fault. However, these expenses are amortized across subsequent accesses to the loaded page, leveraging spatial and temporal locality to achieve overall performance gains in multiprogrammed environments.

History

Early Concepts and Developments

The concept of virtual memory originated in the amid the constraints of early computer systems, where main memory—often magnetic drum storage—was severely limited in capacity, typically ranging from a few kilobytes to tens of kilobytes. Programmers manually managed overlays, dividing code into segments that could fit into this scarce resource and swapping them as needed, a process that became increasingly burdensome as program sizes grew due to more complex applications in scientific and environments. This manual approach stemmed from batch systems, where incompatible program sizes and formats made it impractical to load entire jobs into memory simultaneously, prompting the need for automated storage management to treat secondary storage like drums or tapes as an extension of main memory. A key theoretical foundation was the emerging understanding of program behavior, particularly the , which observed that programs tend to access a small of their repeatedly over time. Although formalized later by Peter Denning in 1968 through the working-set model, roots of this hypothesis trace to mid-1950s empirical studies on drum-based systems, where access patterns revealed clustering in memory references, enabling efficient paging without excessive overhead. These insights were driven by the limitations of early transistorized memory, which offered higher speeds but still insufficient capacity for growing software demands in research and commercial computing. Early implementations began with proposals and prototypes in the late 1950s. In 1959, IBM's Project Stretch included a design for demand paging in its virtual memory system, envisioning a unified where pages would be loaded from secondary storage to overcome core shortages. Although not fully realized in the delivered 1961 Stretch machine due to performance concerns, this proposal highlighted the feasibility of hardware-supported address translation. Similarly, the Burroughs B5000, introduced in 1961, provided the first commercial virtual addressing through segmentation, allowing programs to reference a larger mapped to physical dynamically. Hardware support materialized in 1961 with the Ferranti Atlas computer at the , which implemented paging as part of its "one-level store" architecture, treating core and as a single continuum accessible via page tables. The Atlas, operational by 1962, automated overlay management for multiprogramming, significantly reducing programmer effort and enabling larger effective memory sizes. Building on these advances, the Multics project—initiated in 1965 by , Bell Laboratories, and —delivered the first full-scale implementation combining segmentation and paging in the late 1960s, providing hierarchical address spaces for users on the GE-645 system.

Key Milestones and Evolution

In the , virtual memory saw significant commercial adoption through major systems that integrated it into mainstream computing. introduced virtual storage with the System/370 architecture in 1972, enabling dynamic address translation and supporting multiprogramming on mainframes, which marked a key step in making virtual memory practical for enterprise environments. This was followed by Digital Equipment Corporation's VAX-11/780 minicomputer in 1977, paired with the operating system, which popularized paged virtual memory in minicomputers by providing 32-bit addressing and paging, allowing efficient use of limited physical in scientific and engineering applications. Concurrently, Unix variants in the began incorporating virtual memory concepts, with early implementations focusing on before full paging adoption, enhancing portability across hardware. The 1980s brought virtual memory to personal computing via hardware advancements. Intel's 80386 microprocessor, released in 1985, introduced with built-in paging support, enabling segmented and paged address translation up to 4 GB, which facilitated the widespread integration of virtual memory in PC operating systems like extensions and early Windows versions. This hardware capability spurred broader adoption, as it allowed consumer systems to handle multitasking without constant physical memory constraints. By the late , Unix systems, particularly (BSD) releases, refined demand paging, with 3BSD in 1979 providing the first robust virtual memory subsystem for Unix, improving performance through page faults and replacement algorithms. Entering the 1990s and 2000s, architectural expansions dramatically increased virtual address spaces. achieved full virtual memory support with version 1.0 in 1994 (building on 1991 prototypes), incorporating demand paging and tailored for x86, which enabled its rapid growth in servers and desktops. , released in 1993, also fully embraced paged virtual memory, supporting protected processes and large address spaces. The shift to 64-bit architectures, exemplified by AMD's AMD64 extension in 2003, expanded virtual memory to 2^64 bytes, alleviating 32-bit limitations and boosting adoption in . In the 2010s, virtual memory evolved with mobile and security-focused enhancements. ARM architectures added virtualization extensions starting with ARMv7 in 2011, enabling efficient virtual memory isolation for hypervisors on embedded devices like smartphones. Integration with solid-state drives (SSDs) accelerated swapping speeds compared to traditional HDDs, reducing latency in demand paging for consumer OSes. The 2018 Meltdown vulnerability disclosure prompted security enhancements, such as Kernel Page-Table Isolation (KPTI) in and Windows, which separated kernel and user address spaces to mitigate attacks while preserving virtual memory performance. Recent trends in the emphasize optimization for diverse hardware. The shift from disk to flash-based backing stores, including for compressed , has become standard in low-RAM environments like , where optimizations such as low-memory killer and huge pages (e.g., 1 GB transparent huge pages in kernels) address performance bottlenecks in and settings. Focus on huge pages reduces (TLB) misses, improving throughput in data centers by up to 20-30% in memory-intensive workloads. These adaptations highlight virtual memory's ongoing role in balancing efficiency and scalability across embedded to enterprise systems.

Paged Virtual Memory

Page Tables and Address Translation

In paged virtual memory systems, page tables serve as the primary for mapping virtual addresses to es, enabling the operating to manage memory isolation and allocation efficiently. A is typically implemented as an or hierarchical where each entry corresponds to a virtual and stores the physical frame number (PFN) to which it is mapped. This mapping allows processes to operate within a contiguous while physical memory may be fragmented or oversubscribed. For instance, in a with 4 KB s, the virtual page number (VPN) indexes into the to retrieve the PFN, which is then combined with the page offset to form the physical . The address translation process begins when the CPU generates a virtual address during memory access, which is divided into two components: the VPN, representing the page index, and the , indicating the byte position within the . The (MMU) uses the VPN to index the appropriate entry (PTE), retrieving the PFN if the entry is valid. The is then constructed by concatenating the PFN with the . Mathematically, this can be expressed as: \text{Virtual Address} = (\text{VPN} \times \text{Page Size}) + \text{Offset} \text{Physical Address} = (\text{PFN} \times \text{Page Size}) + \text{Offset} If the PTE indicates an invalid mapping, a page fault occurs, triggering the operating system to handle the access, such as loading the page from disk. This hardware-accelerated translation ensures low-latency memory operations in modern processors. To support hardware translation, the MMU is integrated into the CPU and performs these lookups transparently, often in a single clock cycle for cached entries. A key optimization is the (TLB), a small, fast within the MMU that stores recent VPN-to-PFN mappings, typically achieving hit rates of 90-99% in typical workloads to avoid full page table walks. On a TLB miss, the MMU traverses the hierarchy, which can involve multiple memory accesses, underscoring the TLB's role in performance. Modern architectures like x86 and employ multi-level s to mitigate the space overhead of flat structures, especially for large address spaces; for example, a two-level x86 page table uses a page directory to index into page tables, reducing memory usage for sparse virtual address spaces by allocating only necessary sub-tables. Inverted page tables address the inefficiency of traditional per-process page tables in systems with sparse or large virtual address spaces, maintaining a single global table with one entry per physical frame that records the owning process ID and VPN using a for lookups. This approach minimizes storage by avoiding entries for unmapped virtual pages, though it requires additional mechanisms like hashing to resolve collisions during translation. In the x86 architecture, a PTE is a 32-bit or 64-bit entry (depending on mode) containing the PFN, along with control bits such as present/valid (bit 0), read/write (bit 1), accessed/referenced (bit 5), and 6), which inform the MMU about permissions and usage for optimization. Similarly, ARM architectures use multi-level tables with 64-bit descriptors; for example, in ARMv8, validity is determined by the descriptor type (bits 1:0), with AP[2:0] controlling access permissions, an access flag (AF) bit for referenced status, and hardware-managed dirty state (from Armv8.1), supporting 4 KB, 16 KB, or 64 KB granule sizes to accommodate varying page sizes. These structures ensure precise control over memory access while integrating seamlessly with the MMU for efficient translation.

Page Replacement and Management

In virtual memory systems using paging, page replacement becomes necessary when a occurs and all physical frames are occupied, requiring the operating system to select and evict a victim page to free space for the incoming page. This process aims to minimize the overall number of page faults while balancing computational overhead. The choice of replacement policy significantly impacts system performance, as poor selections can lead to excessive disk I/O and degraded throughput. Several algorithms have been developed to guide page replacement, each with trade-offs in optimality, implementability, and efficiency. The First-In, First-Out () algorithm is the simplest, maintaining a of pages in the order they were loaded and evicting the oldest one; however, it can suffer from Belady's anomaly, where increasing the number of available frames paradoxically results in more page faults for certain reference traces, as demonstrated in simulations of programs with looping access patterns. The Optimal (OPT) algorithm, also known as Belady's optimal replacement, serves as an ideal benchmark by evicting the page that will not be referenced for the longest time in the future, achieving the minimum possible fault rate but requiring unattainable foresight, making it unsuitable for real-time use. Least Recently Used (LRU) approximates OPT by replacing the page unused for the longest time in the past, under the assumption of temporal locality, and is widely adopted for its strong empirical performance. Implementations vary: hardware-assisted versions use age bits shifted on each access to approximate recency, while software approaches employ stacks or counters to track usage, or maintain queues of pages ordered by last access time. Variants include the Not Recently Used (NRU) , which periodically clears bits and classifies pages into four categories based on (R) and modified (M) bits—preferring to evict from the lowest class (R=0, M=0) for efficiency—and the Second-Chance , an enhancement of that inspects the bit of the oldest page, giving it a "second chance" by clearing the bit and deferring eviction if recently used, thus incorporating recency without full LRU overhead. The Clock further refines Second-Chance by treating pages in a circular list with a sweeping pointer, checking and clearing bits as it advances, providing an efficient LRU approximation; this policy was notably implemented in early Unix systems like 4BSD for its low overhead and effectiveness in handling patterns. Beyond selection algorithms, page frame management involves allocating physical memory across processes to prevent unfairness or . Common strategies include equal partitioning of frames among active processes or priority-based allocation favoring interactive or high-importance tasks. The working set model addresses dynamic needs by estimating each process's "working set"—the set of pages actively referenced within a recent time window (typically defined by a parameter Δ)—and allocating sufficient frames to cover it, ensuring locality is preserved and faults are minimized; if the working set exceeds allocation, additional frames are granted or the process is suspended. This approach, formalized in foundational work on program behavior, integrates replacement with admission control to maintain system-wide efficiency.

Thrashing and Performance Issues

Thrashing refers to a critical performance degradation in virtual memory systems where the operating system experiences an excessively high rate of page faults, causing the CPU to spend more time waiting for disk I/O operations to load pages than performing actual computations. This phenomenon arises primarily when the degree of multiprogramming—the number of concurrently active processes—exceeds the physical memory capacity, leading to constant page swapping that overwhelms resources. The root cause of thrashing lies in the mismatch between the of processes and the available physical frames. A process's is the collection of s it actively references over a given time window; if the aggregate size across all processes surpasses the total , frequent s occur as the system evicts essential s to accommodate others. Diagnosis typically involves monitoring tools that track rates; thrashing is indicated when the fault rate exceeds a predefined , signaling that paging activity dominates CPU cycles. Peter Denning first formalized this in his analysis of multiprogrammed systems, attributing thrashing to overcommitment of resources. To mitigate thrashing, operating systems employ strategies centered on the model proposed by Denning in 1968. One primary approach is reducing the degree of multiprogramming by suspending or out low-priority processes until the total working set fits within ; the approximate threshold for sustainable multiprogramming is given by the equation n \approx \frac{M}{w}, where n is the number of processes, M is total physical memory in , and w is the average working set size per process. tuning dynamically adjusts allocations to ensure each process retains its recent reference set, while priority-based allocation favors high-priority tasks. Additionally, local page —applying algorithms within a process's own set—contrasts with by isolating effects, though it requires careful sizing to avoid intra-process thrashing. The impacts of thrashing are severe, with system throughput plummeting as CPU utilization drops below 10-20% in extreme cases, effectively halting productive work. In modern systems using SSDs for paging, thrashing persists as a bottleneck due to I/O overhead, though SSDs reduce times compared to HDDs; however, the increased write traffic accelerates NAND flash wear, potentially shortening drive lifespan without wear-leveling mitigations.

Segmented and Hybrid Approaches

Segmentation Fundamentals

Segmentation divides a process's virtual address space into variable-sized units known as segments, each representing a logical component of the program, such as the for instructions, the for global variables, or the segment for local variables and function calls. This approach allows segments to have lengths tailored to their content, providing a more intuitive mapping to the program's structure compared to uniform blocks. Address translation in segmentation begins with a virtual address comprising a segment identifier (or selector) and an offset within that segment. The hardware indexes a segment table—a maintained by the operating system—using the segment identifier to retrieve the segment's physical address and (or limit). It then checks if the offset is within bounds (offset < limit); if valid, the physical address is computed as + offset, enabling direct to . In some implementations, dedicated base-limit registers per segment accelerate this process by caching table entries in hardware. The segment table resembles a but incorporates length fields to support variable sizes, eliminating the fixed granularity of paging and thereby reducing internal fragmentation, where unused portions within fixed units go wasted. Segmentation offers key advantages by aligning memory organization with the program's logical divisions, which simplifies tasks like module relocation and partial loading. It also eases of segments across processes—for instance, common libraries can be mapped into multiple address spaces without replication—and supports at the segment level, where access permissions (e.g., read-only for code) can be enforced independently for each segment to enhance security and isolation. A seminal implementation of pure segmentation appeared in the operating system, developed jointly by , , and in the 1960s, where the entire virtual memory consisted of segments addressable by name in a single-level store, combining main memory and secondary storage seamlessly. Hardware exemplifying segmentation fundamentals was found in Digital Equipment Corporation's PDP-11 series, introduced in 1970, whose supported up to eight segments via base-limit register pairs, facilitating virtual address spaces up to 64 KB per process while enabling relocation to larger physical memories.

Segmentation vs. Paging Comparison

Segmentation and paging represent two fundamental approaches to virtual memory management, each addressing memory allocation and protection in distinct ways. Paging divides the virtual address space into fixed-size blocks called pages, typically of uniform size such as 4 KB, which are mapped to equally sized physical frames. This fixed-size allocation eliminates external fragmentation but introduces internal fragmentation, where portions of the last page in a logical unit remain unused. In contrast, segmentation partitions the address space into variable-sized segments based on logical units, such as code, data, or stack, allowing for more intuitive mapping of program structures to memory but leading to external fragmentation as free memory holes of varying sizes arise between allocated segments. The advantages of paging include simpler implementation, as address translation relies on uniform page tables without the need for variable-length , and efficient allocation since pages can be non-contiguous without wasting space between them. However, paging offers less flexibility for specific logical units, as and are applied at the page level rather than per logical , potentially requiring multiple pages for a single shareable entity. Segmentation excels in supporting by enabling fine-grained and at the segment level—each segment can have unique access rights, facilitating and across processes— but it necessitates periodic compaction to mitigate external fragmentation, which incurs computational overhead. Additionally, segmentation's variable sizes result in larger descriptor tables compared to paging's compact page tables, increasing memory overhead for .
AspectPagingSegmentation
Allocation SizeFixed (e.g., 4 KB pages); no external fragmentation, but internal fragmentation possible.Variable (logical units); external fragmentation requires compaction.
Address TranslationUniform page tables; simpler hardware support.Segment descriptors; higher overhead due to variable management.
Protection/SharingApplied per page; less intuitive for modules.Per segment; better for logical sharing and protection.
Fragmentation HandlingMinimal external; allocation is efficient and uniform.Compaction needed; dynamic growth supported but costly.
Hybrid approaches combine segmentation and paging to leverage their strengths, such as using segments for logical and pages within segments to avoid fragmentation. In paged segmentation, each segment is subdivided into fixed-size pages, allowing variable segment sizes without external fragmentation while maintaining logical boundaries for protection. The operating system pioneered this integration, employing segments as the primary addressing unit for sharing and protection, with paging to simulate a larger memory beyond physical limits, enabling dynamic segment growth up to 256 pages per segment. Similarly, the x86 architecture implements segmented paging, where segment registers provide a base address that feeds into the paging mechanism for final translation to physical memory. In contemporary systems, paging dominates due to its simplicity and efficiency in handling large address spaces, with segmentation often relegated to compatibility roles. For instance, 64-bit x86 processors primarily utilize paging for virtual memory in , treating the as flat while using segmentation selectively—for example, non-zero bases in FS and GS registers for — to maintain without full reliance on variable segments. The IA-64 () architecture further exemplifies a paging-centric model, eschewing traditional segmentation in favor of a flat divided into protection regions, relying solely on multi-level page tables for and to support massive 64-bit addressing. These hybrids highlight trade-offs where segmentation enhances but adds complexity, often making pure or paging-dominant approaches preferable in modern environments for reduced overhead and improved performance.

Supporting Techniques

Address Space Swapping

Address space swapping is a coarse-grained virtual memory technique in which an operating system suspends a process by transferring its entire set of resident pages from physical memory to a dedicated disk area known as swap space, thereby freeing up memory frames for other uses. Upon resumption, the process's pages are read back into memory from the swap space. This method treats the process's address space as a single unit, contrasting with page-level operations. Swapping is typically employed for low-priority processes or those in a blocked , allowing the to manage shortages without immediately terminating tasks. It complements finer-grained paging in resource-constrained environments by providing a to temporarily evict inactive processes, ensuring that active ones retain access to physical . In practice, it enables multiprogramming levels beyond what physical alone supports. Implementation relies on a background process, often called a swap daemon or swapper, which continuously monitors free memory levels. When free memory drops below a predefined threshold, the daemon identifies candidate processes for eviction using heuristics such as process priority (favoring higher-priority ones to remain resident) and age (preferring longer-dormant processes). Selected processes are then fully swapped out. In early Unix implementations, the swapper operated on a fixed-head disk, automatically handling these transfers to accommodate higher-priority incoming processes. Early Unix systems from the 1970s, running on hardware like the PDP-11 with limited core memory (e.g., 144 KB total, of which 42 KB was for the ), depended heavily on as the primary strategy due to the absence of widespread paging support at the time. The approximate time for a swap operation is given by t_{swap} \approx \frac{S}{B}, where S is the size of the process's resident set and B is the disk's I/O ; this highlights the operation's dependence on data volume and storage speed. Despite its utility in early systems, swapping has significant drawbacks, including high from bulk disk I/O, which can delay reactivation—especially for large address spaces where transfer times may span seconds on mechanical disks. This inefficiency has made it less prevalent in contemporary operating systems, where demand paging allows selective page movement for better performance and utilization.

Pinned Pages and Locking

Pinned pages, also known as locked or non-evictable pages, are portions of virtual memory that are explicitly marked to remain resident in physical , preventing them from being paged out or swapped to secondary . This mechanism ensures uninterrupted access to critical data structures, such as buffers or I/O buffers, by the operating system or components. The enforcement of pinning is typically handled at the operating system level through flags in page tables or virtual memory area (VMA) descriptors, though some architectures support direct enforcement via address translation controls. One primary method for pinning pages is the mlock() , introduced in the POSIX.1b-1993 realtime extensions and part of POSIX.1-2001, which locks a specified range of a process's into physical . Upon successful invocation, mlock() ensures that all pages overlapping the range starting at the given address and extending for the specified length become resident in RAM and remain so until explicitly unlocked with munlock(). In , this is implemented by setting the VM_LOCKED flag on the corresponding VMA, which places the pages on the unevictable list to exempt them from standard page replacement algorithms. Additionally, pages are marked with the PageMlocked() flag for efficient runtime checks during operations. The mlockall() variant extends this to the entire , while flags like MLOCK_ONFAULT defer locking until pages are faulted in, reducing initial overhead. Non-swappable status can also be indicated directly in entries, ensuring hardware-level protection against eviction. Pinning is essential in scenarios requiring predictable and low-latency memory access, such as real-time systems where page faults could violate timing guarantees. For instance, in real-time Linux extensions like those used in RHEL for Real-Time, mlock() is employed to lock application memory, avoiding the indeterminate delays of paging operations and ensuring deterministic behavior for time-sensitive tasks. In device drivers, particularly those involving (DMA), pinned pages provide stable physical addresses that hardware can access without risk of relocation during transfers; the Linux DMA API requires buffers to be either coherent or pinned to prevent such disruptions, as pageable memory may be swapped mid-operation. Performance-critical code, such as in high-throughput servers, also benefits from pinning to eliminate swapping overhead, though this ties into page replacement by excluding locked pages from eviction candidates. Certain architectures employ specialized modes for pinned regions to bypass address translation entirely. In extended architecture, the virtual-real (V=R) maps virtual addresses directly to real (physical) addresses without dynamic translation, effectively pinning the memory by eliminating the overhead of page tables for critical, fixed-location code or data in environments. This approach is particularly useful for supervisor-level operations where stability is paramount. In specifically, the VM_LOCKED flag on VMAs and the PageMlocked() bit on individual struct page instances enforce non-evictability, with resource limits like RLIMIT_MEMLOCK capping total locked to prevent . However, pinning incurs overhead by reserving physical frames exclusively, potentially reducing available for other processes and leading to out-of-memory conditions if overused; extensive pinning can also conflict with optimizations like transparent huge pages, hindering overall utilization. In real-time contexts, such as RTLinux-based , selective pinning minimizes these costs while ensuring bounds, though it requires careful management to balance predictability and resource efficiency.

Modern and Advanced Aspects

Security Implications

Virtual memory systems provide through paging mechanisms, but this design introduces specific security vulnerabilities, particularly side-channel attacks that exploit the translation process. The Meltdown attack, disclosed in 2018, allows user-level code to speculatively read memory by bypassing the supervisor bit checks during page translation on certain CPUs, leveraging to access protected pages before the fault is resolved. Similarly, the Spectre attacks, also from 2018, misuse branch prediction and to trick programs into reading unauthorized memory across virtual address boundaries, including data, by poisoning the branch target buffer during paging operations. These exploits demonstrate how virtual memory's reliance on hardware-level address translation can be undermined by transient execution, potentially leaking sensitive data across protection rings. Buffer overflows represent another class of vulnerabilities tied to virtual memory boundaries, where malformed inputs overrun allocated buffers and spill into adjacent memory regions. If a buffer spans or approaches page boundaries without proper alignment or bounds checking, an overflow can cross into pages with different permissions, such as executable code segments, enabling code injection or control-flow hijacking within the same address space. Although page-level protections like non-executable (NX) bits mitigate some risks, incomplete randomization or predictable layouts can facilitate exploitation, as seen in historical stack-smashing attacks that leverage virtual memory's contiguous address illusion. Hardware-induced faults further compromise virtual memory integrity, as exemplified by the attack discovered in 2014. This vulnerability arises from cell density, where repeated accesses to a victim row can flip bits in adjacent rows due to electrical interference, potentially altering entries or data across isolated virtual address spaces. Such bit flips enable by corrupting mappings in non-adjacent physical pages, bypassing virtual memory without direct access. Mitigations include Target Row Refresh (TRR), an in- mechanism that proactively refreshes suspected aggressor rows to prevent disturbance errors, implemented in modern DDR4 and DDR5 modules. More recent transient execution variants, such as the SWAPGS gadget attack identified in 2019 and analyzed in subsequent years, exploit the SWAPGS instruction used for -user segment switching during system calls. By speculatively executing SWAPGS in an incorrect context, attackers can leak pointers from the GS base register, undermining virtual memory's separation and aiding further exploits like ROP chains. In 2025, vulnerabilities like AMD's CVE-2025-0033 in Secure Encrypted Virtualization-secure nested paging (SEV-SNP) highlight ongoing risks to virtual memory isolation in , allowing potential data leaks from encrypted guest pages via flaws; mitigations involve updated and host patches. To counter these threats, operating systems employ protections that enhance virtual memory's security without altering core paging. (ASLR), first introduced in the project in the early 2000s and now standard in modern OSes like and Windows, randomizes the base addresses of key memory regions such as the , , and libraries at process launch, complicating exploits that rely on fixed virtual addresses. ASLR (KASLR), integrated into 3.14 in 2014, extends this to the kernel space by randomizing module load addresses, reducing the effectiveness of kernel-targeted attacks. Following Meltdown, Page Table Isolation (PTI), also known as Kernel Page-Table Isolation (KPTI), was implemented in 4.15 in 2018; it maintains separate page tables for user and kernel modes, flushing sensitive mappings during user execution to prevent speculative access to pages. Despite these safeguards, virtual memory's abstraction of physical layout raises concerns through timing-based leaks. While it conceals details from processes, shared resources like CPU caches enable side-channel attacks, such as cache-timing probes, where eviction patterns reveal virtual-to-physical mappings or data across isolated spaces.

Implementations in Contemporary Systems

In contemporary desktop and server operating systems, virtual memory implementations leverage advanced features to optimize performance and scalability. , for instance, supports huge pages through the hugetlbfs filesystem, which allows allocation of larger page sizes (such as 2 MB or 1 GB) to reduce (TLB) overhead and improve memory efficiency for high-memory applications. Similarly, employs Dynamic Memory, a feature in that dynamically allocates memory to virtual machines based on demand, enabling overcommitment while maintaining isolation through shadow paging mechanisms. These systems often utilize 64-bit addressing, as in architectures where the canonical 48-bit form addresses up to 256 terabytes of virtual space, facilitating expansive address spaces without excessive levels. Mobile and embedded platforms adapt virtual memory for constrained environments, prioritizing compression and selective reclamation. Android implements zRAM, a block device that compresses inactive pages in RAM to serve as swap space, reducing I/O latency and extending battery life on devices with limited storage. In iOS, the jetsam mechanism integrates with virtual memory management to proactively terminate background processes under memory pressure, using heuristics based on app priority, usage patterns, and residency to preserve foreground app performance. For security in embedded systems, ARM's TrustZone employs secure paging, where the hypervisor isolates trusted execution environments (TEEs) with separate page tables, preventing unauthorized access to sensitive virtual memory regions. In cloud and virtualization contexts, virtual memory supports multi-tenancy through specialized hardware accelerations. The Kernel-based Virtual Machine (KVM) on Linux uses Intel's Extended Page Tables (EPT) for nested paging, which maps guest physical addresses to host physical ones in two levels, minimizing virtualization overhead for page walks. VMware's ESXi hypervisor implements memory ballooning, where a driver in the guest inflates a balloon to reclaim unused pages for the host, allowing memory overcommitment in production environments, with ratios varying by workload (commonly 1.5:1 to 3:1 or higher under monitoring). Modern enhancements further refine these implementations for efficiency and integration. Linux's Transparent Huge Pages (THP) automatically promotes 4 KB pages to 2 MB equivalents on fault, which can reduce TLB misses significantly in certain workloads such as databases. Extended () programs enable dynamic tuning of virtual memory, such as custom page reclaim policies via hooks in the kernel's subsystem. Apple's M-series chips introduce unified memory architecture, where CPU and GPU share a single physical address space managed virtually, eliminating copy overheads and enabling seamless allocation across 16-128 GB pools. Emerging trends highlight adaptations to new hardware paradigms. Persistent memory technologies, building on historical efforts like Intel Optane (discontinued as of 2022), now leverage standards such as (CXL) for byte-addressable, disaggregated storage in the , extending virtual memory mappings to non-volatile media via libraries like libpmemobj and enabling pooled memory across nodes for faster recovery in data centers. In IoT devices, virtual memory optimizations focus on energy efficiency, such as lightweight paging in RTOS like that minimizes context switches to improve power consumption in battery-constrained sensors.

References

  1. [1]
    Virtual memory | Encyclopedia of Computer Science
    Virtual memory is the simulation of a storage space so large that programmers do not need to reprogram or recompile their works when the capacity of a local ...
  2. [2]
    Virtual Memory - Cornell: Computer Science
    Virtual memory is a system by which the machine or operating system fools processes running on the machine into thinking that they have a lot more memory to ...Missing: science | Show results with:science
  3. [3]
    [PDF] Virtual Memory - the denning institute
    In a virtual memory, the addresses a program may use to identify information are distinguished from the addresses the memory system uses to identify physical ...
  4. [4]
    14. The Memory Subsystem - University of Iowa
    Put simply, virtual memory is present in any system where the memory addresses issued by the program are changed by any mechanism to produce the addresses ...
  5. [5]
    The Atlas Milestone - Communications of the ACM
    Sep 1, 2022 · Virtual memory is a technology of computer systems architecture that is as old as academic computer science and has affected the careers of ...Missing: definition | Show results with:definition
  6. [6]
    [PDF] Lecture 7: The Multics Virtual Memory - Berkeley
    Sep 21, 2005 · By the way, the dynamic linking feature of Multics worked extremely well and was a very popular capability of the system. It was another reason ...
  7. [7]
    [PDF] Virtual Memory (Draft v2) - Calhoun
    Jul 1, 2012 · Introduction. Virtual memory is one of the engineering triumphs of the computer age. In the. 1960s, it became a standard feature of nearly ...
  8. [8]
  9. [9]
    [PDF] Virtual Memory - Computer Systems: A Programmer's Perspective
    Virtual memory (VM) is an abstraction of main memory, providing a large, uniform, and private address space. The CPU uses virtual addresses, which are ...Missing: definition | Show results with:definition
  10. [10]
    Operating Systems: Virtual Memory
    Virtual memory allows programs to use a larger address space than physical memory, loading only needed portions of processes on demand, and can be larger than ...
  11. [11]
    [PDF] CSE 410: Systems Programming - Virtual Memory
    The Memory Management Unit (MMU) translates addresses. It uses a per-process mapping structure to transform virtual addresses into physical addresses.
  12. [12]
    [PDF] Virtual Memory (VM) - Computer Science
    1 virtual address space per process, with many processes… (Actually, it's smaller than that dot compared to virtual memory.) WELLESLEY CS! CS 240, Fall 2014 ...
  13. [13]
    [PDF] Lecture 7: Memory Management
    – The virtual address is not the same as the physical RAM address in which it resides. – The OS (hardware MMU) translates the virtual address into the physical ...
  14. [14]
    Virtual Memory - CS 3410
    Virtual memory creates the illusion of exclusive memory access for each process, using virtual addresses and a mapping to physical addresses. Programs only see ...Missing: definition | Show results with:definition
  15. [15]
    VirtualMemory
    Where we put pages that don't fit in main memory (typically some sort of disk). The specific region on a disk used for backing store is often called swap space.
  16. [16]
    [PDF] 1 VIRTUAL MEMORY Prof. Bruce Jacob Dept. of Electrical ...
    The ultimate home for the program's address space is backing store, usually a disk drive; this is where the program's instructions and data originate and where ...
  17. [17]
    [PDF] Chapter 10: Virtual Memory
    Virtual memory separates user logical memory from physical memory, allowing only part of a program to be in memory, and the logical address space to be larger.
  18. [18]
    Virtual memory | ACM Computing Surveys - ACM Digital Library
    DENNING, P. J. 1970. Virtual memory. ACM Comput. Surv. 2, 3 (Sept.), 153-189. Digital Library · Google Scholar. [3]. DENNING, P. J. 1980. Working sets past and ...
  19. [19]
    [PDF] Virtual Memory - the denning institute
    These and subsidiary problems are studied from a theoretic view, and are shown to be controllable by a proper combination of hardware and memory management.
  20. [20]
    [PDF] Virtual Memory, Processes, and Sharing in MULTICS - andrew.cmu.ed
    In this paper we explain some of the more fundamental aspects of the ~ULTICS design. The concepts of "process" and "address space" are defined, some details of ...Missing: seminal | Show results with:seminal
  21. [21]
    [PDF] Protection and the Control of Information Sharing in Multics
    [4], the Multics virtual memory is segmented to permit sharing of ob- jects in the virtual memory and to simplify address space management for the programmer.Missing: seminal | Show results with:seminal
  22. [22]
    [PDF] THE WORKING SET MODEL FOR PROGRAM BEHAVIOR
    THE WORKING SET MODEL FOR PROGRAM BEHAVIOR. Peter J. Denning. Massachusetts Institute of Technology. Cambridge, Massachusetts. SUMMARY. Probably the most basic ...
  23. [23]
    [PDF] CSE 120 – Lecture 10: Memory Management
    Physical memory is broken up into fixed partitions. ♢. Hardware requirements ... Fixed partitions – easy to use, but internal fragmentation. ♢. Variable ...
  24. [24]
    [PDF] Memory Management - Computer Science | UC Davis Engineering
    Example: Fixed Partitioning. ECS 150 (Operating Systems). Memory ... ▫ low CPU utilization. ▫ operating system thinks that it needs to increase ...
  25. [25]
    [PDF] Main Memory - ICS332 — Operating Systems
    If absolute addressing is used, the text (i.e., code) in physical ... An address in the physical memory is called a physical address ... fragmentation, but ...
  26. [26]
    Memory management - UCSD CSE
    Multiple fixed partitions: The memory is divided into partitions of fixed size. A program is loaded into. partition of closest size: may lead to waiting; next ...
  27. [27]
    Virtual Memory I – Computer Architecture
    Therefore, the definition of virtual memory can be stated as, “ The conceptual separation of user logical memory from physical memory in order to have large ...
  28. [28]
    [PDF] Virtual memory - Stanford Secure Computer Systems Group
    Virtual memory advantages. • Can re-locate program while running. - Run partially in memory, partially on disk. • Most of a process's memory may be idle (80/20 ...
  29. [29]
    Understanding Page Tables in xv6 on RISC-V - CS 326
    Overcommitment: The system can allocate more virtual memory than physically available; Simplified memory model: Programs can use a contiguous address space ...
  30. [30]
    [PDF] CSC 553 Operating Systems - Lecture 7 - Memory Management
    No internal fragmentation; improved memory utilization and reduced overhead compared to dynamic partitioning. External fragmentation. Virtual Memory. Paging. As ...
  31. [31]
    [PDF] CSC 553 Operating Systems - Lecture 8 - Virtual Memory
    The size of virtual storage is limited by the addressing scheme of the computer system and by the amount of secondary memory available and not by the actual ...
  32. [32]
    [PDF] 250: Virtual memory - Duke People
    Not just bigger than free memory, bigger than AVAILABLE memory! • More programs: • Only part of each program loaded, so more can be loaded at once. • Faster ...
  33. [33]
    [PDF] Chapter 10: Virtual Memory - andrew.cmu.ed
    • Less I/O needed to load or swap programs into memory -> each user program ... ▫ Demand page in from program binary on disk, but discard rather than paging.
  34. [34]
    [PDF] Lecture 14: October 25 14.1 Demand Paged Virtual Memory - LASS
    Demand paging does not load the pages that are never accessed, saving memory for other programs and increases the degree of multiprogramming. • There is less ...
  35. [35]
    CIS 307: Virtual Memory
    A Virtual Memory system is a system where the addresses used in executing images, Virtual Addresses, are different from the addresses, Physical Addresses.<|control11|><|separator|>
  36. [36]
    CMPSC 311, Process Address Space
    Feb 4, 2013 · The text segment holds program instructions in the machine language. · The data segment holds global variables, static local variables and ...
  37. [37]
    Introduction to Virtual Memory
    Virtual memory is the idea of creating a logical spaces of memory locations, and backing the logical spaces with real, physical memory.Missing: definition | Show results with:definition
  38. [38]
    [PDF] Complete Virtual Memory Systems - cs.wisc.edu
    By instead performing a copy-on-write fork(), the OS avoids much of the needless copying and thus retains the correct semantics while improving performance.
  39. [39]
    CSE 451 24sp - Washington
    fork · after fork, updates to parent's or child's address space is only visible to that process; separate physical memory, separate memory translation table.
  40. [40]
    [PDF] Virtual Memory
    • Give illusion of private address space to each process. • Adding MMU registers for base+bounds so translation is fast. • OS not involved with every address ...<|control11|><|separator|>
  41. [41]
    [PDF] Demand Paging and Replacment Virtual Memory Illustrated
    • page table format is defined by the architecture. • OS loads page table bases and lengths into privileged memory management registers on each context switch.
  42. [42]
    Virtual Memory - CS 3410 - CS@Cornell
    Each process will operate in its own address space, meaning that it thinks in terms of its own 264 memory locations. We will call these addresses virtual ...Missing: per | Show results with:per
  43. [43]
    [PDF] xv6: a simple, Unix-like teaching operating system - PDOS-MIT
    Sep 2, 2025 · copy is needed. Copy-on-write makes fork faster, since fork need not copy memory. Some of the memory will have to be copied later, when ...
  44. [44]
    Virtual Memory | ACM Computing Surveys - ACM Digital Library
    This paper describes a write-once-memory-code phase change memory (WOM-code PCM) architecture for next-generation non-volatile memory applications.
  45. [45]
    The Multics virtual memory: concepts and design - ACM Digital Library
    The Multics virtual memory: concepts and design. article. Free access. Share on. The Multics virtual memory: concepts and design. Authors: A. Bensoussan. A ...
  46. [46]
    [PDF] COS 318: Operating Systems Virtual Memory Paging - cs.Princeton
    ○ Demand paging: only bring in pages actually used. ○ Paging: only keep frequently used pages in memory. ◇ Mechanism: ○ Programs refer to addresses in ...
  47. [47]
    Memory & Storage | Timeline of Computer History
    Magnetic drum memory​​ The result was Atlas, completed in 1950. Atlas used magnetic drum memory, which stored information on the outside of a rotating cylinder ...
  48. [48]
    Milestones:Atlas Computer and the Invention of Virtual Memory ...
    The Atlas computer invented virtual memory, allowing different memory speeds to act as one large fast memory, addressing the issue of fast and slow memory.
  49. [49]
    Virtual Memory: History - the denning institute
    The first virtual memory machine was developed in 1959. They called it the one level storage system. Although it was heavily criticized, it spurred many new ...
  50. [50]
  51. [51]
    The Locality Principle - Communications of the ACM
    Jul 1, 2005 · Locality of reference is one of the cornerstones of computer science. It was born from efforts to make virtual memory systems work well.
  52. [52]
    [PDF] The Virtual Memory in the Stretch Computer
    Since our original work on the virtual memory and simulation in 1957-58, a large number of detailed changes have been made in the actual hard- ware design of ...Missing: demand | Show results with:demand
  53. [53]
    [PDF] B5000 - People @EECS
    Multi-address computers are constructed to make the execu- tion of a few selected operations more efficient, but at the expense of building inefficiencies into ...
  54. [54]
    History - Multics
    Jul 31, 2025 · Multics design was started in 1965 as a joint project by MIT's Project MAC, Bell Telephone Laboratories, and General Electric Company's Large ...
  55. [55]
    IBM: VM 50th Anniversary
    Aug 3, 2022 · On August 2, 1972 VM/370 was announced by IBM along with the first System/370 mainframes that supported virtual memory.
  56. [56]
    [PDF] BEFORE MEMORY WAS VIRTUAL - the denning institute
    Dozens of experimental studies during the 1960s sought either to affirm or deny the hypothesis that operating systems could do a better job at.Missing: Fritz- Randy
  57. [57]
    Memory Management Unit - OSDev Wiki
    Memory translation is a process by which virtual addresses are converted to physical addresses. We can say that the virtual addresses are mapped to the physical ...
  58. [58]
    [PDF] Paging: Faster Translations (TLBs) - cs.wisc.edu
    A TLB is a hardware cache of virtual-to-physical address translations, designed to be fast, and is part of the memory-management unit.
  59. [59]
    Hardware page table translation - Arm Developer
    A page table holds 256 32-bit entries 4KB in size. You can determine the page type by examining bits [1:0] of the second-level descriptor. For both first and ...
  60. [60]
    Inverted Page Tables
    Feb 10, 1990 · Virtual memory is typically provided by paging. The virtual address space of a process is broken up into fixed size pages. A page is typically ...
  61. [61]
    [PDF] Intel® 64 and IA-32 Architectures Software Developer's Manual
    NOTE: The Intel® 64 and IA-32 Architectures Software Developer's Manual consists of nine volumes: Basic Architecture, Order Number 253665; Instruction Set ...
  62. [62]
    Controlling address translation Translation table format
    Each entry is 64 bits and the bottom two bits determine the type of entry. Notice that some of the table entries are only valid at specific levels.
  63. [63]
    [PDF] 4BSD UNIX Virtual Memory Page Replacement Algorithm
    4BSD UNIX use a virtual memory with demand paging. • A global replacement policy and the clock (second chance) algorithm is used.Missing: original | Show results with:original
  64. [64]
    Thrashing: Its causes and prevention
    Working Set (WS): whenever a fresh page of main memory is needed, choose for removal some page of a non-active process or some non-working- set page of an ...
  65. [65]
    The working set model for program behavior
    DENNING, P. J. Memory allocation in multiprogrammed computers. Project MAC Computation Structures Group. Memo 24, M.I.T., Cambridge; Mass., Mar. 1966. 16 ...
  66. [66]
    Peter J. Denning -- Working Set Publications
    (In Computing Surveys) The working set model for program behavior was invented in 1965. It has stood the test of time in virtual memory management for over ...
  67. [67]
    [PDF] Memory Management – Thrashing, Segmentation and Paging
    Memory management involves thrashing, segmentation, and paging. Thrashing occurs when a system spends more time paging, and a working set is the set of pages a ...Missing: causes | Show results with:causes
  68. [68]
    What is Virtual Memory? | Definition from TechTarget
    May 12, 2025 · Virtual memory is a memory management technique where secondary memory can be used as if it were a part of the main memory.
  69. [69]
    Memory Management, Segmentation, and Paging - UCSD CSE
    Paging splits the address space into equal sized units called pages. While segmentation splits the memory into unequal units that may have sizes more ...
  70. [70]
    [PDF] Virtual Memory, Processes, and Sharing in MULTICS
    i. Designed for a large community of users ii. Designed principally for remote terminals b. Major goals for MULTICS (1965) i. Convenient remote terminal use.
  71. [71]
    [PDF] pdp11-40.pdf - PDOS-MIT
    MEMORY MANAGEMENT. The PDP-11/40 Memory Management Unit provides the hardware facili- ties necessary for complete memory management and protection. It is.
  72. [72]
    27. Virtual Memory II - UMD Computer Science
    The VMM determines how to map virtual resources to physical resources. A physical resource may be time -shared, partitioned, or even emulated in software. The ...<|control11|><|separator|>
  73. [73]
    [PDF] Segmentation and Paging
    Paging divides memory into fixed-size pages, while segmentation splits processes into logical areas, like code, data, and stack. Paging aims to reduce ...
  74. [74]
    CS 537 Lecture Notes, Part 8 Segmentation - cs.wisc.edu
    Segmentation allows each process to have multiple simulated memories (segments) that start at address zero, are independently protected, and can be separately ...
  75. [75]
    [PDF] W4118: segmentation and paging - CS@Columbia
    ❑ Paging: divide memory into fixed-sized pages. ▫ For both virtual and ... ❑ Break up virtual address space into multiple page tables at different levels.
  76. [76]
    [PDF] CHAPTER 3 PROTECTED-MODE MEMORY MANAGEMENT
    Protected-mode memory management uses segmentation to isolate code/data and paging to map program sections into physical memory as needed. Paging is optional.
  77. [77]
    [PDF] The AMD x86-64 Architecture Extending the x86 to 64 bits - Hot Chips
    • 64-bit mode does not use segmentation. – Flat addressing. • 64-bit integer operations. • Double the number of Integer and SSE registers. – 16 General Purpose ...Missing: usage | Show results with:usage
  78. [78]
    [PDF] Intel® IA-64 Architecture Software Developer's Manual
    Chapter 3, “IA-64 Execution Environment” describes the IA-64 register set used by applications and the memory organization models. ... virtual aliasing, physical ...
  79. [79]
    [PDF] The UNIX Time- Sharing System
    system storage and swapping, four moving-head disk drives which each provide ... priority process forces it to be swapped out to the fixed- head disk.
  80. [80]
    Swapping Out and Discarding Pages - The Linux Tutorial
    The kernel swap daemon is a special type of process, a kernel thread. Kernel threads are processes that have no virtual memory, instead they run in kernel mode ...
  81. [81]
    How Memory Swapping Works - Enterprise Storage Forum
    Mar 20, 2023 · Memory swapping can help as this technique creates a larger virtual address space by combining the physical memory and hard disk space.
  82. [82]
    Concepts overview - The Linux Kernel documentation
    The virtual memory abstracts the details of physical memory from the application software, allows to keep only needed information in the physical memory (demand ...
  83. [83]
    unevictable-lru.rst - The Linux Kernel Archives
    * Those mapped into VM_LOCKED [mlock()ed] VMAs. The infrastructure may also be able to handle other conditions that make pages unevictable, either by definition ...
  84. [84]
    mlock
    The mlock() function shall cause those whole pages containing any part of the address space of the process starting at address addr and continuing for len ...Missing: syscall pinned
  85. [85]
    mlock(2) - Linux manual page - man7.org
    mlock(), mlock2(), and mlockall() lock part or all of the calling process's virtual address space into RAM, preventing that memory from being paged to the swap ...Missing: pinned | Show results with:pinned
  86. [86]
    mm/mlock.c - Linux Kernels - GitLab
    * Mlocked pages are marked with PageMlocked() flag for efficient testing. * in ... * it, VM_LOCKED and VM_LOCKONFAULT will be cleared from mm->def_flags.
  87. [87]
    Chapter 13. Using mlock() system calls on RHEL for Real Time
    With mlockall() system calls, you can lock all mapped pages into the specified address range. Memory locks do not stack. Any page locked by several calls will ...Missing: pinned | Show results with:pinned
  88. [88]
    2.2. Using mlock to Avoid Page I/O - Red Hat Documentation
    The mlock and mlockall system calls tell the system to lock to a specified memory range, and to not allow that memory to be paged.Missing: bit | Show results with:bit
  89. [89]
    Dynamic DMA mapping using the generic device
    Many drivers need lots of small DMA-coherent memory regions for DMA descriptors or I/O buffers. Rather than allocating in units of a page or more using ...
  90. [90]
    [PDF] System/370 Extended Architecture: Facilities for Virtual Machines
    The batch system is usually run as a V = R virtual machine. The V = R guest is executed with the host address space representing guest main storage mapped one- ...
  91. [91]
    [PDF] Meltdown: Reading Kernel Memory from User Space - USENIX
    Aug 15, 2018 · Cache side-channel attacks exploit timing differences that are introduced by the caches. Different cache attack techniques have been proposed ...
  92. [92]
    [1801.01203] Spectre Attacks: Exploiting Speculative Execution - arXiv
    Jan 3, 2018 · This paper describes practical attacks that combine methodology from side channel attacks, fault attacks, and return-oriented programming that can read ...
  93. [93]
    GWP-ASan: Sampling-Based Detection of Memory-Safety Bugs in ...
    Listing 1: Buffer overflow examples. // heap allocation int *array = malloc ... if the access crosses the page boundary. To find overflows, the allo ...
  94. [94]
    [PDF] Flipping Bits in Memory Without Accessing Them
    Jun 24, 2014 · With some engineering effort, we believe we can de- velop Code 1a into a disturbance attack that injects errors into other programs, crashes ...
  95. [95]
    [PDF] Understanding Target Row Refresh Mechanism for Modern DDR ...
    TRR is documented in JEDEC as a protection against the Rowhammer attack. Thus, performing Rowhammer attack on DDR4 is one way to trigger TRR. However, it is ...
  96. [96]
    CVE-2019-1125: Spectre SWAPGS gadget vulnerability
    This additional attack vector builds on existing software fixes shipped in previous kernel updates. This vulnerability only applies to x86-64 ...
  97. [97]
    PaX ASLR (Address Space Layout Randomization)
    The goal of Address Space Layout Randomization is to introduce randomness into addresses used by a given task. This will make a class of exploit techniques ...
  98. [98]
    Kernel address space layout randomization - LWN.net
    Oct 9, 2013 · Address-space layout randomization (ASLR) is a well-known technique to make exploits harder by placing various objects at random, rather than fixed, addresses.
  99. [99]
    21. Page Table Isolation (PTI) - The Linux Kernel Archives
    Page Table Isolation (pti, previously known as KAISER 1) is a countermeasure against attacks on the shared user/kernel address space such as the “Meltdown” ...