Monday, October 10, 2005

What a geeky post title.  Well, I guess it's a geeky post.

Based on the number of people actually in the bathroom at work when I'm in there, I would think that two people entering/exiting the bathroom at the same time would be a rare event.  Yet, I've come to expect the door to magically open in front of me as my hand nears the handle, or swing violently at my face as I exit.

I always find it amazing the number of things in real life that have dualities in software.  In software, we'd solve the problem of collisions in the doorway by taking a lock on it (although locking on a public object is not always a good idea).  This becomes a problem in the real world because of visibility.  The bathroom door has no window (which is probably good), so you can't see when someone is right on the other side.  You seldom have a collision when the door has a window because you can see who else is going to try to use the door before you can get there.  There are tons of "shared resources" in the world where we've created synchronization mechanisms of various authority.  I think we could learn a thing or two by observing them.

For instance, when roads intersect, we have several different ways of dealing with collisions (we sometimes call them that in the software world as well.):

  • Raw intersection - No traffic signs or anything. Typically found on dirt roads where traffic is scarce and the probability of collision is low.
  • Yield - One street is a lower priority and "yields" the intersection to the other road.
  • Stop signs - you see where I'm going
  • Flashing Lights
  • Traffic Lights
  • Traffic circle - This one always amuses me.  It is actually a very efficient means of managing an intersection IF the drivers are familiar with navigating it.  If they are not, hilarity ensues.
  • Overpass

And there are tons of "in-between" flavors.  Hopefully you see what I'm getting at.  The granularity of synchronization in software can be just as complex.  Simple locks, Mutexes, Reader/Writer locks, etc.

Where am I going with this? I don't know.  I just thought it was interesting how many real-world examples of synchronization there are, and how we avoid them in different scenarios, sometimes delegating that responsibility, sometimes taking a more strict position. Prioritizing etc.

That is all.

posted on Monday, October 10, 2005 12:36:45 PM (Pacific Standard Time, UTC-08:00)  #    Comments [1]
Related posts:
9-year Anniversary (yesterday)
LinqToStdf now on CodePlex
Image Slicer for Deep Zoom in Silverlight 2
Silverlight limitations and Constrained Callvirt in IL
Happy Birthday Peter
What are the generic Delegates in the framework for?
Tracked by:
"Ebooks for Palm Free" (Ebooks for Palm Free) [Trackback]
"Norton Antivirus Downloads" (Norton Antivirus Downloads) [Trackback]
"lesbian bitches" (lesbian bitches) [Trackback]
"world of warcraft official" (world of warcraft official) [Trackback]
"lectern suitcase" (lectern suitcase) [Trackback]
"see through pants pics" (see through pants pics) [Trackback]
"hatchet novel" (hatchet novel) [Trackback]
"San Antonio Independent School District" (San Antonio Independent School Distri... [Trackback]
"time and date" (time and date) [Trackback]
"oil change" (oil change) [Trackback]
"Rolex watches" (Rolex watches) [Trackback]
"Radar Jammer" (Radar Jammer) [Trackback]
"Ass Sitting on Face" (Ass Sitting on Face) [Trackback]
"wet t shirt competition" (wet t shirt competition) [Trackback]
"Miss Wheelchair USA" (Miss Wheelchair USA) [Trackback]
"linux recovery unerase" (linux recovery unerase) [Trackback]
"symptoms of to much synthroid med ." (symptoms of to much synthroid med .) [Trackback]
"dynamo billiard tables" (dynamo billiard tables) [Trackback]
"Cute Cell Phone Accessories" (Cute Cell Phone Accessories) [Trackback]
"Zoloft Overdose" (Zoloft Overdose) [Trackback]
"lastminutetour" (lastminutetour) [Trackback]
"Making Love the First Time" (Making Love the First Time) [Trackback]
"reef shoes" (reef shoes) [Trackback]
"angry people" (angry people) [Trackback]
"zermatt chalet" (zermatt chalet) [Trackback]
"satilite radio" (satilite radio) [Trackback]
"Wall Tapestry Wall Art" (Wall Tapestry Wall Art) [Trackback]
"curves magazine" (curves magazine) [Trackback]
"manly physique" (manly physique) [Trackback]
"Cellular Phone Exchange" (Cellular Phone Exchange) [Trackback]
"britax car seat marathon arctic cat" (britax car seat marathon arctic cat) [Trackback]
"dynamo foosball accesories" (dynamo foosball accesories) [Trackback]
"free rpgs" (free rpgs) [Trackback]
"call center service" (call center service) [Trackback]
Monday, October 10, 2005 8:37:22 PM (Pacific Standard Time, UTC-08:00)
Your bathroom is obviously not at my house. Wait until you have kids.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):