ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalDC-323Async Sync Computation…
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    DC-323

    Parallel & Distributed Computing

    Progress0 / 35 done
    Topics35
    1Asynchronous/synchronous computation/communication2Concurrency control3Fault tolerance4GPU architecture and programming5Heterogeneity6Interconnection topologies7Load balancing8Memory consistency model9Memory hierarchies10Message passing interface (MPI)11MIMD/SIMD12Multithreaded programming13Parallel algorithms & architectures14Parallel I/O15Performance analysis and tuning16Power considerations17Programming models18Data parallel programming19Task parallel programming20Process-centric programming21Shared memory programming22Distributed memory programming23Scalability and performance studies24Scheduling25Storage systems26Synchronization27Parallel computing tools28CUDA, Swift29Globus, Condor30Amazon AWS, OpenStack31Cilk32GDB for parallel debugging33Threads programming34MPICH, OpenMP35Hadoop, FUSE
    5 min read
    Topic 1 of 35
    Topic Study Note Illustration
    01

    Asynchronous/synchronous computation/communication

    Asynchronous and synchronous computation/communication refer to how tasks and processes in parallel and distributed systems coordinate and interact with one another. These concepts are central to system...

    Asynchronous and synchronous computation/communication refer to how tasks and processes in parallel and distributed systems coordinate and interact with one another. These concepts are central to system performance, fault tolerance, scalability, and efficiency. Let’s break down each of these terms.

    1. Synchronous Computation:

    Synchronous computation means that processes or tasks must follow a fixed sequence of operations where each process waits for the others to finish certain operations before it can continue. The key characteristic is that all involved processes synchronize at specific points in the computation, which can lead to delays or bottlenecks if one process is slow.

    Example: Consider a system where three processes (P1, P2, P3) are working together to perform a computation. In a synchronous system, P1 must wait for P2 and P3 to complete a particular step before moving to the next. If one of them is delayed, the entire system might have to wait, slowing the overall process.

    2. Synchronous Communication:

    Synchronous communication means that when a process sends a message, it waits for the response before proceeding. In other words, the sender and receiver must synchronize and be available at the same time. If the receiver is busy or unavailable, the sender will be blocked until it gets a response.

    Example: In a client-server model, the client sends a request to the server and waits for the server to process the request and return a response. The client is blocked until the server responds, meaning the client cannot continue its task during this waiting period.

    Advantages of Synchronous:

    • Easier to reason about since the order of operations is predictable.
    • Ensures strong consistency between tasks, making it easier to manage dependencies.

    Disadvantages of Synchronous:

    • Can cause inefficiencies, as processes have to wait for others, leading to idle time.
    • Susceptible to delays or bottlenecks if one task is slower than others.

    3. Asynchronous Computation:

    Asynchronous computation allows processes to work independently, without needing to wait for other processes to complete. Each process operates at its own pace, and tasks can overlap in time. This can lead to better resource utilization and more parallelism, as processes don't have to block waiting for others.

    Example: Imagine a parallel computation where three processes (P1, P2, and P3) are performing different tasks on independent pieces of data. In an asynchronous system, each process can complete its task without waiting for the others. If one process takes longer, the other processes can continue without being blocked.

    4. Asynchronous Communication:

    Asynchronous communication allows a process to send a message and continue executing without waiting for a reply. The sender does not block its execution while waiting for the receiver to respond, which allows the system to continue processing other tasks.

    Example: In a distributed system, a worker process may send a message to another worker to request some data, and then continue executing other tasks while waiting for the data to be returned. Once the data arrives, the worker can handle it when it’s ready, without being blocked.

    Advantages of Asynchronous:

    • Better performance, as tasks can continue without waiting for others.
    • Improved resource utilization, as the system does not sit idle while waiting for a response.
    • Scalability increases, especially in systems with a large number of processes or in systems with high latency.

    Disadvantages of Asynchronous:

    • Harder to manage and debug, as tasks may not complete in the expected order.
    • Potential for race conditions, where the timing of processes’ interactions could lead to errors if not properly handled.
    • More complex error handling and synchronization mechanisms may be required.

    Comparison of Synchronous and Asynchronous Communication and Computation:

    Aspect Synchronous Asynchronous
    Coordination Requires waiting for others to complete before proceeding. Processes can proceed without waiting.
    Performance Can lead to bottlenecks and idle time, slowing down the system. Typically better performance due to parallel execution and reduced waiting time.
    Complexity Easier to manage and debug due to predictable execution order. More complex to design and debug due to non-blocking behavior and the need for handling concurrency.
    Resource Utilization Can result in idle time if one process is slow. Better utilization of resources as processes continue executing.
    Fault Tolerance Processes depend on each other, which may cause failures if one process is delayed. More resilient as processes don't block waiting for others and can handle partial failures.
    Consistency Easier to maintain strong consistency between tasks. Requires careful handling of consistency, especially if tasks depend on each other.

    When to Use Synchronous vs. Asynchronous:

    • Synchronous models are suitable for systems where tasks depend on each other’s results, or where consistency and coordination are critical. Examples include database transactions, systems requiring strong consistency, or systems with relatively low concurrency.

    • Asynchronous models are ideal for high-performance systems, real-time systems, or those requiring scalability and responsiveness. Asynchronous computation is useful when tasks are independent, such as web servers handling multiple client requests concurrently, or in parallel computing where tasks operate on separate data sets.

    Hybrid Approach:

    In many modern systems, a hybrid approach is used where both synchronous and asynchronous techniques are combined. For example, some parts of the system may use synchronous communication to ensure data consistency, while others may use asynchronous communication to maximize throughput and parallelism. This combination allows a balance between performance and reliability.

    In summary, understanding when and how to use synchronous versus asynchronous computation and communication is crucial in designing efficient and scalable parallel and distributed systems.

    Next topic 2 →
    Concurrency control

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    5mremaining
    894words
    Beginnerlevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Parallel & Distributed Computing