45

Is it possible to dual boot two OS's at the same time?

For example: I'm currently dual booting Ubuntu 11.04 and Windows 7. Ubuntu is running on a single 500gb HDD, Windows 7 is running on 1TB RAID 1 mirror. To switch between the two OS's, a reboot is required. Is it possible to switch between the two OS's without a reboot?

NOTE: I'm fully aware of the capabilities of VirtualBox and VMWare Player - I use both. Please don't answer "Use Virtualization!"

EDIT: If this is not possible can you share why it's not possible? To me, it doesn't seem like it would be that difficult. Keep in mind that my vision is unencumbered by knowledge!

James Hill
  • 1,089

9 Answers9

44

Most, if not all, mainstream operating systems expect to have exclusive acccess to the host computer's low-level functionality (eg: hardware, ports etc.) and do not have any concept of sharing with anything else - it just won't work - so to try and run two OSs simultaneously on the same system requires some form of transparent arbitrator to shield the operating systems from each other - in other words, a virtualization application.

Linker3000
  • 28,240
24

You seem to be dismissing Hyper-V and Xen (so called "bare-metal" hypervisors) even though they're closest to what you seem to be asking for. Yes, it's virtualization, but not in the same way that VirtualBox works.

Imagine something like VirtualBox was its own operating system, so you could install a tiny VirtualBox OS, and then run Windows and Ubuntu side by side as virtual machines on top of the VirtualBox OS. Well, that's essentially what Hyper-V or Xen do. It's just a thin virtualization layer between the hardware and the guest operating systems, and it's as close as you can get to directly running them side by side with existing hardware and existing operating systems.

You don't need a separate server for either of these, you'd just install the hypervisor as if it was the first operating system on the machine, and then add Windows and Ubuntu as virtual machines under the hypervisor.

Both Xen and Hyper-V will run Ubuntu and Windows as guest operating systems, although it may not be a supported configuration. Xen is more Linuxy and Hyper-V is an MS product, so I'd suggest picking the hypervisor based on whichever OS you're more comfortable with.

Kevin
  • 4,011
  • 1
  • 19
  • 9
9

The closest thing you could do... is make use of hibernation. Unfortunately, the operating systems are alien enough to each other that there is no way for both OS'es to be running at the same time without implementing virtualization. Honestly, virtualization isn't as bad as you think anymore... especially when you are using a virtualization platform that supports the "VT" extensions. The guest OSes get the ability to communicate directly with hardware, and have much better memory mapping & such. I've actually setup a guest OS installed directly on a SSD... and it ran faster than the host OS.

TheCompWiz
  • 10,912
7

Here's the simple, short reason the answer is 'no': What software would control your hardware?

If OS 1 does it, then you are not running OS 2. If OS 2 does it, then you are not running OS 1. If they both do it, then then some other software would have to mediate their shared access to the physical hardware, and that's virtualization (which you ruled out).

2

Things that come to mind are :
- Memory management ( ram and cache )
- Process management (process threads running )

So you would probably need a man in the middle juggling memory usage and processes between the two OSs .

That would be another os/firmware.
So if somebody has implemented it os will implemented it , you might end up with 3 instead of 2 Oss running simultaneously

EDIT-
Adding what linker3000 wrote : managing of ports

This 'man in the middle ' will essentially become your host OS and the other OSs virtualized , leading you back to what you already knew was a solution

Shekhar
  • 5,139
2

All OSs I'm aware of demand total control of the computer hardware.

It is theoretically possible though. Both OSs would need to be designed to:

  • Run as both a master(total hardware control) and a slave(requests resources from the master OS)
  • Relinquish control of the hardware upon request from another OS

If both of these conditions are met it would be possible to run two OSs simultaneously without any kind of virtualization. It would be akin to two OSs using cooperative multitasking. Of course, cooperative multitasking has all but been abandoned because of the issue of poorly written applications refusing to cede control. Perhaps two properly written OSs would play nice. Then again what would be the incentive?

2

Let me address the "why" part.

One of the reasons for a modern OS is to allow multiple programs (processes) to run at the same time on a system. If you want to do this safely, the following needs to happen:

  • You probably (unless you have special needs) don't want to divvy up the RAM in the system in a fixed fashion - e.g. 256MB fixed per process - limits you to 8 processes in a 2GB system. You'd like each process to be able to "ask" for memory and return it when it's done.

  • You also don't want to divvy up I/O devices in a fixed fashion among devices. Typically you want some or all the hardware, like memory to be a shared resource, or at least only temporarily exclusive to specific processes at specific times. This requires that all processes not try to do I/O on their own, but "go through" something to schedule and coordinate the I/O. The scheduling is important since most I/O is much slower than the CPU, so you can have the CPU do work for other processes while it is waiting on I/O even on a single-core system.

To do the above right, one needs to take advantage of several CPU hardware features. One of these is the MMU, the other is protected mode. Could two OSes share these hardware features cooperatively to run two or more OSes?

Sure, but there is nothing in hardware able to stop one OS from stomping all over the other OSes memory. If the CPU is in kernel mode (it only has one kernel mode), any code can do anything. It's 100% possible for code from one OS to run over the code or data of the other OS. And we know operating systems have had vulnerabilities in the past and will have more in the future. So it's very bad for security.

Now, wouldn't it be cool if you could put another "layer" over this and have that needed hardware support for multiple OSes? That's exactly what the hardware virtualization features do, they put a hardware barrier between multiple running OSes, and there is a top-level "interface" for them called a hypervisor. You can only have one hypervisor. And yes, processes running under either OS must go through three layers to do I/O (process - local kernel - hypervisor)

LawrenceC
  • 75,182
0

I know you said no Virtualization, but something like MS Hyper V server may fit your needs

Akash
  • 3,758
  • 1
  • 21
  • 34
0

There is no other way than virtualization. I find it difficult to get definitve information which guest systems will work for the different hypervisors. http://en.wikipedia.org/wiki/Hypervisor Should be a good start to get some information and Xen might be worth a try, though I would wait for someone to definitely confirm or deny if it supports Windows 7 guests.

Nornagest
  • 74
  • 4