Patent ID: 8924959

Claim:
A virtual machine system, comprises a Service OS, Guest OSs, a virtual machine monitor (VMM) and hardware devices, wherein the Service OS and the Guest OSs run over the VMM, the hardware devices includes a first type of hardware devices that can be directly accessed by the Guest OSs and a second type of hardware devices that cannot be directly accessed by the Guest OSs, wherein the first type of hardware devices include all-time exclusive devices and/or time division switching devices, and the second type of hardware devices include all-time sharing devices, wherein the Service OS is able to generate request of accessing a hardware device, and comprises respective device model (DM) modules corresponding to the respective Guest OSs, wherein the Guest OSs comprise three types of drive modules comprising a drive module for all-time sharing devices, a drive module for time division switching devices and a drive module for all-time exclusive devices, wherein the VMM comprises a resource converting module, a switching judging module and an access control module, wherein, said resource converting module is provided for storing converting relationships between resources allocated by the Service OS and by the Guest OSs for the first type of hardware devices, and further provided for converting an accessing address for the Guest OSs to a real physical address of a corresponding hardware device based on the converting relationships when the Guest OSs generate a request of accessing the hardware device to be directly accessed, said switching judging module is provided for judging whether pressed keys are switching combined keys, and in case of a positive result, informing said access control module, wherein the access control module sequentially informs, the DM module of a foreground Guest OS to release the hardware devices to be switched from its device space, which DM module of the foreground Guest OS in turn informs the access control module to remove resource converting relationships corresponding to the foreground Guest OS for the hardware devices switched from the resource converting module; and the DM module of a background Guest OS to add the hardware devices to be switched to its device space, which DM module of the background Guest OS in turn informs the access control module to add resource converting relationships corresponding to the background Guest OS for the hardware devices switched to the resource converting module.