ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Parallel & Distributed Computing
    COMP3139
    Progress0 / 33 topics
    Topics
    1. Introduction to Parallel and Distributed Systems2. Why Use Parallel and Distributed Systems?3. Speedup and Amdahl's Law4. Hardware Architectures: Multi Processors (Shared Memory)5. Hardware Architectures: Networks of Workstations (Distributed Memory)6. Hardware Architectures: Clusters (Latest Variation)7. Software Architectures: Threads and Shared Memory8. Software Architectures: Processes and Message Passing9. Software Architectures: Distributed Shared Memory (DSM)10. Software Architectures: Distributed Shared Data (DSD)11. Parallel Algorithms12. Concurrency and Synchronization13. Data and Work Partitioning14. Common Parallelization Strategies15. Granularity16. Load Balancing17. Examples of Parallel Algorithms: Parallel Search18. Examples of Parallel Algorithms: Parallel Sorting19. Shared-Memory Programming20. Threads in Shared-Memory Programming21. P Threads22. Locks and Semaphores23. Distributed-Memory Programming24. Message Passing25. Map Reduce26. Distributed-Memory Programming with PI27. Google's Map Reduce28. Hadoop29. Other Parallel Programming Systems30. Tread Marks31. Distributed Shared Memory32. Aurora: Scoped Behavior and Abstract Data Types33. S Enterprise: Process Templates
    COMP3139›Tread Marks
    Parallel & Distributed ComputingTopic 30 of 33

    Tread Marks

    8 minread
    1,377words
    Intermediatelevel

    TreadMarks: A Shared Memory System for Distributed Memory Architectures

    TreadMarks is a software system designed for parallel programming in distributed memory architectures. It allows processes running on different nodes of a distributed system to share a common memory space. Unlike traditional shared memory systems where multiple processors access the same physical memory, TreadMarks uses distributed shared memory (DSM) to simulate the effect of shared memory in a distributed environment.

    TreadMarks was designed primarily to ease the development of parallel applications on distributed systems such as clusters or networks of workstations (NOWs) where each machine has its own local memory. The system allows parallel programs to use a global address space, which can be accessed by any process, regardless of the node on which it is running.


    Key Features of TreadMarks

    1. Distributed Shared Memory (DSM):

      • TreadMarks provides a global address space across multiple machines in a distributed environment. Each process in the system can access shared memory locations as though they were part of its own local memory.
      • The system uses a page-based model, where memory is divided into fixed-size pages. These pages are distributed across the memory of different nodes in the cluster, and TreadMarks takes care of consistency and coherence.
    2. Memory Coherence:

      • To ensure that multiple processes can safely access shared memory, TreadMarks implements mechanisms to maintain memory coherence, meaning that updates to shared memory are visible across all nodes in the system.
      • It uses page migration and faulting strategies to maintain consistency, ensuring that processes have the latest version of the memory they are accessing. When one process modifies a page, TreadMarks ensures that other processes can either access the updated version of that page or are notified that a change has occurred.
    3. Lazy Release Consistency:

      • TreadMarks employs a lazy release consistency model, meaning that memory consistency is not enforced immediately after every write. Instead, consistency is enforced when synchronization points (such as barriers) are encountered, allowing for more efficient communication and reducing the overhead of frequent updates.
      • This model is a compromise between strict consistency and performance, and it works well in scenarios where fine-grained consistency is not critical for the application.
    4. Transparent Communication:

      • One of the key advantages of TreadMarks is that it abstracts away the complexity of communication between distributed processes. For developers, using TreadMarks feels like using a shared memory system, but under the hood, TreadMarks handles all the network communication.
      • The system provides an API that allows developers to create shared memory regions and perform read/write operations as if they were accessing local memory, with TreadMarks ensuring that all necessary synchronization and communication happens in the background.
    5. Scalability:

      • TreadMarks was designed with scalability in mind. It can handle a large number of nodes and processes, making it suitable for a variety of distributed systems. The system’s design ensures that performance degrades gracefully as the number of nodes in the system increases, although the overhead of maintaining memory coherence does increase with larger systems.
    6. Fault Tolerance:

      • TreadMarks provides a degree of fault tolerance by using mechanisms like page replication. If a process or node fails, the system can recover by migrating pages from other nodes, ensuring that computation can continue with minimal disruption.
      • However, TreadMarks was not designed to be a fully fault-tolerant system in the same way as some distributed file systems or databases, so fault tolerance is generally a concern in large, unreliable clusters.

    How TreadMarks Works

    1. Memory Allocation:

      • When a program starts, TreadMarks creates a shared memory region that can be accessed by processes running on different nodes. Each process can read and write to this memory, and TreadMarks ensures that changes are propagated to other processes as needed.
    2. Page-based Distribution:

      • Memory is divided into pages (typically 4KB or 8KB) that are distributed across the nodes. Each page may reside in the local memory of a node or may be swapped between nodes depending on the access pattern.
      • When a process accesses a page that it does not have locally, TreadMarks brings the page from another node or a centralized server.
    3. Lazy Consistency:

      • Under the lazy release consistency model, the system does not immediately enforce synchronization after every memory write. Instead, it waits until synchronization points (like barriers or locks) are encountered, and only then does it ensure that all memory updates are visible to all processes.
    4. Communication:

      • TreadMarks uses message passing to facilitate communication between nodes. Whenever a process accesses a page that is not in its local memory, TreadMarks sends a message over the network to fetch the page.
      • The system can use remote memory access (RMA) to fetch or update memory from another node, allowing for efficient data transfer without the overhead of constant polling or synchronization.
    5. Synchronization:

      • TreadMarks provides synchronization primitives (such as barriers and locks) to manage access to shared memory and coordinate the execution of parallel processes. These synchronization mechanisms help maintain the integrity of the shared memory system and ensure that memory consistency is preserved when necessary.

    Advantages of TreadMarks

    1. Simplified Parallel Programming:

      • TreadMarks abstracts away the complexities of managing distributed memory systems, providing a shared memory abstraction that is easier to work with compared to traditional message-passing models like MPI. This can greatly simplify the development of parallel applications in distributed systems.
    2. Performance with Scalability:

      • By using a lazy release consistency model and minimizing the need for frequent synchronization, TreadMarks provides relatively high performance for many parallel applications, even in large-scale distributed systems.
    3. Compatibility with Existing Code:

      • Since TreadMarks works by emulating a shared memory system over a distributed architecture, it can often be used with existing parallel programs without requiring a complete rewrite. Many parallel programs that are written with shared memory models (like those using POSIX threads or OpenMP) can be adapted to run on TreadMarks with minimal changes.
    4. Flexibility:

      • TreadMarks can run on a variety of architectures, from small clusters of workstations to larger networks of machines, making it flexible and adaptable to different computing environments.

    Challenges and Limitations

    1. Overhead of Consistency Maintenance:

      • While TreadMarks provides good scalability, the overhead associated with maintaining memory consistency (especially as the system grows larger) can become significant. This overhead is particularly noticeable for programs with a lot of inter-process communication or fine-grained memory sharing.
    2. Fault Tolerance Limitations:

      • Although TreadMarks can recover from certain failures by migrating pages, it is not designed to handle more severe failures (such as node crashes) that might require more robust distributed fault tolerance mechanisms.
    3. Limited to Distributed Systems:

      • TreadMarks is designed specifically for distributed memory systems, meaning it may not be suitable for environments that use shared memory multiprocessors (SMPs) or other memory architectures without significant modifications.
    4. Less Widely Used:

      • While TreadMarks was an influential system in its time, it is no longer as widely used or actively developed. Many modern parallel programming frameworks like MPI, OpenMP, CUDA, and Apache Spark have largely replaced DSM systems for general-purpose parallel computing in both academic and industrial applications.

    TreadMarks Use Cases

    • Scientific Simulations:

      • TreadMarks was originally designed for use in scientific applications that require large-scale parallel processing, such as fluid dynamics simulations, climate modeling, and physics simulations.
    • Parallel Numerical Computation:

      • Programs requiring intensive mathematical computations with large datasets (e.g., matrix manipulations, linear algebra, optimization problems) can benefit from TreadMarks’ distributed memory system.
    • Shared Memory Abstraction:

      • TreadMarks is well-suited for parallel applications where a shared memory abstraction is needed, but the system architecture (e.g., clusters of machines) does not naturally support shared memory.

    Conclusion

    TreadMarks was a pioneering system that brought shared memory programming to distributed memory environments, offering a simpler model for parallel programming on clusters of computers. By abstracting the complexities of message-passing and memory consistency, it allowed developers to focus on writing parallel algorithms instead of managing low-level synchronization and communication.

    However, as distributed computing evolved, and new parallel programming models such as MPI, OpenMP, CUDA, and Apache Spark became more prevalent, TreadMarks has largely fallen into obsolescence in favor of newer, more robust, and widely adopted frameworks.

    Nevertheless, TreadMarks remains an important historical example of the potential for distributed shared memory systems and how they can simplify parallel programming across distributed architectures.

    Previous topic 29
    Other Parallel Programming Systems
    Next topic 31
    Distributed Shared Memory

    Past Papers

    Open this section to load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time8 min
      Word count1,377
      Code examples0
      DifficultyIntermediate