
Semaphore Semaphore Mutant Semaphore Contest
Last week, when the program I was diligently tweaking/abusing crashed, I saved the coredmp file and attempted to decipher it using Notepad. Aside from the landing coordinates needed by the alien space fleet for their upcoming invasion of earth, there was nothing much of value in the file. It was mostly filled with a single phrase repeating ad infinitum: "semaphore semaphore mutant semaphore..."
I was fascinated by this, and pondered the meaning of "mutant semaphore." Without further ado, I changed my Messenger screen name to "Mutant Semaphore" and set out to learn the truth behind the name, the face behind the mask.
So, having googled no satisfying answers, I entreat you to assist me in my quest in finding (or making up) the meaning of this cryptic phrase--hence the Semaphore Semaphore Mutant Semaphore Contest. Whoever presents what I deem is the most satisfying definition of "mutant semaphore" will receive a Lenten-abstinence-batch-of-chocolate-chip-cookies, which is similar to the prize I offered two years ago to the solvers of my cryptogram, except these are both non-existent and low fat.
Apparently this goes way back:
ReplyDelete"The name mutant has a colorful history. Early in Windows NT's development, Dave Cutler created a kernel mutex object that implemented low-level mutual exclusion. Later he discovered that OS/2 required a version of the mutual exclusionsemaphore with additional semantics, which Dave considered "brain-damaged" and which was incompatible with the original object. (Specifically, a thread could abandon the object and leave it inaccessible.) So he created an OS/2 version of the mutex and gave it the name mutant. Later Dave modified the mutant object to remove the OS/2 semantics, allowing the Win32 subsystem to use the object. The Win32 API calls the modified object mutex, but the native services retain the name mutant."
-Helen Custers, "Inside Windows NT" (1992)
Mutants (mutexes) and semaphores are involved in thread synchronization. The parts of the core dump that contained those words were probably part of a list of objects in memory at the time of the crash. Memory dumps usually contain non-printing characters that you wouldn't see with notepad, or that might show up as boxes or other weirdness. A program that can open a file and show you the contents in hex (such as Visual C++) might show more interesting information.
Well that takes all the fun out of it, Dave! But at least I now know what a a mutant semaphore is...I think. Can you translate that info into plain English? Please remember that I am only half Geek.
ReplyDelete