How in the world can my antivirus/antispyware/antimalware program
possibly scan all of my files for the thousands of trojans/signatures
out there without taking an eon to do so? Don’t they have to scan every
file on your computer (or at the very least the exes, zips, dlls and
registry) sequentially for a trojan-name and/or each signature? I can
only presume they must do this one trojan-name/signature at a time, and
then repeat. I can’t fathom how it can be done so quickly, relatively
speaking, given the task at hand. Heck – just a manual search for one
or two obscure files on my computer can take me almost as long to find
them – if I even do!
And here I was thinking that the virus scans take forever, and
you’re wondering how they can be so fast! It’s all a matter of
perspective, I suppose.
The short answer is that sometimes it does take a really long time.
But there are techniques that scanners use to dramatically speed up the
process, or at least make it look that way.
In addition not everything is, in fact, a scanner.
Time for some explanation of how anti-malware software typically
works.
]]>
<
A simple principle which explains how so many things can be done very fast is putting things in alphabetcal order. Suppose i have a book written in a foreign languge but which uses our alphabet and I want to know if it contains any English words. (An English word is any of 100,000 or so which is on a list.) I look at each word in the foreign book and for each the question is, is it on the English list. That does not mean comparing iot with 100,000 others. My English list is a dictionary. Finding out whether “reciept” say is in the dictionary (whch we might have to do if we are not sure how to spell “receipt”) just menas finding it if it is in or finding the pace where it would be if is isn’t. This takes far fewer look ups. 17 in fact. About the log to base 2 of the number of words in the dictionary.