43 | | When a VM is running, from your processor's point of view, your computer can be in one of several states (the following will require a good understanding of the x86 ring architecture): |
| 44 | * allocating physical memory for the VM; |
| 45 | |
| 46 | * saving and restoring CPU registers and descriptor tables when a host interrupt occurs while a guest's ring-3 code is executing (e.g. when the host OS wants to reschedule); |
| 47 | |
| 48 | * when switching from host ring-3 to guest context; |
| 49 | |
| 50 | * enable or disable VT-x etc. support. |
| 51 | |
| 52 | Most importantly, the host's ring-0 driver does ''not'' mess with your OS's scheduling or process management. The entire guest OS, including its own hundreds of processes, is only scheduled when the host OS gives the VM process a timeslice. |
| 53 | |
| 54 | After a VM has been started, from your processor's point of view, your computer can be in one of several states (the following will require a good understanding of the x86 ring architecture): |
62 | | Finally, there is also a ring-0 driver that must be loaded in the host OS for !VirtualBox to work. However, this ring-0 driver does less than you may think. It is only needed for a few specific tasks, such as: |
63 | | |
64 | | * allocating physical memory for the VM; |
65 | | |
66 | | * saving and restoring CPU registers and descriptor tables when a host interrupt occurs while a guest's ring-3 code is executing (e.g. when the host OS wants to reschedule); |
67 | | |
68 | | * when switching from host ring-3 to guest context; |
69 | | |
70 | | * enable or disable VT-x etc. support. |
71 | | |
72 | | Most importantly, the host's ring-0 driver does ''not'' mess with your OS's scheduling or process management. The entire guest OS, including its own hundreds of processes, is only scheduled when the host OS gives the VM process a timeslice. |
73 | | |