Curiious

L

Lil' Dave

Some questions never seem to get posed, not at least that I've seen here, or
even in prior windows version newsgroups. So, I'll ask here.

Is there any difference between in how the swapfile is closed in
anticipation of restart vs shutting down the PC entirely?

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?
 
A

Andrew McLaren

Hi Dave,

As Kelly correctly noted, this is controlled by the BIOS. I'll add a few
further comments ...

Nearly all machines these days are ACPI-compliant; they support the
"Advanced Configuration and Power Interface" specification (see
http://www.acpi.info). So there is a lot more going on than the machine
being simply "On" or "Off". Including the various G and S states, an ACPI
machine can be in about 8 different levels between being cold, silent and
powered totally off (state G3), and being fully up, warm, and running (state
G0).

When you do a restart in Windows XP, I *think* (not 100% sure off top of my
head) it puts the machine into ACPI state S5, "Soft Off". XP of course fully
understands ACPI, and has an ACPI driver to interact with the machine's ACPI
firmware.

MS-DOS was a very simple operating system which long pre-dated the advent of
ACPI (a few late versions of DOS had rudimentary APM abilities). So, MS-DOS
only understood the two power states of the original IBM PC architecture -
On, and Off. There was a lot of legend and lore around what effect calling
Interrupt 19 had on memory and registers but ... that was all very long ago.
Irrelevant for today's machines.

Whether or not the BIOS will perform a memory count during the Power-on Self
Test, depends on how the BIOS manufacturer has coded their Post Memory
Manager (PMM). For a sample PMM specification, go to the Phoenix website
(www.phoenix.com) and search for PMM. It is very common (and sensible) for a
BIOS to do a memory count as the machine comes up from the Cold (ACPI G3)
state; but this is not strictly required by the operating system, or even by
the hardware. In some advanced servers, memory is hot-swappable and can be
added at any time, even while the machine is running; it is not constrained
by how much memory was counted when it was booting.

Regarding the "swap file" ... for a start, you should really call this the
Paging File, since the memory management regime of Windows NT (including XP,
Vista and 7) is *paging*, not swapping. But anyway. The paging file has very
little relevance to the physical RAM installed in the machine. Windows NT
(including XP, Vista and 7) is a virtual memory operating system. On the
32-bit version, it works on a virtual address space of 4 GB per process,
divided between user mode and kernel mode. These virtual memory addresses
need to be "backed" by some kind of mechanism, whether it is semiconductor
memory (RAM), disk space (a paging file) or other, less common and more
exotic instruments, such as tape, or Flash memory and ReadyBoost. It is an
optical illusion on the PC architecture that real memory virtual memory are
intimately related. On other computer platforms, like IBM mainframes and
AS/400s, it is more obvious that RAM and virtual memory are distinct,
independent entities. But most people these days only interact with PCs, so
they get easily confused.

Cheers
Andrew
 
L

Lil' Dave

I appreciate all the information, and your input.

Would be nice if someone could answer either question though...
 
A

Andrew McLaren

Lil' Dave said:
I appreciate all the information, and your input.
Would be nice if someone could answer either question though...

Umm ... which question? :)

I thought we did answer it!
 
L

Lil' Dave

Apparently, you removed all the evidence in your subsequent reply by
snipping your previous reply and my original question out. How convenient.
So your's is totally snubbed as well.

Refresher:
Is there any difference between in how the swapfile is closed in
anticipation of restart vs shutting down the PC entirely? Y/N

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
 
J

Jose

Apparently, you removed all the evidence in your subsequent reply by
snipping your previous reply and my original question out.  How convenient.
So your's is totally snubbed as well.

Refresher:
Is there any difference between in how the swapfile is closed in
anticipation of restart vs shutting down the PC entirely?  Y/N

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

I'll try:

1. No.

2. Doubtful.

A RAM test during POST has nothing to do with XP. It is done or not
done depending on the capability and flexibility of your BIOS

When the CPU is reset (or powered up) it starts running the BIOS,
which is a program, usually referred to as the POST.

If the POST encounters no errors serious enough for it to stop
running, XP will then begin loading.

If I restart my XP Pro, it goes through the POST again with only RAM
count - no RAM test because that is the way I want it to work.

Jose
 
J

Jose

Apparently, you removed all the evidence in your subsequent reply by
snipping your previous reply and my original question out.  How convenient.
So your's is totally snubbed as well.

Refresher:
Is there any difference between in how the swapfile is closed in
anticipation of restart vs shutting down the PC entirely?  Y/N

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

I need to revise response 1.

1. No (for all intents and purposes).

Jose
 
A

Andrew McLaren

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top