`
jubincn
  • 浏览: 242578 次
  • 性别: Icon_minigender_1
  • 来自: 宁波
文章分类
社区版块
存档分类
最新评论

Concurrency vs Parallelism, Concurrent Programming vs Parallel Programming

 
阅读更多
THIS BLOG HAS BEEN MOVED TOtouchdreams.net/blog.

In the danger of hairsplitting, ...

ConcurrencyandparallelismareNOTthe same thing. Two tasksT1andT2are concurrent if the order in which the two tasks are executed in time is not predetermined,

  • T1may be executed and finished beforeT2,
  • T2may be executed and finished beforeT1,
  • T1andT2may be executed simultaneously at the same instance of time (parallelism),
  • T1andT2may be executed alternatively,
  • ...

If two concurrent threads are scheduled by the OS to run on one single-core non-SMT non-CMP processor, you may get concurrency but not parallelism. Parallelism is possible on multi-core, multi-processor or distributed systems.

Concurrencyis often referred to as a property of a program, and is a concept more general thanparallelism.

Interestingly, wecannotsay the same thing forconcurrent programmingandparallel programming. They are overlapped, but neither is the superset of the other. The difference comes from the sets of topics the two areas cover. For example, concurrent programming includes topic like signal handling, while parallel programming includes topic like memory consistency model. The difference reflects the different orignal hardware and software background of the two programming practices.

Update:More on Concurrency vs ParallelismTHIS BLOG HAS BEEN MOVED TOtouchdreams.net/blog.

分享到:
评论

相关推荐

    Parallel and Concurrent Programming in Haskell

    size ts all programming model for concurrency and parallelism exists, and so prematurely committing to one particular paradigm is likely to tilt the language towards favouring certain kinds of problem...

    [Parallel and Concurrent Programming in Haskell 2013 7 ] Simon Marlow 文字版

    《Parallel and Concurrent Programming in Haskell 2013》是Simon Marlow所著的一本关于Haskell编程语言在并行与并发编程方面的专著。在这本书中,作者深入探讨了Haskell语言的并行与并发能力,以及如何有效地利用...

    Parallel_and_Concurrent_Programming_in_Haskell

    标题《Parallel and Concurrent Programming in Haskell》和描述表明,该文件是一本专注于Haskell语言在并行和并发编程领域的深入探讨。Haskell,作为一门纯粹的、懒惰的函数式编程语言,为开发者提供了强大的抽象...

    JavaScript Concurrency pdf 无水印 0分

    Learn how concurrent and parallel programming can help you tackle the challenges of fast, data heavy web development Who This Book Is For This book is written for any JavaScript developer who wants to...

    .NET Design Patterns [Kindle Edition]

    Be able to implement concurrent/parallel programming techniques using idioms under .NET Avoiding pitfalls when creating compositional, readable, and maintainable code using imperative, functional, and...

    Mastering.Csharp.Concurrency

    You will explore the concepts of parallelism granularity, and fine-grained and coarse-grained parallel tasks by choosing a concurrent program structure and parallelizing the workload optimally....

    Mastering C# Concurrency

    You will explore the concepts of parallelism granularity, and fine-grained and coarse-grained parallel tasks by choosing a concurrent program structure and parallelizing the workload optimally....

    Packt.Mastering.Csharp.and.NET.Programming

    - **.NET 4.5.x**: Introduces asynchronous programming, enhanced file I/O, and improved support for parallelism. - **.NET 4.6 (Aligned with Visual Studio 2015)**: Enhancements include improved ...

    Haskell Data Analysis Cookbook(PACKT,2014)

    The meat of data analysis occurs in the topics involving statistical techniques, parallelism, concurrency, and machine learning algorithms, along with various examples of visualizing and exporting ...

    jdk1.8_win32.rar

    - JDK 8 introduces the `java.util.concurrent.ForkJoinPool` and `ForkJoinTask` classes, which are designed for parallelism using the Fork/Join framework. They improve the performance of recursive ...

    C++AMP用 visual c++加速大规模并行计算源码

    `concurrency::parallel_for_each`函数可用于在张量的所有元素上并行执行一个函数。 4. **计算上下文(Concurrent Context)**:在C++ AMP中,计算是在一个特定的设备(如GPU)上执行的。`concurrency::accelerator...

    C#并行编程高级教程(中文版)

    并行(Parallelism)是指同时执行多个任务,充分利用多核处理器的计算能力,以提高程序运行速度。而并发(Concurrency)则关注于在单个CPU或多个CPU上同时管理多个任务的执行,使它们看起来像是同时进行的。C#中的...

    C++ AMP

    4. **并行区域(Parallel Region)**: 使用`concurrency::parallel_for_each`函数可以指定代码块在GPU上并行执行。这个函数接受一个范围和一个函数对象,函数对象将在每个元素上并行运行。 5. **计算流(Compute ...

    LACPP_Project

    LACPP_项目使用 Sobel 算子的顺序、线程和基于任务的边缘检测算法。 ####如何构建由于 OpenCV 用于加载图像,因此在构建时必须链接 OpenCV 的库。 提供指向包含 OpenCV 的库路径的链接。 (例如:-L/usr/lib/i386-...

    Windows并发编程指南pdf

    设计用于并发.NET程序的可重用库 (Designing Reusable Libraries for Concurrent .NET Programs) - **并发.NET库的设计原则** - 如何设计高效且易于使用的并发.NET库。 - 并发.NET库的设计模式及其最佳实践。 -...

    python3.6.5参考手册 chm

    Text Vs. Data Instead Of Unicode Vs. 8-bit Overview Of Syntax Changes New Syntax Changed Syntax Removed Syntax Changes Already Present In Python 2.6 Library Changes PEP 3101: A New Approach To ...

Global site tag (gtag.js) - Google Analytics