Hi,
I believe one of the reasons behind such OS events is caching and swapfile management.
Windows (among others) will try to optimize its performance by trying to cache things up in memory (dlls, filesystem accesses and such) in order to react faster. And if you have a lot of memory, it will cache a lot. This should be ok, except if it's done at a "bad time", while you are acquiring and processing an image.
At the same time, it will write some allocated data AND code memory segments to swap on disk, because it decides those won't be needed, or simply because more space in real RAM is needed and those blocks are less important.
So, two mechanisms at work: disk caching and virtual memory (swapfile). Both may occasionaly trigger disk and memory reading and writing.
Anyway, my point is, given enough RAM (depends on your software, but 1 gig at least for XP) , you can turn off windows swapfile completely.
I used to do this in Linux machines to avoid waste of time with swap (again, assuming I would always have enough ram), and even in old Win 95,etc, to save laptop's battery (avoiding use of hard drive). Using a RAM drive would help too. (having a drive running off from your memory, instead of disk).
Nowdays, if you have 2 gigs of real RAM memory, and disable swapfile, XP will cache almost everything it needs, and will (more) rarely write or read from disk.
Some will advise against this and will suggest instead creating a RAM drive and make swap work with that RAM drive. This, to me is kind of silly, (and probably tricky to arrange), because basically you are using up memory with a RAM drive, so that then you can swap memory into memory to release memory - yeah! silly enough to me...but, I may be unware of architectural details and OS design options that justify this.
You can also pre-copy an entire branch of .exes and .dlls into a RAM drive and start your application from there. You can use a dll dependency browser to decide which dlls you should move into that RAM drive before you run your app. By doing this, even if XP doesn't cache some code in memory, it will be reading them from a disk with the memory-like speed (many 10's of times faster, at least).
Another dependency you break with not having a swapfile is thermal calibration. Most drives (except those which are built to specifically avoid this) will perform some thermal calibration to the drive heads' alignment (and disk speed?somebody?) every few minutes or so.
When thermal calibration is being performed, disk cache at the electronics in the disk may, or may not, be enoough to avoid suspension of normal flow of data to and from disk. By not having a swapfile, you avoid risking your OS to decide now it's time to swap something from/to memory at the same time the drive is doing thermal calibration and pam! you have unreasonable cycle times...
All this tends to be worse when you allocate lots of frames in memory for processing and then deallocate. Lots of memory allocation, deallocation, management, caching decisions, swaping decisions...
Hope this helps! BTW, I do this regularly in our vision systems, despite not having ever done real tests on the impact of this strategy.
I would particularly like to know the impact of using SCSI controllers instead of IDE, and filesystem format (FAT vs NTFS). Does anybody know more about these?
Regards,
Silvio, CALMETRIC
www.calmetric.pt