Re: [Haskell-cafe] Proof of a multi-threaded application

2008-11-18 Thread Hans van Thiel
On Mon, 2008-11-17 at 05:52 -0700, Luke Palmer wrote: > On Mon, Nov 17, 2008 at 4:04 AM, Silviu ANDRICA <[EMAIL PROTECTED]> wrote: > > Hello, > > I am very new to Haskell, this is my first day, and I wanted to know if it > > is possible to prove correctness of a multi-threaded application writte

Re: [Haskell-cafe] Proof of a multi-threaded application

2008-11-18 Thread Ryan Ingram
On Tue, Nov 18, 2008 at 2:04 AM, Ketil Malde <[EMAIL PROTECTED]> wrote: > Yes. Fine grained - I'm thinking a large Array of TVars. (If you > only have a single TVar, it might as well be an MVar, no?) With only one I think that IORef + atomicModifyIORef might even be better! :) -- ryan ___

Re: [Haskell-cafe] Proof of a multi-threaded application

2008-11-18 Thread Neil Davies
On 18 Nov 2008, at 10:04, Ketil Malde wrote: Neil Davies <[EMAIL PROTECTED]> writes: You may not be asking the right question here. Your final system's performance is going to be influenced far more by your algorithm for updating than by STM (or any other concurrency primitive's) performance.

Re: [Haskell-cafe] Proof of a multi-threaded application

2008-11-18 Thread Ketil Malde
Neil Davies <[EMAIL PROTECTED]> writes: > You may not be asking the right question here. Your final system's > performance is going to be influenced far more by your algorithm for > updating than by STM (or any other concurrency primitive's) > performance. I may not be asking the right question,

Re: [Haskell-cafe] Proof of a multi-threaded application

2008-11-18 Thread Neil Davies
Ketil You may not be asking the right question here. Your final system's performance is going to be influenced far more by your algorithm for updating than by STM (or any other concurrency primitive's) performance. Others have already mentioned the granularity of locking - but that one of

Re: [Haskell-cafe] Proof of a multi-threaded application

2008-11-17 Thread Ryan Ingram
If you have multiple agents interacting with some structure and you want it to look like each of them is accessing it serialized, then STM is exactly what you want. The performance is always "in comparison to what"; you will likely get worse performance than the "best possible" implementation of y

Re: [Haskell-cafe] Proof of a multi-threaded application

2008-11-17 Thread Ketil Malde
"Tim Docker" <[EMAIL PROTECTED]> writes: >> My apologies for side-tracking, but does anybody have performance >> numbers for STM? I have an application waiting to be written using >> STM, boldly parallelizing where no man has parallelized before, but >> if it doesn't make it faster, > Faster tha

RE: [Haskell-cafe] Proof of a multi-threaded application

2008-11-17 Thread Tim Docker
Ketil Malde wrote: > My apologies for side-tracking, but does anybody have performance > numbers for STM? I have an application waiting to be written using > STM, boldly parallelizing where no man has parallelized before, but > if it doesn't make it faster, the whole excercise gets a lot less > co

Re: [Haskell-cafe] Proof of a multi-threaded application

2008-11-17 Thread Ketil Malde
"Luke Palmer" <[EMAIL PROTECTED]> writes: > STM My apologies for side-tracking, but does anybody have performance numbers for STM? I have an application waiting to be written using STM, boldly parallelizing where no man has parallelized before, but if it doesn't make it faster, the whole excerci

Re: [Haskell-cafe] Proof of a multi-threaded application

2008-11-17 Thread Luke Palmer
On Mon, Nov 17, 2008 at 4:04 AM, Silviu ANDRICA <[EMAIL PROTECTED]> wrote: > Hello, > I am very new to Haskell, this is my first day, and I wanted to know if it > is possible to prove correctness of a multi-threaded application written in > Haskell. > Basically, I want to check that a multi-threa