[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: x2AnyChannels do not allow alting

Peter, Gerald, others...

Quick summary:

1. The *2AnyChannels do not allow ALTing because of hazardous race
   conditions. [fine, details in previous mail]

2. To avoid the race conditions, limitations are either implemented
   in the library, or as design rules. Furthermore, it is possible
   to build application analysis tools that verify the absence of
   certain race conditions. [good approach, no comment, details in
   previous mails]

3. The discussion is now about a `new' *2AnyALTINGChannel that allows
   (input) alting by multiple readers.

4. The new *2AnyAltingChannel is different from the occam3 SHARED channel.
   [fine, a proper CSP model has to be built for it] [this is interesting,
   but, I do not want to draw the discussion into this direction]

5. Let's forget about Buffered*2AnyChannels for the moment. [interesting
   for a later discussion]

6. It is possible to implement the new *2AnyAltingChannel, but there are
   three problems:
   - The implementation will be frightenly complex, and therefore it will be
     difficult to proof its correctness. [agree, but we also agree that
     difficult does not mean impossible, in fact I think it should be

   - The implementation will be inefficient (Peter writes: possibly
     a time-consuming policing action is needed to sort things out)
     [doubtful, I cannot imagine the implementation take more than

   - It is difficult to think of a usage for the new *2AnyAltingChannel.
     [interesting point]

> Does anyone have an example where a process, competing with other processes,
> needs to back off that competitive read?

Example: "Multi function servers"

  Imagine a distributed multiprocessor computer system with a number
  of resources (harddisk, screen, network). Some CPUs have access
  to a subset of these resources. E.g., two CPUs have network access;
  two can access the screen, and two can access the harddisk.
  A CPU can only access one resource at a time. E.g., because a
  single IO region needs to be used for any of the resource accesses.
  To access the resources, the new Any2AnyAltingChannel can be
  used in a natural way.

  Any2AnyAltingChannel harddisk;
  Any2AnyAltingChannel screen;
  Any2AnyAltingChannel network;
  Process CPU1 {
      harddisk -> execute(harddisk?);
      network  -> execute(network?); 
  Process CPU2 {
      harddisk -> execute(harddisk?);
      screen   -> execute(screen?); 
  Process CPU3 {
      screen -> execute(screen?);
      network  -> execute(network?); 
Is this a convincing example?

ps. Peter/others: I would like to subscribe to the other occam and CSP
    related mailing lists as well... who manages what and where...?

ps2. When and where is the next WoTUG conference?