タグ

concurrentに関するrydotのブックマーク (7)

  • Build, Operate, and Secure Distributed Applications | Akka

    Build, Operate, and Secure Distributed Applications Simpler Concurrent & Distributed Systems Actors and Streams let you build systems that scale up, using the resources of a server more efficiently, and out, using multiple servers. Resilient by Design Building on the principles of The Reactive Manifesto Akka allows you to write systems that self-heal and stay responsive in the face of failures. Hi

    Build, Operate, and Secure Distributed Applications | Akka
  • STMの設計と進化

    Please select the category that most closely reflects your concern about the presentation, so that we can review it and determine whether it violates our Terms of Use or isn't appropriate for all viewers.

  • 並列と並行の違い - 氷雪の備忘録

    並列(Parallel)と並行(Concurrent)はあまり区別されなかったり、混同されていたりしますが別のことを指す言葉です。 よく見られるわかりやすい区別の仕方は、マルチスレッドのプログラムを一つのCPU上で実行している状態は並行で、複数のCPUで実行している状態は並列だというものです。一般的に言うと並行は「複数の実行の流れが一つの基準による順序性を持って(同期的に)実行されている状態」のことで、並列は「複数の実行の流れが基準を持たずに(非同期的に)実行されている状態」のことです。 「並列処理は実行順が不定なのが有害なので、プログラマーが同期プリミティブを用いて決定論的に動作するようにプログラミングすべきだ」という人がいたりしますが、非同期的な動作は並列処理の質なので、それを否定しつつ並列処理から何らかの恩恵を得たいというのは無理な話です。並列処理を行う場合は並列区間が非同期に実行

    並列と並行の違い - 氷雪の備忘録
  • STMで解く「食事する哲学者の問題」 - あどけない話

    Haskell で STM を使えばデッドロックがなくなる例として、事する哲学者の問題を考えてみる。 デッドロックするコード 事する哲学者の問題では、箸がロックの役割を果たす。Haskell の軽量スレッド間でロックを取るには、MVar を使えばよい。以下のコードを走らせると、その内デッドロックする。 module Main where import Control.Monad import Control.Concurrent import System.Random numOfPhilosopher :: Int numOfPhilosopher = 5 type Chopstick = MVar () newChopstick :: IO Chopstick newChopstick = newMVar () getChopstick :: Chopstick -> IO ()

    STMで解く「食事する哲学者の問題」 - あどけない話
  • A Very Brief Introduction to the Pi-Calculus (in Japanese)

    π-calculus 超入門 π-calculus は、80 年代の終わりごろに Milner らによって提案された並行計算のモデルの一つです。そこでは、プロセスと呼ばれる複数の独立した主体が、通信チャネルと呼ばれるデータの通り道を介して値をやりとりしながら、計算を行っていきます。π-calculus にはいろいろな変種があるのですが、ここではとりあえず次のような構成要素からなるものを考えましょう。 new x . P 新しいチャネル x を作ってから、プロセス P を実行する (channel creation) x![v1, ..., vn] チャネル x に値 v1, ..., vn を送る (asynchronous output) x?[v1, ..., vn] . P チャネル x から値 v1, ..., vn を受け取って、P を実行する (input guard) P |

  • π-calculus - Wikipedia

    In theoretical computer science, the π-calculus (or pi-calculus) is a process calculus. The π-calculus allows channel names to be communicated along the channels themselves, and in this way it is able to describe concurrent computations whose network configuration may change during the computation. The π-calculus has few terms and is a small, yet expressive language (see § Syntax). Functional prog

  • 7.26. Concurrent HaskellおよびParallel Haskell

    GHCは、並行プログラミングおよび並列プログラミングに対応するための、Haskellへの大規模な拡張をいくつか実装している。まず用語をはっきりさせておこう。 並列性(parallelism)とは、実行性能の向上を目的として、Haskellプログラムを複数のプロセッサ上で走らせることである。理想的には、これは不可視に、意味を変更することなく為されるべきである。 並行性(concurrency)とは、それぞれIOを行う複数のスレッドを使ってプログラムを実装することである。確かに並行Haskellプログラムは並列な機械上で走らせることができるが、並行性を使うのは、第一目的として実行性能を得るためではなく、それが当該プログラムを書くための最も単純で最も直接的な方法だからである。スレッドは入出力を行うので、プログラムの意味は必然的に非決定的なものになる。

  • 1