In the Star Trek: Voyager episode "The Swarm", the Doctor's matrix begins to degrade, the EMH diagnostic hologram (the 'Dr Zimmer' hologram) attributes this degradation to the Doctor's operating time - a maximum of 1500 hours, due to some sort of memory overrun error (The real Zimmer obviously didn't remember to match his new's with his release's - sloppy programmers!)

In the end:

The Zimmer hologram sacrifices itself to graft it's matrix onto The Doctor's, effectively saving the doctor. Although it takes him a a while to get all his memory back, he is pretty much unchanged.

This all happened in the third season, which means given the length of time the Doctor spends active (pretty much all the time), and considering the Doctor didn't spend any less time pursuing those fun activities - according to the Zimmer hologram these were clogging up his memory buffers - shouldn't his matrix have degraded again over the course of the show?


It wasn't the memory overwriting itself that was at issue - the problem was extreme fragmentation of the data in his program.

This is an ideal system with 0% fragmentation. The dashes are used space, the spaces are free space:

|----------------------------------------                    |

There's a lot of room for the doctor's program to manipulate the existing pieces of his memory in order to be efficient and quickly find the data/memories he needs.

This is more like what the Doctor's data/memory looked like when he started losing his memories in that episode:

|---- ---- ----   ---- - - - - - - ---   ----- - - --- - ----|

There isn't much room to manipulate the data anymore. See that chunk of 4 dashes near the beginning? If that was his memory of Kes, he no longer has any continuous memory locations it can be moved to for fast access. That's why he could remember her one moment and forget her the next - the random actions going on were shuffling his data even further, occasionally allowing his program to quickly access to what he needed for that second, like the memories of Kes.

The Diagnostic program was complaining because this is more like what the Doctor's memory should have looked like:

|----        --        - -   -     ---       -     -   - ----|

Looooots more room available because the Doctor wouldn't have filled his memory with stuff like Opera.

The Diagnostic program was for diagnosing problems, but computer diagnostic programs often will include some sort of disk defragmenter - more likely than not, Zimmerman's Diagnostic one included some equivalent which would, over time, convert example (2) to look more like example (1).

I suspect the concern about the procedure to fix the doctor was that the Diagnostic program's defragmenter was not designed to be run on a program as complex as the Doctor, and that combining the two programs could corrupt a large subset of the Doctor's data before the defragmentation process even started.

So that would be why it never happened again: The Diagnostic program is now a part of the Doctor, and it's working to prevent this from ever happening again.

(Side note, in real life, disk defragmenters aren't really needed anymore; fragmentation was a huge issue with old filesystems like the File Allocation Tables (one well-known was FAT32), but Windows moved to NTFS afterwards, which is far less prone to fragmentation, although of course it is still possible. With the huge size of hard disks nowadays, the average person will never have to run a defragmenter again. But the switch from FAT32 to NTFS didn't become common until years after the episode in question was created, with Win2000 and WinXP, so... yeah. Old technology made it into Star Trek. Although FAT32 filesystems are still around (often on flash drives) because they're the most cross-platform with Windows, Linux, OSX, and others OSes.

  • Awesome, that makes more sense, and good that it kind of has a real-world answer :). Although a side note on the Windows Defragmenter - Windows 7 & 8 (not sure about Vista, definitely not XP) run weekly defrags by default - probably to mitigate any potential issues that may/may not occur anyway. So whilst the average person wouldn't run a defrag manually - it's taken care of for them anyway
    – Robotnik
    Nov 30 '12 at 4:17
  • 1
    @Robotnik Ahh, interesting about the weekly defrag... I didn't know about that. I switched to linux before Vista was released, and have since only used Windows for games, so details like that I miss out on. ;) (There's a chance it has to do with mini computers and tablets as well; their hard disks are so much smaller than we're used to, nearly filling them up would cause the right conditions for extra fragmentation)
    – Izkata
    Nov 30 '12 at 4:19
  • 1
    Just to note, the last section regarding fragmentation isn't 100% right. :) While this issue isn't as serious anymore with new file systems, it can still happen, especially for the actual memory being used by programs (not the disk storage). This doesn't matter if some program starts up and is then terminated a few minutes later. However, the longer the program is running, the more complex this can get and the more memory is used the more serious this issue can get even in the days of gigabytes of RAM. To this extend, the episode has still a true core and is far from being outdated.
    – Mario
    Nov 30 '12 at 21:18
  • @Mario Yeah, I realized minutes from falling asleep I sort of conflated RAM and HD fragmentation, and didn't even touch on file fragmentation (just free space). Oh well; the basic idea is there.
    – Izkata
    Nov 30 '12 at 21:37
  • 1
    @Paul D. Waite "ZIMMERMAN: This isn't good. The EMH has a level 4 memory fragmentation. How long has the programme been active?" From chakoteya.net/Voyager/303.htm Sep 3 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.