Jump to content


Shared, Exclusive, Foobar?


8 replies to this topic

#1 Nick

    Senior Member

  • Members
  • PipPipPipPip
  • 1227 posts
  • LocationOttawa, Ontario, Canada

Posted 23 January 2009 - 01:52 PM

Hi all,

I'm looking for an appropriate word. :lol: I'm designing a generic 'resource' class that can be in three different access modes. The first is shared access, which means multiple 'clients' can access it simultaneously, and typically it means that they will only be reading from the resource. Exclusive access means only one client has access, typically for writing to the resource. Up to this point it corresponds with a normal multiple-reader/single-writer lock, or more correctly a shared/exclusive lock (since nothing prevents a client from writing to a shared resource if it knows that it won't overwrite any data the other clients are reading or if those clients don't mind).

The tricky bit is the third mode, for which I have no name yet. It assumes that the resource is split into pieces and multiple clients can each have exclusive access to a piece, without further defining how it's split up. Clients simply have to play nice through some external mechanism that assigns clients to the pieces (e.g. a concrete matrix class derived from the resource class that keeps track of the rows/columns/elements assigned to specific clients). The point is that the resource class itself should remain lightweight, and I believe this approach could be faster than having an ordinary shared/exclusive lock on each piece individually.

Anyway, long story short, I'm looking for a name for the third access mode. I've considered "Mutual", "Cooperative" and "Partitioned", but with English not being my first language I feel like I'm missing the ultimate one-word description of my third access mode. So any and all suggestions are greatly appreciated. :worthy:

Thanks,

Nick

#2 phresnel

    Member

  • Members
  • PipPip
  • 47 posts

Posted 23 January 2009 - 02:57 PM

Foobar sounds nice :) The other three, too :D

Just to add one more: How about chunked?

*ducks + runs away*

#3 .oisyn

    DevMaster Staff

  • Moderators
  • 1842 posts

Posted 23 January 2009 - 03:43 PM

Split?
C++ addict
-
Currently working on: the 3D engine for Tomb Raider.

#4 Kenneth Gorking

    Senior Member

  • Members
  • PipPipPipPip
  • 939 posts

Posted 23 January 2009 - 04:18 PM

Pieced?
Restricted?
Partial?
"Stupid bug! You go squish now!!" - Homer Simpson

#5 SmokingRope

    Valued Member

  • Members
  • PipPipPip
  • 210 posts

Posted 23 January 2009 - 04:46 PM

Chunk Limited

it's not a single word but you could always get rid of the space :lol:

Also for any who have not tried this wonder of internet technology, try doing a search for "reverse dictionary".

#6 alphadog

    DevMaster Staff

  • Moderators
  • 1716 posts

Posted 23 January 2009 - 07:52 PM

The difficulty come because the first two access modes describe that access to one resource: shared vs. exclusive. However, the third mode describes the coordination of access to multiple resources.

So, names could be coordinated? Or, managed? Unified?

BTW, without knowing your code better, I wonder if there's a small whiff of "code smell" there...

Consider a redesign; split your classes into classes that lock on a share/exclusive, and another higher-level class that manages the coordination of that state across multiple resources...

#7 kusma

    Valued Member

  • Members
  • PipPipPip
  • 163 posts

Posted 25 January 2009 - 02:20 PM

How about "Segmented"?

#8 Nautilus

    Senior Member

  • Members
  • PipPipPipPip
  • 351 posts

Posted 25 January 2009 - 09:56 PM

"Semaphored" ?

I get the idea the 'clients' are multiple cores shooting for a common goal.

Ciao ciao : )
-Nautilus

(readin' this? you ought to get out more)


#9 Nick

    Senior Member

  • Members
  • PipPipPipPip
  • 1227 posts
  • LocationOttawa, Ontario, Canada

Posted 26 January 2009 - 08:04 PM

Thanks a lot for all the suggestions!

SmokingRope said:

Also for any who have not tried this wonder of internet technology, try doing a search for "reverse dictionary".
That's interesting. :yes: It came up with the word "private", which captures the meaning quite nicely. Like at a private party where multiple people are invited but it's not open for everyone either.

Quote

The difficulty come because the first two access modes describe that access to one resource: shared vs. exclusive. However, the third mode describes the coordination of access to multiple resources.

So, names could be coordinated? Or, managed? Unified?
I'd like to keep the name as abstract as possible. Having a resource that is split into pieces/segments/chunks is an easy way of thinking about it and a likely concrete implementation, but not the only one. I like the name "managed".

Quote

Consider a redesign; split your classes into classes that lock on a share/exclusive, and another higher-level class that manages the coordination of that state across multiple resources...
That's definitely one way to implement this mode. But it can actually be more efficient when keeping it low-level instead of composing it out of several layers. Anyway, it's just some experimental code I'm working on so I'm not even sure what direction to take yet.

Quote

I get the idea the 'clients' are multiple cores shooting for a common goal.
They could be cores, SMT threads, multitasking threads, processes, entire chips, whole systems, network nodes, etc. The rough idea is to create a universal specification for processing data having multiple 'clients' and multple 'servers'.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users