Computer Hope

Microsoft => Microsoft Windows => Windows XP => Topic started by: Linux711 on May 08, 2010, 10:15:55 PM

Title: Copy Windows XP to RAM
Post by: Linux711 on May 08, 2010, 10:15:55 PM
Is there a way to have windows xp copy itself off the hard drive and onto the ram when booting and then copy back from the ram to the hard drive on shutdown? I know something similar to this exists with Bart PE except it's a CD not a hard drive and it also doesn't copy back. Can anyone tell me if this is possible without writing my own driver?
Title: Re: Copy Windows XP to RAM
Post by: Quantos on May 08, 2010, 10:23:34 PM
Why would you want to do that?
Title: Re: Copy Windows XP to RAM
Post by: BC_Programmer on May 08, 2010, 10:26:03 PM
I subscribe that the question doesn't really make a whole lot of sense. Windows, as well as most modern OS's, don't ever copy their entire operational base into RAM at any time- in fact the core architecture is designed to do the opposite, keeping only code that is run in RAM via the use of DLLs and so forth.

You could try to create a RAM drive, and extract a disk image to that RAM drive, but since booting to it would require rebooting and rebooting would destroy the contents of RAM as well as the RAM drive driver you'd need to find some other way of booting to it after creating the drive.
Title: Re: Copy Windows XP to RAM
Post by: Linux711 on May 08, 2010, 10:45:36 PM
Quote
Why would you want to do that?
Speed.

Quote
I subscribe that the question doesn't really make a whole lot of sense. Windows, as well as most modern OS's, don't ever copy their entire operational base into RAM at any time- in fact the core architecture is designed to do the opposite, keeping only code that is run in RAM via the use of DLLs and so forth.
So, if it's possible, why not copy the whole thing to ram?

Quote
You could try to create a RAM drive, and extract a disk image to that RAM drive, but since booting to it would require rebooting and rebooting would destroy the contents of RAM as well as the RAM drive driver you'd need to find some other way of booting to it after creating the drive.
This would probably have to be done with the boot loader. Am I correct?
Title: Re: Copy Windows XP to RAM
Post by: BC_Programmer on May 08, 2010, 10:53:02 PM
So, if it's possible, why not copy the whole thing to ram?

Because there isn't enough room.
Title: Re: Copy Windows XP to RAM
Post by: Linux711 on May 08, 2010, 10:56:10 PM
Quote
Because there isn't enough room.

That may be the case for most people, but my windows xp install is only 500MB and I have 4GB of ram. This is completely possible.
Title: Re: Copy Windows XP to RAM
Post by: BC_Programmer on May 08, 2010, 10:57:18 PM
That may be the case for most people, but my windows xp install is only 500MB and I have 4GB of ram. This is completely possible.

No. it isn't. you really don't understand the mechanics of the windows kernel if you think otherwise.

EDIT: what I mean is, you can use a ram-drive install of some sort, but you aren't going to be able to somehow create a "driver" that does this.
Title: Re: Copy Windows XP to RAM
Post by: Linux711 on May 08, 2010, 11:01:49 PM
Quote
you can use a ram-drive install of some sort, but you aren't going to be able to somehow create a "driver" that does this.

Well, then how does Bart PE do it?
Title: Re: Copy Windows XP to RAM
Post by: BC_Programmer on May 08, 2010, 11:04:37 PM
Well, then how does Bart PE do it?

It doesn't.
Title: Re: Copy Windows XP to RAM
Post by: Linux711 on May 08, 2010, 11:09:17 PM
 ??? I always thought that Bart PE copied itself from CD to ram, but I guess I was wrong.

So do you think the increase in speed would make this worth figuring out?

EDIT: by this, I mean the ram drive install.
Title: Re: Copy Windows XP to RAM
Post by: rthompson80819 on May 08, 2010, 11:18:54 PM
You could use a solid state drive as your primary drive, but that seems like an expensive upgrade that wouldn't really accomplish all that much.

Even if your original question could be done it's got to increase your boot time.

If you bought a SSD you would probably notice more of an increase in other programs more than windows.
Title: Re: Copy Windows XP to RAM
Post by: Linux711 on May 08, 2010, 11:25:52 PM
Quote
You could use a solid state drive as your primary drive

Have one. It's small (only 64GB), but it's 220MB/s I think.

Quote
increase your boot time.

Right, but only by 2.3 seconds with the solid state drive.
Title: Re: Copy Windows XP to RAM
Post by: rthompson80819 on May 08, 2010, 11:38:33 PM
If you already have a SSD, why would you want to copy windows from your hard drive to RAM?  And not just put windows on the SSD?
Title: Re: Copy Windows XP to RAM
Post by: Linux711 on May 08, 2010, 11:45:22 PM
I already have windows on the SSD. When I say hard drive, I am referring to the SSD.

Why would I want to copy windows from the SSD to ram? Because ram is still much faster than a SSD.
Title: Re: Copy Windows XP to RAM
Post by: rthompson80819 on May 08, 2010, 11:51:16 PM
I thought there might have been some kind of communication issue there.  When most people use the term hard drive they usually mean the old spinney platter type thingy.
Title: Re: Copy Windows XP to RAM
Post by: Quantos on May 08, 2010, 11:51:45 PM
I already have windows on the SSD. When I say hard drive, I am referring to the SSD.

Why would I want to copy windows from the SSD to ram? Because ram is still much faster than a SSD.

So how do you think that this will help you realize performance on a desktop computer?
Title: Re: Copy Windows XP to RAM
Post by: Linux711 on May 08, 2010, 11:59:15 PM
Quote
I thought there might have been some kind of communication issue there.

Yes, I should have been more clear. I am just used to calling it a hard drive.

Quote
So how do you think that this will help you realize performance on a desktop computer?

Make it faster. I am not sure I understand.

EDIT: I am signing off. Don't expect to hear more from me until tomorrow.
Title: Re: Copy Windows XP to RAM
Post by: Geek-9pm on May 09, 2010, 12:03:08 AM
There are two problems with using flash drive, besides the cost.
1.the flash RAM is not really as fast as good quality static or dynamic RAM.
2.tTe flash drive RAM has a limited number of read/write cycles and then it will go into failure.

In certain applications engineers will use a version of Windows XP called embedded XP. The XP is actually in a ROM which is loaded into RAM upon boot time. There are options available as for how much of it to want to be in RAM at any one time. However, such applications are where they really don't want to bother with having the mechanical problems on the hard drive. Most often a dedicated application that is not going to need a wide selection of utility programs.
However, if you like to experiment with hardware there is another option. You can build a static RAM array powered by rechargeable battery and set the thing up in hardware as if it was an IDE disk drive. To the system it would appear to be a disc drive with its own controller. You install XP on two that static RAM and then when you turn the power off the rechargeable battery would keep windows XP alive, but in a sleep state. It would appear to be install of the standard XP onto a standard hard drive. You could make one of those yourself or have it made to order or buy it from somebody. But the cost is so prohibitive that you might like to just buy a new computer instead.
Still, it would be a great experiment.  ;D
Quote
4M22 DISK EMULATOR
The 4M22 is a Flash or battery backed RAM disk that use 6 JEDEC 32 pin chips giving a capacity of up to 6M bytes with flash or 3M bytes with static RAM. The 4M22 has 2 independent banks, 1 bank of 2 chips and another of 4 chips. This allows mixing of memory types. For example flash memory could be used for program storage, while batttery backed RAM could be used for log files where constant writes would wear out the flash memory. The on card BIOS makes the disk memory appear as a standard disk to the operating system. On card voltage sensing and write protection circuits make the battery backed RAM extremely reliable.
(http://www.mesanet.com/graphics/diskcard/4m22colo.gif)
Maybe just buy 100 of these.
Title: Re: Copy Windows XP to RAM
Post by: Linux711 on May 10, 2010, 09:33:20 AM
Quote
However, if you like to experiment with hardware there is another option. You can build a static RAM array powered by rechargeable battery and set the thing up in hardware as if it was an IDE disk drive. To the system it would appear to be a disc drive with its own controller.

Are there any tutorials on this? What components would I need?

EDIT: other than the 4M22 DISK EMULATOR.

Anyway. Thanks for the post!