|
Memory
Management, Filing Systems, and More
Take a quick look at
how memory management takes place inside Windows, how filing
systems work, and some information on disk compression and
dial-up networking. Be aware that a good portion of this
information relates to Windows 3.1 and previous. I
present this information as a complete backdrop on the
information you should know to fix any Microsoft-based
system.
Memory Management
We already know that Windows uses
special drivers to manage memory. In Windows 3.x,
HIMEM.SYS and EMM386.EXE allow you to manage your upper/high
memory settings within DOS, and Windows itself was responsible
for Virtual Memory management. Windows 9x is a little
different.
Before we go to far, I want to explain
EXACTLY what virtual memory is. Under DOS, we didn't
have the concept of Virtual Memory. Windows 3.x
introduced it as a way to expand the available amount of
memory in a computer to run more applications at once.
It uses the hard drive as a memory page file or swap
file. When your memory fills up beyond a certain
point, RAM instructions are sent to a file on the hard drive
and stored there much the same way they are in regular
RAM. The difference is that RAM is about 300 times
faster than your hard drive. So although virtual memory
gave you the ability to run larger programs and more of them
at the same time, it slowed down the running of these programs
by making them dependant on hard drive speed.
Here's a quick look at what you'll need
to know about Virtual Memory
Management.
First off, Windows 9x uses Real and
Protected Mode, which are modes used to load drivers. 16
bit legacy (older) drivers are loaded in real mode. 32
bit virtual device drivers are loaded in protected
mode. All 32 bit device drivers have a file extension of
.VXD or .386. If all the drivers loaded are 32 bit,
Windows 9x does NOT need a CONFIG.SYS file.
Secondly, all virtual memory management
is handled automatically within Windows. There is no
need to set up swap files or make settings for swap file
sizes. Windows 9x manages virtual memory automatically
for you, creating it's own dynamic swap file within the
Windows directory.
Lastly, Windows 9x doesn't use
SMARTDRIVE.EXE or SHARE.EXE as Windows 3.x did. Windows
3.x required these files to free up conventional and upper
memory space, but these files are built into Windows 9x.
What these 3 things mean is that virtual memory management is
completely handled by Windows 9x, and it can automatically
adjust for any changes that have to be made.
There are ways to modify how Windows 9x
handles virtual memory. If you click on Start ->
Settings -> Control Panels and double-click the System
Icon. Click to the Performance tab, and select Virtual
Memory. It should be set to "Let Windows Automatically
Manage My Virtual Memory", but there are options to make
changes there. We won't go into these changes, as they
aren't necessary for the test. (Under Windows 2000 you
can find the Page File management utility in the same spot,
but messing with these files is EXTREMELY risky. Windows
2000 assumes you know more about how page file settings work,
and you can seriously hamper Window's ability to manage this
page file if you screw around with the settings
improperly.)
Filing Systems
We've looked at filing systems briefly before, but I want
to touch on them again in a little more detail. Filing
systems are the utilities that state how files are written to
a hard drive, and tell the computer how and where to look to
find individual files. There are 5 filing systems that
Windows has used since it's inception. They are;
FAT - File Allocation Table - A 16 bit file allocation
scheme under Windows 3.x and 95. VFAT - Virtual FAT - A 32
bit file allocation scheme under Windows 95 that supported
Long File Names. FAT32 - File Allocation Table 32Bit - An
update to VFAT that manages clusters better. (I'll
explain in a bit) HPFS - High-Performance Filing System - A
Windows NT 3.x filing system that was meant to manage larger
hard disks sizes. NTFS - NT Filing
System - The main filing system for Windows NT. It
allocates the filing system in 64-bit addresses, and has an
emphasis on security, encryption and performance over pure
speed.
You see references to bit lengths on the filing system
names. It's all well and good to know what the bit
lengths are, but it's even better to understand what they
mean. A lot of this ignores the idea of
Filing System overhead and makes some pretty base assumptions,
but here's my best shot.
Let's say you have a 4-bit filing system. That means
that the computer can allocate addresses on the hard drive up
to 8 characters long. Because these addresses are kept
in hexidecimal, we know that the total number of addresses is
limited to 16x8, or 128 individual addresses. That isn't
very much, as it would limit the total number of files on the
hard drive to 128. An 8-bit filing system would be able
to store 2048 files; still not a lot. A 16-bit filing
system would have addresses 32,768 characters long, meaning it
could hold 524,288 files. Now we're getting
somewhere. A 32 bit operating system would have
addresses 2,147,483,648 long, and could hold 34,359,738,368
files. WOW! A 64 bit operating system could handle
addresses 18,446,744,073,709,552,000 long and could hold
295,147,905,179,352,832,000 files. You can see why
filing systems with more bit addressing are better.
The other side of this is cluster size. Each cluster
corresponds to an address in the filing system. If a
100MB disk is formatted with a 4-bit operating system, it is
split into 2048 sections each 48,828 bytes in size. If a
file takes up 2 Kilobytes, it uses the whole 48.8K section of
hard drive because only 1 file can exist per memory
address. That means that there would be 46.8K of wasted
space on the drive.
Let's look at the same example with a 16 bit operating
system. The same drive would be split into 524,288
clusters each consisting of 190 bytes. (In theory at
least. The operating systems themselves automatically
default to 4K cluster size as the smallest unit.)
Assuming 4K cluster size, the 2K file now only wastes 2K of
disk space. That's a big improvement from the 46K wasted
in the 4-bit filing system.
As filing systems improved, they made larger and larger
drives possible. a 64-Bit filing system like NTFS could
support a 1,180,591,620 Terabyte drive at 4K cluster
size. Although I wish I had a hard drive that size, the
64 bit filing system won't be used to capacity for a LONG LONG
LONG time.
Disk Compression
Another trick to improve hard drive usage is the concept of
data compression. Let's say you had a 1GB drive and had
998MB of files on it. You're pretty much screwed,
right? Disk compression allows you to set up a system
where your 1GB drive acts like a 1.5GB drive or bigger.
By using mathematical algorithms data that would normally take
up 1GB of space is squeezed into a small space, making the
computer (and you) think you have more space than you really
have.
Although this may seem like a blessing, there are problems
with this system. First of all, data compression
utilities like DriveSpace compress all the files into one big
file, called a Compressed Volume File. (CVF) To
use a file that's compressed, it must be extracted and
uncompressed from the CVF. This is a slow process if you
compress the wrong files.
Secondly, because the drive is compressed to hold more
data, you could technically compress more data than you could
uncompress. Imagine compressing data so that 1.2GB was
on that 1GB drive. If for some reason you needed to
uncompress the drive, you couldn't. The compressed file
would over-run the drive.
Lastly, because the CVF is one huge, complicated, huge,
algorithm-driven, did I say huge? file, it is highly
susceptible to corruption. If one part of
the CVF corrupts, you lost ALL the data in the CVF.
(Unless you have big money to spend sending disk drives to
rescue facilities.) That simple reason is why all files
required to run the operating system (including the swap and
page files) are NEVER compressed.
Networking In Windows 9x
One of the questions you probably will see is a
question on whether a computer is networked or not. It
used to be simple. You looked for a modem or a network
card. Unfortunately, wireless networking and
USB/Firewire have made this statement un-true.
Therefore, the easiest way to tell if a computer is networked
isn't so easy after all.
There are a couple ways that computers in the Windows world
are networked. They are;
Dial-Up Networking - DUN uses PPP to transfer
TCP/IP, NetBEUI or IPX/SPX over POTS. (God computer
techies love their acronyms.) Essentially, a Dial-Up
Networking system is the way a modem hooked up to a computer
uses a telephone line (Plain Old Telephone System, or POTS) to
communicate with another modem hooked up to another
computer. This is called a Point-to-Point Protocol (PPP)
connection. TCP/IP, IPX, and NetBEUI are the languages
the computers talk to each other in. (Also remember that
Serial Line Internet Protocol, or SLIP, was used in Windows
3.x as the connection protocol.)
Direct Cable Connection - You can use the Direct
Cable Connection wizard inside Windows to connect two
computers up using Serial, Parallel, USB, or Firewire
connections. This is called a Peer-to-Peer network
environment, because every computer in the network is
equal.
Network Interface Cards - The standard method of
communication for Windows 9x computers is a NIC. These
cards are designed to use special cables to communicate
directly with each other using one of the mentioned protocols.

|