Distributed Systems Principles and Memory Management
115 Questions
3 Views

Distributed Systems Principles and Memory Management

Created by
@EasiestMimosa

Podcast Beta

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What role does object technology play in structuring distributed services?

Object technology facilitates inheritance and reuse, which helps in organizing distributed services effectively.

Why is academia considered a rich source of technological innovation?

Academia encourages out-of-the-box thinking unhindered by market pressures, allowing for groundbreaking innovations.

How can byproducts of thought experiments influence technological advancements?

Byproducts of thought experiments can lead to unexpected innovations, such as sticky notes originating from space research.

What is the significance of memory in distributed systems?

<p>Memory is a crucial resource that impacts performance, and unused memory in a cluster can be utilized to enhance efficiency.</p> Signup and view all the answers

What is the main question addressed by a Global Memory System (GMS)?

<p>The GMS asks how to effectively use peer memory for paging across a Local Area Network (LAN).</p> Signup and view all the answers

What is the goal of Distributed Shared Memory (DSM) in a cluster?

<p>The goal of DSM is to provide a shared memory abstraction, making it appear as though there is a single shared memory space.</p> Signup and view all the answers

How does the Distributed File System (DFS) utilize cluster memory?

<p>DFS utilizes cluster memory for cooperative caching of files to enhance access speeds.</p> Signup and view all the answers

What common theme is explored across the three distributed subsystems discussed?

<p>The common theme is efficient memory usage, focusing on optimizing peer memory utilization.</p> Signup and view all the answers

What role does GMS play in utilizing global memory as a substitute for disk paging?

<p>GMS leverages the cluster's global memory to improve efficiency by using it as a faster surrogate for disk paging.</p> Signup and view all the answers

How does Host P adjust its memory after copying a shared page from Host Q?

<p>After copying the shared page X, Host P's local memory increases by 1 while its global memory decreases by 1.</p> Signup and view all the answers

What happens to Host R's memory if the globally oldest page it evicts comes from its local memory?

<p>If the oldest page is evicted from Host R's local memory, its local memory decreases and its global memory increases.</p> Signup and view all the answers

Why does the total memory pressure in the cluster increase when page X is shared between Host P and Host Q?

<p>The total memory pressure increases by 1 because page X is present in the working sets of both Host P and Host Q.</p> Signup and view all the answers

What does GMS not handle regarding shared pages?

<p>GMS does not manage coherence for shared pages; it solely handles the paging.</p> Signup and view all the answers

How do idle nodes function within the GMS framework?

<p>Idle nodes begin to store pages from active nodes, gradually becoming memory servers for peers.</p> Signup and view all the answers

What does the dynamic local-global memory split signify in GMS?

<p>It indicates that local memory is used by the node itself, while global memory is dynamically allocated to store pages for other nodes.</p> Signup and view all the answers

Explain the significance of age management in GMS.

<p>Age management aims to identify the globally oldest page for replacement to ensure balanced memory management across nodes.</p> Signup and view all the answers

What must Host P do when it experiences a page fault on page X while it is shared with Host Q?

<p>Host P must copy page X into its local memory while evicting another page Y from its global memory.</p> Signup and view all the answers

Describe the impact of a globally oldest page being evicted from global memory.

<p>If the globally oldest page is evicted from global memory and is clean, it can be discarded without writing it to disk.</p> Signup and view all the answers

What happens to Host Q's memory when page X is copied for Host P?

<p>Host Q's local and global memory remains unchanged since it still utilizes page X in its working set.</p> Signup and view all the answers

How is cluster-wide memory pressure managed within GMS?

<p>Cluster-wide memory pressure is managed by evicting or writing a page to disk when shared pages increase demand on memory resources.</p> Signup and view all the answers

What is the purpose of the epoch-based management concept in GMS?

<p>Epoch-based management distributes memory management tasks and limits the number of page replacements within a defined time frame.</p> Signup and view all the answers

What triggers the end of an epoch in the GMS system?

<p>An epoch ends when either the time limit (T) or the number of replacements (M) is reached.</p> Signup and view all the answers

How does the initiator node determine which pages should be replaced?

<p>The initiator calculates the minimum age of the M pages to be replaced and identifies pages older than this as candidates.</p> Signup and view all the answers

What information do nodes share at the start of each epoch?

<p>Each node shares the age information of its pages, both local and global, with the initiator node.</p> Signup and view all the answers

What does a node's weight represent in the GMS system?

<p>A node's weight represents the fraction of its pages expected to be replaced in the upcoming epoch.</p> Signup and view all the answers

How are dynamic initiator assignments beneficial in GMS?

<p>Dynamic assignments prevent a single node from becoming overburdened by managing memory responsibilities.</p> Signup and view all the answers

What happens to a page with an age greater than the minimum age during a page fault?

<p>If its age is greater, the page is identified as a replacement candidate and can be immediately discarded.</p> Signup and view all the answers

How does the GMS system approximate global LRU page replacement?

<p>It calculates age and weight information at the start of each epoch and uses that data to make local decisions.</p> Signup and view all the answers

What role does historical page usage play in the GMS algorithm?

<p>Historical usage helps the initiator predict future page replacements based on age information.</p> Signup and view all the answers

What determines the next initiator node in the GMS system?

<p>The next initiator is chosen as the node with the highest weight distribution, indicating it is the least active.</p> Signup and view all the answers

What is one significant task performed by the initiator node?

<p>The initiator computes the minimum age of pages to identify replacement candidates for the upcoming epoch.</p> Signup and view all the answers

What is the expected outcome of a page fault when the page's age is less than the minimum age?

<p>The page must be sent to a peer for storage in its global cache.</p> Signup and view all the answers

Why is it important for nodes to receive weight and age information during an epoch?

<p>This information helps nodes plan for upcoming epochs and predict page replacement likelihood.</p> Signup and view all the answers

What is the significance of the min age in the context of page replacement?

<p>The min age defines the threshold for determining which pages are candidates for replacement.</p> Signup and view all the answers

What is the primary role of GMS in memory management across a cluster?

<p>GMS manages the allocation and freeing of page frames in the cluster-wide memory pool, allowing for efficient handling of page requests and memory reuse.</p> Signup and view all the answers

How does GMS collect age information for approximating global LRU?

<p>GMS collects age information by having UBC intercept read/write calls and redirecting page faults for age tracking.</p> Signup and view all the answers

What is the purpose of the Page Frame Directory (PFD) in GMS?

<p>The PFD maps a Universal ID (UID) to a corresponding physical page frame in memory or disk, facilitating efficient memory access.</p> Signup and view all the answers

Define the components of a Universal ID (UID) used by GMS.

<p>A UID consists of an IP address, a disk partition identifier, an i-node representing the related file or object, and an offset within the page.</p> Signup and view all the answers

What is the function of the Global Cache Directory (GCD) in the GMS architecture?

<p>The GCD manages the mapping between UIDs and physical frame information contained in the Page Frame Directory across nodes.</p> Signup and view all the answers

Explain the role of the Page Ownership Directory (POD) in GMS.

<p>The POD tracks ownership information for pages, determining which node or process owns a particular page to ensure memory consistency.</p> Signup and view all the answers

How does the pageout daemon work with GMS?

<p>The pageout daemon collaborates with GMS to place clean pages into the cluster memory, enhancing memory reuse instead of discarding them.</p> Signup and view all the answers

What happens when a page fault occurs in a distributed memory system managed by GMS?

<p>Upon a page fault, the virtual address is converted to a UID to identify the page's location across the cluster.</p> Signup and view all the answers

Why is the Distributed Hash Table important for the Global Cache Directory (GCD)?

<p>The Distributed Hash Table enables efficient lookup of PFD information corresponding to UIDs without overloading any single node.</p> Signup and view all the answers

What distinguishes a private page from a shared page in the context of GMS?

<p>A private page is accessible only by the owning process, while a shared page can be accessed by multiple processes.</p> Signup and view all the answers

How does GMS enable efficient distributed memory management?

<p>GMS combines UID mapping, global cache tracking, and ownership management to coordinate memory access across different nodes effectively.</p> Signup and view all the answers

What is the significance of intercepting read/write calls in the unified buffer cache (UBC)?

<p>Intercepting read/write calls allows UBC to track the age of pages and redirect page faults to GMS for better memory management.</p> Signup and view all the answers

Describe the data structure utilized to ensure that every node has up-to-date ownership information in GMS.

<p>The POD is a replicated data structure across all nodes, maintaining identical copies to ensure data consistency.</p> Signup and view all the answers

What approach does GMS use to manage the lifecycle of free page frames in a cluster?

<p>GMS collaborates with the Free List to allocate and free page frames in a distributed manner across the cluster.</p> Signup and view all the answers

What is the primary goal of the Global Memory System (GMS)?

<p>The primary goal of GMS is to utilize idle memory from other nodes in a local area network for paging, reducing reliance on slower disk access.</p> Signup and view all the answers

How does the role of the Virtual Memory Manager differ between traditional systems and GMS?

<p>In GMS, the Virtual Memory Manager first checks for required pages in cluster memory before accessing the disk, whereas traditional systems directly fetch from disk on a page fault.</p> Signup and view all the answers

What is memory pressure in the context of distributed systems?

<p>Memory pressure refers to the high demand for memory resources by processes on a node, which may be contrasted with other idle nodes with available memory.</p> Signup and view all the answers

Explain the concept of working set in relation to virtual memory.

<p>The working set is the portion of virtual memory that is currently required by a process and is actually in physical memory at any given time.</p> Signup and view all the answers

What happens during a page fault in a GMS environment?

<p>During a page fault, GMS first checks the cluster memory for the page; if it's not found, it then retrieves it from the disk.</p> Signup and view all the answers

What is the difference between private pages and shared pages in GMS?

<p>Private pages belong to a single process, while shared pages are accessed by multiple nodes running distributed applications.</p> Signup and view all the answers

Why can network memory access be faster than disk access in GMS?

<p>Network memory access can be faster due to high data transfer rates in modern networks like Gigabit Ethernet, compared to the slower access speeds and latencies associated with disk drives.</p> Signup and view all the answers

What dynamic adjustments are made to physical memory in GMS based on memory pressure?

<p>Physical memory is dynamically split into local memory for processes and global memory for storing pages from peers, adjusting based on the node's activity.</p> Signup and view all the answers

How does GMS ensure fault tolerance during node crashes?

<p>GMS ensures fault tolerance by storing clean pages in the cluster memory on the disk, preventing data loss during crashes.</p> Signup and view all the answers

What is meant by the term 'dirty pages' in the context of GMS?

<p>Dirty pages refer to modified pages that must be written back to the disk to ensure data is not lost.</p> Signup and view all the answers

What advantages does GMS provide in handling memory pressure compared to traditional paging systems?

<p>GMS reduces reliance on slow disk access by utilizing idle memory from other nodes, leading to faster data retrieval.</p> Signup and view all the answers

In the memory hierarchy with GMS, where is cluster memory positioned?

<p>Cluster memory is positioned between main memory and disk in the memory hierarchy.</p> Signup and view all the answers

Why is the coherence of shared pages a concern in GMS, and who is responsible for it?

<p>The coherence of shared pages is a concern because GMS does not handle it; the application must ensure coherence among processes accessing those pages.</p> Signup and view all the answers

How does GMS handle the eviction of pages from physical memory?

<p>GMS can send pages to a peer node's memory instead of writing them to disk, allowing for efficient management of memory resources.</p> Signup and view all the answers

What happens in a system when a node misses retrieving a page due to stale POD information?

<p>The node retries by consulting the updated POD or going to the updated GCD to retrieve the page from the correct node or disk.</p> Signup and view all the answers

In the common case, why is page fault handling considered fast?

<p>In most situations, the POD and GCD are co-resident on the same node, minimizing network communication for lookups.</p> Signup and view all the answers

What triggers a node's paging daemon to start evicting pages?

<p>The paging daemon starts evicting pages when the free list of available memory falls below a pre-defined threshold.</p> Signup and view all the answers

What role does weight information play in the page eviction process?

<p>Weight information is used to select a candidate node that can host the evicted page based on its load or replacement history.</p> Signup and view all the answers

How does the paging daemon in GMS differ from traditional paging daemons in virtual memory systems?

<p>Unlike traditional daemons that send pages to disk, the GMS paging daemon sends the oldest pages to another node's memory.</p> Signup and view all the answers

What process must occur after a page is sent to a new node during eviction?

<p>The Global Cache Directory (GCD) must be updated to reflect the new node as the Page Frame Directory (PFD) holder for the UID.</p> Signup and view all the answers

What is the purpose of retrying after a miss in page retrieval?

<p>Retrying allows the node to consult updated information, ensuring it retrieves the page from the correct node or disk.</p> Signup and view all the answers

Why are misses considered relatively infrequent in page retrieval processes?

<p>Misses are uncommon because they typically occur due to page replacement not communicated to the GCD or outdated POD information.</p> Signup and view all the answers

What is the significance of handling page evictions in batches?

<p>Batch handling minimizes overhead associated with frequent updates and ensures smoother system performance.</p> Signup and view all the answers

How does GMS ensure efficient management of page ages across the cluster?

<p>GMS implements global age management to distribute load evenly among nodes while optimizing memory usage.</p> Signup and view all the answers

What is the primary goal of the Virtual Memory (VM) system in OSF/1?

<p>To map process virtual address space to physical memory and manage page faults.</p> Signup and view all the answers

How does the Unified Buffer Cache (UBC) enhance file system performance?

<p>By caching disk-resident files in physical memory for faster access.</p> Signup and view all the answers

What modification was necessary for integrating GMS into the OSF/1 memory system?

<p>Modifying the VM and UBC to interact with cluster memory instead of disk.</p> Signup and view all the answers

What role does the Pageout Daemon play in memory management?

<p>It identifies pages that can be swapped out to free up physical memory.</p> Signup and view all the answers

In the GMS system, what does the Virtual Memory Manager do when a page fault occurs?

<p>It requests the missing page from the GMS, checking both remote memory and disk.</p> Signup and view all the answers

What is the primary function of the Free List in OSF/1's memory management?

<p>To maintain a list of available physical page frames for the VM and UBC.</p> Signup and view all the answers

Explain the significance of collecting age information for pages in GMS.

<p>It is crucial for approximating the global Least Recently Used (LRU) algorithm.</p> Signup and view all the answers

What challenge does the GMS face in tracking age information for anonymous pages?

<p>Memory accesses occur at the hardware level and are not directly observable by the OS.</p> Signup and view all the answers

What happens to dirty pages during the page eviction process in GMS?

<p>Dirty pages are written to disk to maintain system reliability.</p> Signup and view all the answers

How does GMS handle page faults compared to the traditional system?

<p>It queries cluster memory first for missing pages instead of defaulting to disk access.</p> Signup and view all the answers

Why is the modification of handling global page replacement significant in GMS?

<p>It allows for better coordination of memory resources across nodes in the cluster.</p> Signup and view all the answers

What does the TLB (Translation Lookaside Buffer) store, and why is it utilized in GMS?

<p>It stores recent translations of virtual addresses to physical memory addresses to track page accesses.</p> Signup and view all the answers

What change occurs in the UBC when handling page faults in the GMS?

<p>The UBC queries GMS first for missing pages before accessing the disk.</p> Signup and view all the answers

How does the GMS integration influence the overall architecture of OSF/1?

<p>It requires significant modifications to memory management at the system level.</p> Signup and view all the answers

What is the purpose of the Page Ownership Directory (POD) in a distributed system?

<p>The POD tells each node which part of the Global Cache Directory (GCD) to consult for a given UID.</p> Signup and view all the answers

How does a node determine which Page Frame Directory (PFD) contains the mapping for a given UID?

<p>The node queries the relevant part of the GCD to find the corresponding PFD for the UID.</p> Signup and view all the answers

Explain how a node handles a page fault in a distributed system.

<p>Upon a page fault, the node converts the virtual address to a UID and consults the POD to find the GCD owner.</p> Signup and view all the answers

What happens if the page is no longer in memory during a page retrieval?

<p>The PFD directs the node to the disk location where the page is stored.</p> Signup and view all the answers

Why is the communication with the POD always local?

<p>The POD is replicated across all nodes, ensuring that access is always local.</p> Signup and view all the answers

Describe the efficiency considerations related to network communication during page fault handling.

<p>Network communication is acceptable as it is often faster than disk access, making it efficient.</p> Signup and view all the answers

What is a common case optimization during page fault handling in a distributed system?

<p>In most cases, non-shared pages allow local handling of both the POD and GCD.</p> Signup and view all the answers

What are the potential consequences of stale POD information?

<p>Stale POD information can lead to the wrong node being contacted for a UID.</p> Signup and view all the answers

How does the node retrieve a page located at another node?

<p>The node sends a request to the owner node, which then queries the appropriate PFD to locate the page.</p> Signup and view all the answers

What is the significance of the Global Cache Directory (GCD)?

<p>The GCD maps UIDs to the node responsible for the relevant PFD, streamlining the query process.</p> Signup and view all the answers

What role does the Page Frame Directory (PFD) play in memory management?

<p>The PFD provides the final mapping of a UID to either a physical page frame in memory or to a disk location.</p> Signup and view all the answers

How can page replacement affect the request fulfillment process?

<p>If a page is evicted while a request is pending, the requesting node might get a page miss.</p> Signup and view all the answers

What occurs when a node sends a request to another node during a page fault?

<p>The request may result in a miss if the target node has already evicted the requested page.</p> Signup and view all the answers

Summarize the overall process of handling a page fault.

<p>The node converts the virtual address to a UID, consults the POD for the GCD owner, then retrieves the page from the corresponding PFD.</p> Signup and view all the answers

What is the primary function of GMS in memory management?

<p>GMS functions as a paging facility that stores swapped-out pages in global memory, acting as a cache similar to disk storage in traditional systems.</p> Signup and view all the answers

How does GMS decide which page to replace when memory pressure increases?

<p>GMS uses a variant of the Least Recently Used (LRU) algorithm, selecting the globally oldest page for replacement.</p> Signup and view all the answers

Describe the memory structure of each host in GMS.

<p>Each host has local memory for the working set of processes and global memory that acts as a cache for swapped-out pages from other nodes.</p> Signup and view all the answers

What occurs in Host P's memory allocation when it encounters a page fault for page X and finds it in Host Q's global cache?

<p>Host P receives page X from Host Q, increasing its local memory by one and evicting the oldest page from its global memory to maintain total memory balance.</p> Signup and view all the answers

In the case of extreme memory pressure on Host P, what is the strategy for handling a page fault when no global memory is available?

<p>Host P must evict a page from its local memory (working set) to make room for the new page, as it cannot utilize global memory.</p> Signup and view all the answers

What happens when a page fault occurs and the required page is not available in any cluster memory?

<p>Host P retrieves the page from disk, increasing its local memory allocation and evicting a page from global memory to maintain space.</p> Signup and view all the answers

Explain the memory adjustment process for Host R when it receives an evicted page from Host P.

<p>Host R must check if its globally oldest page is in global memory; if clean, it can discard it, otherwise, it must write it to disk before making room for the new page.</p> Signup and view all the answers

What is the impact on total physical memory of a host when page transfer occurs between Host P and Host Q?

<p>The total physical memory on each host remains unchanged, as the swap simply reallocates pages between local and global memory.</p> Signup and view all the answers

How does GMS handle the coherence of shared pages in memory?

<p>Coherence of shared pages is managed by the application and not by GMS, meaning the application is responsible for ensuring shared page consistency.</p> Signup and view all the answers

What key technical challenge does GMS face when managing page replacement?

<p>The challenge lies in effectively managing the age information of pages across the cluster to accurately select the oldest page for replacement.</p> Signup and view all the answers

In GMS, what adjustment needs to occur in Host P's memory allocation during a page fault when it increases local memory?

<p>Host P must decrease its global memory by one page to accommodate the new page, ensuring the total physical memory remains unchanged.</p> Signup and view all the answers

When Host R receives a page from Host P, what condition determines whether Host R can simply discard its oldest page?

<p>If the globally oldest page at Host R is clean and in global memory, it can be discarded without further action.</p> Signup and view all the answers

Identify the role of global memory in the context of GMS.

<p>Global memory acts as a cache for pages swapped out by peers, providing a temporary storage solution for dynamically allocated resources.</p> Signup and view all the answers

What effect does a page fault have on Host P's memory distribution during standard page fault handling?

<p>During standard handling, Host P's local memory increases while the global memory decreases by one page, keeping total memory constant.</p> Signup and view all the answers

What is the significance of dynamically managing memory allocation between local and global memory in GMS?

<p>Dynamically managing memory allows GMS to optimize the use of cluster memory and reduce reliance on slower disk storage.</p> Signup and view all the answers

Study Notes

Distributed Systems: Definitions and Principles

  • Object technology, specifically inheritance and reuse, is key to structuring distributed services.
  • Technological innovation frequently originates in academia where researchers are free from market pressures and existing product lines.
  • Java arose from a failed attempt to create a video-on-demand system in the 1990s, highlighting the potential for valuable byproducts to emerge from research.
  • Distributed systems often prioritize efficient memory utilization.
  • Three primary subsystems, each focused on memory optimization:
    • Global Memory System (GMS) - efficient paging across a LAN.
    • Distributed Shared Memory (DSM) - simulating shared memory abstractions for programmers.
    • Distributed File System (DFS) - using cluster memory for file caching.

Memory Management in Distributed Systems

  • Memory is a critical resource in distributed systems where idle memory on peers within a network can be leveraged for local memory shortages.
  • The Global Memory System (GMS) solves the challenge of scarce local memory by utilizing idle memory from other nodes on the network, reducing the need for disk access.
  • Network speed (Gigabit Ethernet, 10Gbps) is essential for making network memory access viable and potentially faster than disk access.
  • GMS keeps a copy of all pages on the disk for fault tolerance, mitigating the loss of clean pages in the event of a node crash.

Global Memory System (GMS) - Core Functionality

  • The memory hierarchy with GMS includes: Processor, Caches, Main Memory, Cluster Memory, and Disk (used only for data not in cluster memory).
  • For page faults, GMS first examines cluster memory before accessing the disk, reducing dependence on slower disk.
  • Evicted pages can be sent to peer nodes instead of the disk, improving access time when needed later.

Community Memory Service (CMS)

  • GMS splits physical memory into local and global sections.
    • Local: Stores the working set of running processes (private or shared).
    • Global: Stores swapped-out pages from peers, functioning as a memory cache for peers.
  • This split is dynamic, adjusting based on local memory pressure.
  • GMS does not handle coherence for shared pages. Responsibility for ensuring coherence lies with the application.
  • Page replacement employs a globally oldest page policy, where the oldest page in the cluster is replaced, which requires managing age information across nodes.

GMS Page Fault Handling

  • Case 1: Page Found in Global Cache: Host P encounters a page fault, locates the page in global memory, retrieves the page from the host with the global cache.
  • Case 2: Extreme Memory Pressure: Hosts global memory is depleted and must evict a page from its working set to accommodate a new page.
  • Case 3: Page Only on Disk: The page must be fetched from the disk. One page in the global cache is evicted and sent to a peer host with the globally oldest page.
  • Case 4: Handling Shared Page: GMS copies the shared page to the requesting host, increasing the cluster's memory pressure. GMS does not handle coherence for shared pages.

GMS Behavior and Node Activity

  • GMS swaps pages between nodes, allowing idle nodes to act as memory caches for other nodes.
  • Idle nodes gradually transition into memory servers, dedicating their resources to storing pages for peers.
  • The local and global memory split is dynamic, constantly changing based on node activity and memory pressure.

Age Management in GMS

  • Aims to identify the globally oldest page for replacement across nodes in a distributed system.
  • Prioritizes distributed management to avoid overloading any single node.

Epoch-Based Management

  • Management is divided into epochs, each with a maximum duration (T) and a maximum number of page replacements (M).
  • Epochs end when either T or M is reached.
  • A new manager node, called the initiator, is selected for the next epoch.

Process During Each Epoch

  • Nodes send age information (indicating page usage) to the initiator at the start of each epoch.
  • Smaller age indicates more relevant pages (recently used), larger age indicates less relevant pages.
  • The initiator calculates the minimum age of the pages to be replaced in the upcoming epoch.
  • Pages older than the minimum age are replacement candidates.
  • Pages younger than the minimum age survive to the next epoch.
  • The initiator assigns each node a replacement weight, representing the fraction of pages anticipated for replacement from that node.
  • Nodes receive the minimum age, their own weight, and the weights of other nodes.

Dynamic Initiator Assignment

  • The initiator role is not static to prevent overburdening a single node.
  • The least active node (with the highest weight) becomes the initiator for the next epoch.
  • All nodes receive the weight distribution from the current initiator and can locally determine the next initiator.

Age Management and Replacement Decision

  • The minimum age represents the M oldest pages across all nodes.
  • A page fault triggers replacement of a page (page y), depending on its age.
  • If page y's age is greater than the minimum age, it's a replacement candidate and can be discarded.
  • If page y's age is less than the minimum age, it's active and should be sent to a peer for storage in their global cache.

Choosing a Peer

  • The node uses the weight distribution to choose a peer to send the page.
  • Higher weight nodes are more likely candidates for eviction, but the choice is not rigid.
  • Weight influences the decision but does not completely control it.

Approximation of Global LRU

  • The GMS algorithm approximates global least recently used (LRU) page replacement.
  • This is achieved by gathering information from all nodes about page ages and computing minimum age and weight at the start of each epoch.
  • Each node then makes localized decisions based on the age and weight information during the epoch.

GMS Implementation in Unix

  • The GMS concept requires modifications to the operating system to redirect page fault handling to cluster memory instead of the disk.
  • Modifications are made to the virtual memory (VM) and unified buffer cache (UBC) to interact with the GMS.
  • GMS collects age information from both VM and UBC, which can be challenging for anonymous pages in VM, requiring periodic TLB dumps.
  • The pageout daemon collaborates with GMS to place clean pages in cluster memory instead of discarding them.
  • The free list interacts with GMS for distributed page frame management across the cluster.

Data Structures in GMS

  • GMS uses distributed data structures for cluster-wide virtual memory management.
  • UID (Universal ID): A global identifier derived from the virtual address.
  • Page Frame Directory (PFD): Maps UIDs to physical page frames or disk locations, similar to a cluster-wide page table.
  • Global Cache Directory (GCD): Manages the mapping between UIDs and nodes that hold their PFDs.
  • Page Ownership Directory (POD): Tracks ownership information for pages and ensures memory consistency across the cluster.

Virtual Address to UID Conversion

  • Virtual address (VA) is local to a single processor.
  • UID is a global identifier, combining components like IP address, disk partition, i-node, and offset.

Data Structures Continued

  • Global Cache Directory (GCD): A partitioned hash table spread across the cluster, avoiding the need for broadcasting.
  • Page Ownership Directory (POD): Replicated on all nodes, ensuring all nodes have consistent ownership information.
  • Page Frame Directory (PFD): Provides the final mapping between UID and physical page frame or disk location.

Page Fault Handling Workflow

  • The virtual address is converted to a UID.
  • The POD is consulted to determine which node has the relevant portion of the GCD.
  • The GCD is queried to find the PFD corresponding to the UID.
  • The PFD is then queried for the UID to determine the page's location.

Dynamic Nature of the POD

  • The POD is updated only when nodes are added or removed from the cluster.
  • When updates occur, the POD is redistributed and replicated across all nodes.

Key Takeaways

  • The GCD enables efficient mapping of UIDs to the corresponding PFD, avoiding broadcasts.

  • The POD provides information about which part of the GCD to consult.

  • The PFD provides the final mapping, facilitating efficient distributed page fault handling.### Handling Page Faults

  • When a page fault occurs, the node responsible for the fault converts the virtual address to a UID (Universal ID), a global identifier for the page within the cluster.

  • The node then consults the local copy of the Page Ownership Directory (POD) which is replicated across all nodes. The POD indicates which node manages the Global Cache Directory (GCD) for the given UID.

  • The node sends the UID to the owner node, which then queries its Global Cache Directory (GCD) to determine which node holds the Page Frame Directory (PFD) for the UID. The owner node forwards the UID to the node with the PFD.

  • The node with the PFD then retrieves the page from its memory or disk and sends it back to the node that encountered the fault.

  • Retrieving the page from another node is considered comparable to disk access in traditional systems, making the network communication overhead acceptable.

  • In the common scenario where the page is not shared, the POD and GCD reside on the same node, eliminating extra network communication for lookup. This significantly speeds up the process.

Possible Miss Scenarios

  • When a page is evicted from a node's memory, the GCD might not be updated immediately.
  • If the node that encountered the page fault requests the page before the GCD update, the retrieval will fail, resulting in a "miss."
  • Stale information in the POD, caused by changes in the UID space distribution, can also lead to misses.
  • This occurs when a node contacts the wrong node based on outdated POD information, resulting in an incorrect routing of the request.
  • Misses are relatively infrequent and are handled by retrying the retrieval process after consulting the updated POD or GCD.

Page Eviction Process

  • The paging daemon in GMS manages page evictions in batches, triggering them when free memory falls below a certain threshold.
  • When a node decides to evict a page, it sends the page to another node in the cluster, using weight information to select a suitable candidate.
  • Unlike traditional systems where pages are sent to disk on eviction, GMS sends evicted pages to another node's memory.
  • The paging daemon also updates the GCD to reflect the new location of the evicted page.
  • This process involves sending an update message to the UID owner, ensuring the GCD accurately maps the UID to the new node's PFD.

GMS Overview

  • GMS leverages network memory as a paging device, bypassing traditional disk access for faster performance.
  • Efficient global age management across the cluster ensures balanced load distribution, preventing any single node from being overwhelmed.
  • Cluster-wide memory management in GMS utilizes distributed data structures (POD, GCD, PFD) to manage pages across the cluster. The paging daemon serves as a central coordinator for local page management and GMS interactions, ensuring smooth and efficient page evictions and updates.
  • GMS is designed to minimize overhead while maintaining good performance during page faults and evictions.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Description

Explore the foundational concepts and principles of distributed systems, focusing on memory management techniques. This quiz covers object technology, subsystems like Global Memory System, Distributed Shared Memory, and Distributed File System, as well as the significance of efficient memory utilization. Understanding these topics is essential for anyone studying or working in distributed computing.

More Like This

Use Quizgecko on...
Browser
Browser