Week 3 Parallel Algorithms
Week 3 Parallel Algorithms
sv
by DARWIN VARGAS
Common Parallel Algorithms
1 Sorting Algorithms 2 Searching Algorithms
Parallel sorting algorithms, such as Parallel search algorithms, such as
merge sort and quicksort, efficiently parallel binary search, accelerate the
sort large datasets by dividing them process of finding specific elements
into smaller sub-problems that can within large datasets by dividing the
be processed concurrently. search space among multiple
processors.
In the shared memory model, multiple processors have In the distributed memory model, each processor has its
access to a common memory space. This allows own private memory. Processors communicate with each
processors to directly share data and synchronize their other through message passing, exchanging data and
operations. coordinating their actions.
Parallelism and Concurrency
Parallelism Concurrency
Parallelism refers to the Concurrency refers to the
simultaneous execution of ability of a system to handle
multiple tasks or operations, multiple tasks or requests at
leveraging multiple the same time, even if those
processing units to speed up tasks are not executing
computation. simultaneously. This often
involves managing shared
resources efficiently.
Divide-and-Conquer Strategies
1 Divide
The problem is divided into smaller, independent sub-
problems that can be solved concurrently.
2 Conquer
Each sub-problem is solved independently by a separate
processor or processing unit.
3 Combine
The solutions to the sub-problems are combined to
produce the final solution to the original problem.
Load Balancing and Scheduling
Load Balancing
Distributing tasks evenly among available processors to ensure optimal performance and prevent any single processor from becoming overloaded.
Scheduling
Determining the order in which tasks are executed on each processor, taking into account factors such as task dependencies and processor
availability.
Dynamic Allocation
Adjusting the allocation of tasks to processors dynamically based on changing workload and system conditions, ensuring efficient resource utilization.
Parallel Sorting Algorithms
Algorithm Description