|
Articles
> Why does a PC crash
By
Henderson Computers
June 2000
(updated October 2002)
Just why
does a PC crash? - There are as many different reasons that a PC
crashes, as there are grains of sand on the beach. The good thing is
though, that many of them are common or known reasons. A crash is
defined as the instance of your applications or operating system
"freezing up" or refusing to respond. Bugs (errors or
oversights in programming code) are often responsible for system
crashes, but do not necessarily produce the crash symptom. A bug will
often cause unstable operation, unexpected program termination, or
difficulties with the installation or operation of software. These
are also symptoms of version conflicts and other problems explained
later on.
In order to
understand how a problem occurs, you first need to have a basic
understanding of how the different components in your system (both
software and hardware) interact with one another.
Drivers - All
PC's use drivers. Drivers are like human interpreters; they are
required to provide a common means of understanding between the many
different applications installed on your system and a unique device.
A driver is specific to a hardware device; for example - a video card
has a video driver, likewise a printer has a printer driver.
Therefore, when a programmer writes a word processing application,
they do not have to concern themselves with writing different code to
suit many different printers - they simply write one lot of universal
code to do the printing, and it is then the job of the printer driver
to interpret the output in a manner the printer can understand.
Drivers can cause problems in different ways:
Version
conflicts - Software is written in only a handful of coding
languages (or their variants). Furthermore, many of these languages
share interchangeable components. Their similarity has largely come
about as software developers have moved to the Microsoft Windows
platform. There are aspects of the Windows environment that force
programmers (despite the langauge with which they are writing in) to
follow certain guidelines and procedures when interacting with
Windows Application Programming Interface or API. Windows is
not a single program as such, but more a "shell". You may
have noticed that your Windows directory and sub directories contain
hundreds of files. This is because the Windows shell loads different
components when and as needed. Many of these components are small
progams in their own right, and many other applications besides
Windows utilise them. For example the component file COMMCTRL.DLL is
distributed as part of Windows - it will also be supplied as part of
many of the applications you install on the system yourself. This is
why it and others are more commonly referred to as a "shared
files" because they are quite literally, shared. Over time
however, shared files, like all other areas of PC technology, have
been improved upon - and so the problems begin. If an older shared
file is replaced with a newer version, there shouldn't be any
resulting problems. This is because newer versions of these shared
files are generally made to be backward compatible with older ones.
However, if a newer version of the shared file is overwritten with an
older version during an application installation, problems occur.
Unfortunately you will have no idea this is happenning as it is an
automated process. Ironically, the problem will likely not be
apparent in the offending application just installed, as it's
dependancies are met by the older version of the shared file,
however, when you come to fire up the program or process that
required the later version (now overwritten), you encounter the
problem. As you can see this is why people so often say "but I
didn't do anything!" This is because they may not have
discovered the fault until they performed a particular operation in a
program that was relying upon the advanced functions of this later
version of the shared file to perform.
The
registry (where
angels fear to tread) -
So far we have not mentioned the Windows registry. This topic is
invloved and complex, and so we will only briefly explore it.
Whenever you
install a Windows application, the application makes alterations to
the registry. Imagine the registry as the reception desk at a hotel,
and the applications installed on your system are guests. Just as you
need to check in through the reception desk, so the applications need
to check in through the registry. Continuing the analogy: the
reception desk at the hotel will be aware of any special needs you
may have, what time you want breakfast, and what room number you are
occupying. Likewise the Windows registry retains similar information
in relation to your applications. This is why it is vital to install
and un-install applications correctly. Failure to do so would be like
trying to occupy a room in the hotel without checking in. So as you
can see, as well as the problems already mentioned, there is also the
possibilty for things to go wrong in the registry.
Why can't
the software tell you what the problem is? - Errors are often
stuck in a virtual netherworld between your higher level applications
and your lower level operating system with neither willing to claim
ownership. While applications and operating systems share
information, neither has the ability to interogate the other to
anything but a superficial degree. A computer does not inherintly
"know" what an error is - if it was capable of knowing
that, the error would have been remedied before it occured (sounds
like an episode of the X-Files :-)) Therefore it is down to the
programmer to trap these errors so that they may be handled. This
process is known as error handling or error trapping.
As a programer myself, this is the stage where I can give you the
"we're only human" spiel, because it's true. Imagine you
are programmer writing a program to make a cup of coffee - is it as
simple as, 1. put on jug, 2. get milk from refridgerator, 3. open
coffee jar? I can tell you, NOTHING is that simple....what if you are
out of coffee? What if the water is turned off? What if there are no
spoons in the drawer? That people, is how you end up with the famous
BSD or "blue screen of death". In this case, the
application and operating system will have no information to share,
other than "it exists". In summary, the software needs to
have been given knowledge of the problem to tell you what the problem is.
But it
works on my friends PC - We hear this said often. On face value
it's a logical assumption that if it works on someone elses machine
it should work on any another. As you may be able to glean from what
you have already learned however, is that no two operating
environments are the same. Different PC's will have different
hardware, therfore they will be using different drivers; different
applications installed will means different software components and
differing versions thereof. All of them interacting in different
ways. The end result is most definitely that no two PC's are the
same, and and such a comparison is rarely of merit.
Can I avoid
these problems? - The good news is that, yes, a lot of these
problems are avoidable if you are willing to manage your PC, as
opposed to throwing new things at it like it was a food processor. As
you can probably imagine after everything you have just read, every
application you install presents the opportunity for things to go
wrong. For this reason, we recommend an installation management plan.
Installation
mangement plan
-
Introduce new
applications one at a time.
- Leave
an acceptable period of time between new installations.
"Acceptable" will depend on your usage patterns. A heavy
user who regularly uses a good variety of installed applications may
feel safe to perform another installation after only a few days.
Conversley, someone who uses only a small portion of their installed
applications on a regualr basis, may be wise to leave a period of a
week or more. This also brings us to the next point;
- Don't
install software just because you can. The Internet has opened up a
new world of free or cheap software. Unfortunatley though, while this
is undoubtedly a boon for end users, some of the applications
available will not be as robust as those offered by development
houses with the resources to thoroughly test their product (and we
all know the headaches even the best can cause).
We often come
across systems that have so many applications installed, that
pinpointing the problem is an impractical and uneconomic task. It is
easier to wipe the drive and start again. If you find yourself in
this situation, we recommend you implement this installation plan.
Failure to do so may result in you re-introducing the problem
again....and again.
I
re-installed Windows but the problem is still there. - Only
occasionally will re-installing Windows over the top of an existing
Windows installation solve problems. This is because the new Windows
installation retains most of the settings, files, registry entries,
and other such like. Hence it also retains the problem. You need to
re-format the drive and start from scratch.
So in summary,
follow the plan unless you like watching progress bars :-)
TOP
Legal information
This article
is protected by copyright 2000, Henderson Computers.
This article
may not be reproduced in any form (part, whole, or modified) by any
means without the express permission of Henderson Computers.
Brandnames and trademarks are the property of their respective owners.
|
|