LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-02-2013, 02:53 AM   #1
soldmysou143software
LQ Newbie
 
Registered: May 2013
Posts: 4

Rep: Reputation: Disabled
Lightbulb 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:
http://blackfin.uclinux.org/gf/proje...on=ForumBrowse
Bonus from TI:
http://processors.wiki.ti.com/index...._Start_Address

Kernel memory limit on windows:
http://www.sevenforums.com/tutorials...ndows-7-a.html

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.


Dual Hibernation

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!
 
Old 05-02-2013, 02:26 PM   #2
rigor
Member
 
Registered: Sep 2011
Posts: 126

Rep: Reputation: Disabled
How would you contrast your idea with using dual-ported RAM, or the use of Virtual Machines?
 
Old 05-02-2013, 02:34 PM   #3
Timothy Miller
Member
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian Jessie, OpenSuse 13.1, Chakra.
Posts: 665

Rep: Reputation: 95
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.
 
Old 05-02-2013, 04:22 PM   #4
soldmysou143software
LQ Newbie
 
Registered: May 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
rigor:
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.

Timothy:
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.
 
Old 05-02-2013, 06:01 PM   #5
rigor
Member
 
Registered: Sep 2011
Posts: 126

Rep: Reputation: Disabled
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.
 
Old 05-02-2013, 07:38 PM   #6
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,377

Rep: Reputation: 824Reputation: 824Reputation: 824Reputation: 824Reputation: 824Reputation: 824Reputation: 824
Quote:
Dual Hibernation

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).
This is already available. I have no problem with hibernating a Linux session by closing the lid, then opening the lid, hitting the power button, getting a boot menu and then booting a hibernated Windows session.

Switching between suspended sessions seems infeasible. How would you keep track of the state of hardware registers for instance?
 
Old 05-02-2013, 09:43 PM   #7
soldmysou143software
LQ Newbie
 
Registered: May 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
allend,

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.
 
Old 05-02-2013, 10:40 PM   #8
Randicus Draco Albus
Member
 
Registered: May 2011
Location: Sitting in front of my computer.
Distribution: Debian
Posts: 953
Blog Entries: 2

Rep: Reputation: 237Reputation: 237Reputation: 237
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.
 
Old 05-04-2013, 12:39 AM   #9
soldmysou143software
LQ Newbie
 
Registered: May 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any one has idea about dual boot (Linux + windows8), In desktops those are coming wit subhash_max Linux - Desktop 3 12-19-2012 06:40 AM
Good idea/bad idea: interface colors introuble General 5 10-30-2006 01:33 PM
LXer: Freespire: Great Idea? Awful Idea? LXer Syndicated Linux News 1 05-04-2006 06:10 AM
Dual Boot Idea slappycakes Linux - Hardware 4 10-16-2003 04:35 PM
I'm a little fuzzy on this partition / dual boot concept... Help wjsulliv Linux - Newbie 5 11-17-2001 09:56 AM


All times are GMT -5. The time now is 09:55 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration