Lil' Dave said:
Apparently, you removed all the evidence in your subsequent reply by
snipping your previous reply and my original question out. How
convenient.
I guess you're not using a NNTP newsreader, then? I'm looking at our entire
thread from start to finish, here (using Windows Live Mail - not a great
newsreader, but it does the trick).
Is there any difference between in how the swapfile is closed in
anticipation of restart vs shutting down the PC entirely? Y/N
No. The main configurable option relating to the page file and Windows
shutdown is whether you want to clear the page file; see
http://support.microsoft.com/kb/314834
However this option kicks for both Restart and Shutdown. As I described
before, the page file is a backing store for the operating system's virtual
memory management mechanism; and is only loosely related to semiconductor
memory, ie, RAM. The hardware does its POST long before the operating
system's memory manager is loaded (before the OS kernel is even started) so
the page file is simply an opaque binary object sitting on the disk, along
with many other opaque binary objects; waiting to be given life and meaning,
via the magic of software.
I noticed that after restarting the PC from XP, that the PC does not go
through the RAM count. That is part of POST. The PC does review onboard
hardware as usual. A couple of ways to force a normal bios routine at
start (other than turning the power on and off) is to either use the reset
button if the PC is so equipped, or if in msdos, simply use the
ctrl-alt-del combination.
######Is there a way of doing the same with XP during a restart?#####
Y/N
There is no simple Yes/No answer. As Kelly and I responded, it depends on
the BIOS. Counting the RAM is a common part of the POST, but it is not
strictly required. This behaviour is controlled by the POST Memory Manager
(PMM) which is part of the PC's firmware. It is not controlled by Windows,
or by any "soft" software (only by the software in the firmware, if you see
what I mean).
The most common arrangement is that a PC will count RAM when it comes up
from the cold state (ACPI G3). If the machine is starting from a higher
state, such as ACPI S5, most PMM implementations do *not* count memory. On
XP, a shutdown normally puts the PC into G3, and a Restart puts the machine
into S5. On Vista, by default the machine rarely ever shuts down to a cold,
G3 state - by default, "Off" puts it into the Hybrid Sleep state (I think
S3/S4). This can be changed via Vista's power configuration utilities.
A BIOS Vendor could decide to make their BIOS count RAM every single time it
goes to the running G0 state; and that would still conform to all the
specifications. No one's ever asked for that, though. Or they could skip
counting RAM altogether - and still be within spec.
MS-DOS does not have any ACPI capabilities, and neither did the original IBM
PC BIOS. When a standard PC BIOS is activated at Power-on, it will examine
the memory word value at address 0000:0427 (using the real-mode segmented
addressing). If the word at that address is 0x1234, the BIOS knows the
machine has been rebooted and typically, will skip counting the memory. If
the value is anything other than 0x1234, the BIOS assumes it is coming up
from the cold state and will (typically) "counts" the RAM (does a quick
write-read of each address). As I mentioned above, the page file is not
touched in any way during this. The POST runs a number of tests on several
hardware components; counting the memory is just one of its tasks.
Of course the BIOS only applies to machines built on the PC architecture.
Windows XP and Server 2003 and 2008 also run on machines with an Extensible
Firmware Interface (EFI), inn lieu of a BIOS - mainly Itanium machines; and
in the past Windows NT and 200 ran on machines with DEC Alpha, MIPS, and
PowerPC CPUs - these were mainly built along Unix-style, NVRAM Open Firmware
implementations.
I guess the answer to your second question, in short, is: No, not really.
But there are many subtle aspects and caveats.
It's great to seek a deeper understanding of PC internals - that's more fun
than being a superficial user! I really encourage you to look at the
definitive docs, such as the ACPI specs (
www.acpi.info) and the PMM
Specification (eg
http://www.phoenix.com/NR/rdonlyres/873A00CF-33AC-4775-B77E-08E7B9754993/0/specspmm101.pdf).
But it's hard to say more, without knowing why you're asking. Are you just
interested in the inner workings? Or is there some specific problem which
you're hoping to mitigate, with a RAM count?
Regards
Andrew