Skip to main content
gamedev.net
🔒 Locked

Quick switch Linux/Windows

Started by Dwiel Aug 11, 2003 at 10:51 AM 13 replies 650+ views
Original Post
Dwiel
Dwiel
Hey, I was just wondering if it was feasible to make a program that would quickly switch your desktop to and from windows/linux. Basically it would reserver 2 times the size of your RAM on the HD in an area readable by both systems. When in one OS you tell it to switch to the other, it stores all of the RAM onto the HD (like when you do a sleep or hiernation) and then boots the other OS or loads the RAM image from before. Is this a feasible situaton or are there problems that arise that I do not see because of lack of knowledge about this excat type of thing. It just seems that if your computer can sleep, it sleep and then boot a different OS sleep again and then switch fairly quickly between OSes. Just a thought Dwiel
For all in need of free hosting for pics/etc:
upload to ftp location: dwiel.no-ip.com user/pass = FreeHostedPics/gamedev
Your files will be available on the inet immediately at http://dwiel.no-ip.com/~FreeHostedPics/
Feel Free to create a folder there for your self!
Oluseyi
Oluseyi
quote:
Original post by Tazzel3D
...are there problems that arise that I do not see because of lack of knowledge about this excat type of thing?
Yes.
Witchcraven
Witchcraven
yeah, it is. you may need a custom bios though. but you can buy programmable ones.
--------------------------I present for tribute this haiku:Inane Ravings OfThe Haunting JubilationA Mad Engineer©Copyright 2005 ExtrariusAll Rights Reserved
Monder
Monder
You could always use VMware to emulate windows on linux or linux on windows. As long as you don''t want to play games it runs fine (or so I''ve heard).
Dwiel
Dwiel
How does the XP feature hibernate work? Does it take a screen shot of the RAM and store it on the HD then just pop that ram back in when you go back to turn it on? Doesn''t seem too complex... what other stuff is going on in the background?

I will probobly never make anything like this, its just fun to think about and discuss

Dwiel

For all in need of free hosting for pics/etc:
upload to ftp location: dwiel.no-ip.com user/pass = FreeHostedPics/gamedev
Your files will be available on the inet immediately at http://dwiel.no-ip.com/~FreeHostedPics/
Feel Free to create a folder there for your self!
Oluseyi
Oluseyi
quote:
Original post by Tazzel3D
How does the XP feature hibernate work? Does it take a screen shot of the RAM and store it on the HD then just pop that ram back in when you go back to turn it on? Doesn''t seem too complex... what other stuff is going on in the background?
The computer doesn''t shut off, the CPU is merely powered down and a snapshot of RAM is taken before the juice is turned off there. Note that your keyboard lights stay on.

Hibernate isn''t just an "XP feature" or even just a "software feature"; it''s completely dependent on the hardware. Other PC OSes can hibernate as well. Hibernation provides no indications into implementing an OS hotswap feature, unfortunately. OSes have a portion resident in high memory which is never unloaded while the OS is running. Unless your two swapping OSes use the same resident portion, and the resident portion (akin to old DOS TSRs) itself is aware of and compatible with the two OSes, it''s not going to happen.

Besides, there''s tremendously little utility in something like this. Operating systems are actually commodities, despite Microsoft''s stranglehold of the market. It''s the applications available for the platform that give it prominence.

But go for it. It could be fun.
griffenjam
griffenjam
If you could write this software you could make a ton of money.
Not for OS switching but for loading.

Think about it. Load mini loader OS, take snapshot of RAM for any given user OS. Boot into the mini OS and load the snapshot.
You could boot into Windows within seconds. Businesses all over the world would want this software.



"There aint gonna be no tea and crumpets!"
You are person # to view this post.
Monder
Monder
Well WinXP only takes a minute at most to boot up, more like 30 seconds for me, so what''s the point?
Dwiel
Dwiel
I found one place online that is working on a version of linux that is bootable from bios. No need for a floopy/cdrom or even HD. boots very fast too. Componies are looking into using for consumer electronics. If it had the capabilites for media playback through lan it could be a pretty sweet media player if you at least gave it a CDrom drive..

Anyway... It seems fairly obvious as to how the ram is stored to the HD... basically a ton of copies to the HD... its not THAT simple, but almost. The hard part is getting the OS ''running''. You would need to remember every process that was running, where in execution it is in/etc... then you must start them at that point again... I guess it wouldn''t be as bad if you just boot your OS then imediately do the copy to the HD so as few processes are running... or maybe just get linux to the command line... Let the user load X on his/her own. It doesn''t take that long. On systems with lots of ram, this might not be much faster than booting from HD all over again. those guys out there with a gig of ram might be waiting for a while. the time it takes just to read a gig of data is pretty long... I guess not that bad...

I doubt I will every have the time to make something like this because I don''t have enough knowledge of the background stuff that goes on to get a computer running an OS. would e a pretty steep learning curve I''m thinking... I like the idea though

For all in need of free hosting for pics/etc:
upload to ftp location: dwiel.no-ip.com user/pass = FreeHostedPics/gamedev
Your files will be available on the inet immediately at http://dwiel.no-ip.com/~FreeHostedPics/
Feel Free to create a folder there for your self!
CoffeeMug
CoffeeMug
quote:
Original post by Oluseyi
The computer doesn''t shut off, the CPU is merely powered down and a snapshot of RAM is taken before the juice is turned off there. Note that your keyboard lights stay on.


That isn''t true. You''re probably talking about stand by. Hibernation does turn off the machine completely. It''s not THAT hard to implement in an OS, really. A snapshot of RAM is taken and saved to harddrive. Also, all thread contexts are saved (this includes all registers contents for each thread). When the computer is started again the memory is loaded from the harddrive along with thread contexts.
Witchcraven
Witchcraven
I would still implement it in bios, that way you would not need a version for windows and linux. Heck, it could work with anything. Would such a thing be possible in windows/linux? You would need rung 0.
--------------------------I present for tribute this haiku:Inane Ravings OfThe Haunting JubilationA Mad Engineer©Copyright 2005 ExtrariusAll Rights Reserved
Mirgatroid
Mirgatroid
how would a pure snapshot be taken with the program taking the snapshot in ram? if you figure this out, then it shouldn''t be too difficult to do...
End Of Discussion.
griffenjam
griffenjam
quote:
Original post by Monder
Well WinXP only takes a minute at most to boot up, more like 30 seconds for me, so what''s the point?


Rign Rign "Hello Intel? Hey Monder''s Win XP system boots in 30 seconds so forget about R&D, everyone has all the speed they need!".

My WinXP laptop boots rather quickly as well, but my win2000 system doesn''t. My Linux system starts about 7 servers and a dozen other services on boot. I''d like the ability to load all the startup apps I want then take my snapshot. Your WinXP may load fast, but can it load with a copy of Outlook, OpenOffice Writer, and Mozilla just as quickly?
Drooling Iguana
Drooling Iguana
quote:
Original post by Monder
You could always use VMware to emulate windows on linux or linux on windows. As long as you don''t want to play games it runs fine (or so I''ve heard).
Why would anyone use Windows for anything other than playing games?

Bossk
Bossk
quote:
Original post by Drooling Iguana
Why would anyone use Windows for anything other than playing games?

I use Windows as anger management therapy. "DIE MOTHERFUCKING COMPUTER, DIEEEEE!!!!! AAAAAAAHHHHHHHHHH!" and so forth.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.