Shudown and HORM

M

Michael Bate

Normal XPe shutdown, even when using HORM, takes about 20 seconds on our
system.

What is the OS doing? The C: drive is write-protected, so it can't be
saving anything.

We do have an un-write-protected USB thumb drive,but that should not
take long to flush out.

Is there some way to speed this up? Note that we are using an ATX power
supply: The user pushes the powerw off button. This is intercepted by
our application which closes down (including closing the file on the USB
thumb drive), then signals the OS to proceed to shut down. Our
application takes only a second or two to shut down. Most of the 20
second shutdown is spent with the Windows shutdown screen.
 
K

KM

Michael,

HORM (Hibernate) and Shutdown are different animals.

Hibernating goes by a different route and actually involves a substitute disk driver (dumpdisk driver). It typically brings the
system to Standby mode first (put all the drivers in S1/S3 state) and then dumps the RAM to disk. Dumping the RAM content also
involves some compression so it is a bit slower then just DMA'ing bits from memory to disk. But still this process is very faster,
although depends on how much RAM you've got on the target.

There are quite a few things XP system does when shutting down. From flushing out disk cache to closing network connections.

How do you protect your boot drive? If it is EWF what overlay do you use? RAM overlay would work faster.
In either case, EWF doesn't really speed up the OS shutdown process. OS is still flushing whatever buffers it needs to flush out
before it turns the power off. It is just that the disk writes will be redirected to the overlay.

If you don't care about flushing data to the disk (e.g., you flush and unmount your data partition before going to shutdown
manually), you can call NtShutdownSystem API won't flush system changes on disk. Probably the faster way to do a soft shutdown on
NT/XP.
Make sure you get enough privileges [adjust to shutdown privilege] to the token of the process that will call the API
(you can grab the code from here http://forum.ishodniki.ru/index.php?topic=7599.msg31360, just replace the "reboot" by "shutdown"
logic. Or search Google for the API name and find lots of other samples or utilities.)
 
R

Ralph A. Schmid, dk5ras

Michael Bate said:
Is there some way to speed this up? Note that we are using an ATX power
supply:

We just use a standard industrial power supply, and the user switches
the beast off the hard way :) Anything else is not practicable for our
application, waiting for a shutdoiwn would be impossible.

Ralph.
 

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