Re: Not enough parallelism in programming



David C. DiNucci wrote:
> Rupert Pigott wrote:

[SNIP]

> > IME it is rare that a "huge data structure" is comprised of
> > a bunch of unique elements. They tend to be comprised of a
> > bunch of nigh-on identical, and if that is the case you can
> > simply have multiple instances of the same process... OCCAM
> > had Replicated PAR for just such occasions.
>
> I personally don't think cases like this are so rare. Example: bounded
> buffer (circular queue).

I would not class a circular queue as being a "huge" data
structure. It has very little state to manipulate, the objects
that it manages on the other hand are a different matter - but
surely the circular queue should not really care about them or
do anything to them, right ?

Hmm. Let me see, queues serialise access to a set of objects.
Why are try to parallelise manipulation of a stucture that is
used to serialise access to a set of objects ? That makes bugger
all sense to me.

One approach in CSP land is to have a process that maintains the
state of the queue, and simply have it wait for messages to push/
pop elements on that queue. If you don't want to send the entire
object you can keep the objects in a pool and pass handles to the
queue management process instead.

[SNIP]

> > This argument reminds me somewhat of one of the arguments
> > against breaking up a program into subroutines...
>
> It makes perfect sense to me: If you change your program to support
> more states than it did before, then it's more likely that some of those
> states will be erroneous. Of course, the same argument could be made if
> the states were introduced by adding variables, statements, etc.

Indeed. So you see what I am getting at ?

Cheers,
Rupert

.



Relevant Pages

  • Re: Not enough parallelism in programming
    ... a bunch of unique elements. ... They tend to be comprised of a bunch of nigh-on identical, and if that is the case you can simply have multiple instances of the same process... ... It has very little state to manipulate, the objects that it manages on the other hand are a different matter - but surely the circular queue should not really care about them or do anything to them, right? ... Why are try to parallelise manipulation of a stucture that is used to serialise access to a set of objects? ...
    (comp.arch)
  • Re: Continuing Email problems
    ... specifies where a smarthost is configured. ... Exchange MTA state = Not available ... interestingly there is an SMTP queue for orange.fr ... ...
    (microsoft.public.exchange.admin)
  • Re: Malcolms new book
    ... It will baffle him even more if he includes in his program. ... Many people include it as part of a standard template. ... in an attempt to retrieve the next item from the queue. ...
    (comp.lang.c)
  • Re: Memory manager for a lock-free queue
    ... that queue does not really perform all that well. ... it's a prime example of a blocking algorithm which can outperform a lock-free algorithm. ... I also hope that this doesn't infringe on anybody's patent as it seems that the area of lock-free algorithms is riddled with patents and you can never know if somebody has already come up with a given idea. ...
    (comp.programming.threads)
  • Re: Response to RISC OS Newsletter
    ... weights. ... If you had seen the queue in my local post office you would know ...
    (comp.sys.acorn.apps)