Concept for my idea: Dual Suspend
Hello, Dear Community!
Today the amounts of RAM we can get for laptops/desktops are close to what servers had just a few years back.
Most of the time we barely use even 50% of the total memory available, unless gaming or dealing with virtualization/video editing/3D-modelling on a large scale.
I had an idea for computers with dual-boot (let's take for example Linux and Windows OSs) to simplify the switching between them. Having 12-16GB of RAM is too much for any of those systems most of the time.
But what if we could divide RAM between two of them simultaneously?
If may sound like a crazy idea, but aside from solving a couple of possible issues, the whole concept is extremely trivial by itself.
Imagine that you worked on linux for 4 hours, then you decided you had to use Photoshop or wanted to play with your friends on Windows (what else is there to do, right? Ü ). Instead of losing your session on linux and rebooting to get into Windows, you just put your computer into suspend, then wake it up, get a bootloader-alike prompt menu and choose Windows there (or linux, if you changed your mind).
My vision on how it can be accomplished:
In grub or any other bootloader, we tell the kernel which memory range it can occupy, instead of using the whole amount.
For example, we tell linux to occupy the last 8GB of RAM, while windows will be limited to use the first 8GB.
(Below I'm posting links to materials I found on how to do that, but now sure if that's going to be enough):
Memory starting address on linux:
Bonus from TI:
Kernel memory limit on windows:
Once we suspend our machine, we get to the first tricky part: we have to call a 'fake' bootloader upon resume, before we actually get back to the saved session in our RAM. It should be able to point at the certain address in our memory, or load a certain OS to that address range in the RAM. I actually thought that it might be possible to accomplish by calling a patched grub installation, but without rebooting/discarding the ram content. I'm sorry, I'm not that deep into boot stages and/or suspend/resume mechanics.
So if we don't have a suspended OS by the specific address in ram, that 'fake' bootloader will load the OS just as GRUB would, but without wiping the other suspended sessions from other OS's in the RAM.
This might be simpler or easier, not sure.
Sharing the RAM is not required in case with hibernation, just a lot of disk space (SWAP or big system partition on Windows).
The only thing required here is to patch the hibernation mechanics on both windows and linux to start grub after powering up the system after hibernation.
I'm actually not sure that it's not working by default right now because I don't have enough space to suspend both of my OS's to a 120GB SSD :)
I see the future where we switch between different Operating Systems by closing and opening lids of our laptops, future where we don't reboot as much and don't have to start our precious sessions all over and over again.
It's possible and I believe in this idea, that it will make our lives better and we never ever again will have to deal with long system boots!
Thank you for taking time to read my post, especially the last paragraph which turned out being quite obnoxious instead of motivational.
I'll be glad to hear any opinions or comments on it!
How would you contrast your idea with using dual-ported RAM, or the use of Virtual Machines?
Yeah, I'd think just implementing a virtualized instance of Windows with 3d acceleration and then running it fullscreen would suffice for non-gaming purposes.
I don't really think DPRAM has much in common with my idea.
I'm talking about splitting the ram, and not simultaneously reading from it.
And VMs is great aside the fact that they don't have a real access to the computer's hardware, therefore won't give the performance I paid for when bought the laptop.
Virtualization is what most people do, but it kills the performance.
If I'm going to play games then it's not for me, you're right.
I honestly think it's worth a try, at least a prototype with two linux installations running occupying one split ram simultaneously.
Virtualization has come a long way. With some VM's it is possible to access the real hardware in some cases, and the performance of some VM's that can take advantage of hardware support for virtualization, is quite reasonable.
Switching between suspended sessions seems infeasible. How would you keep track of the state of hardware registers for instance?
saving them and restoring with that RAM bootloader could do the trick.
Sounds like too much work, can't it be done by re-initializing hardware upon resume?
I'm really glad that it works in case with hibernation, but that still takes longer than suspending to RAM and requires additional 16-32GB of the disk space on average. And that might be a lot if we got an SSD.
My opinion is that how much or little merit the idea has is not that important. The important factor is the amount of desire among users to have such an ability versus the work required to create it. If many dual- and multi-booters would like the idea to be implemented, then it would be worth the effort to do so. Otherwise, anyone who goes through the effort of creating it would waste the effort (assuming it could be done) if there is not a demand for it.
Two factors I can think of hindering such development are:
1) One or two minutes to boot the computer is insignificant. So the half minute saved would not be a great motivator.
2) Some may consider having to save their work and close applications before re-booting to be an inconvenience, but most people do not have a desire to switch back and forth between systems every few minutes, and therefore, do not feel inconvenienced by having to save and quit.
In short; the good and bad news.
I am sure some people will love your idea, but I doubt there would be a big demand for it.
Randicus Draco Albus, you're probably right that it won't take much time to reboot the system instead of switching it through suspend/resume, but I still see it as an upgrade for people who have to switch constantly.
Thank you for reading, your opinions and the contribution to the discussion.
I still believe it would be the next step from rebooting the system (as people have to do right now).
Maybe we will see something similar sometime soon.
|All times are GMT -5. The time now is 05:23 AM.|