CN103064718A - Virtual machine loader - Google Patents

Virtual machine loader Download PDF

Info

Publication number
CN103064718A
CN103064718A CN2013100254107A CN201310025410A CN103064718A CN 103064718 A CN103064718 A CN 103064718A CN 2013100254107 A CN2013100254107 A CN 2013100254107A CN 201310025410 A CN201310025410 A CN 201310025410A CN 103064718 A CN103064718 A CN 103064718A
Authority
CN
China
Prior art keywords
virtual machine
module
subprocess
loader
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2013100254107A
Other languages
Chinese (zh)
Inventor
李瑞平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHADOWIN TECHNOLOGIES Inc
BEIJING SHADOWIN TECHNOLOGIES Co Ltd
Original Assignee
SHADOWIN TECHNOLOGIES Inc
BEIJING SHADOWIN TECHNOLOGIES Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHADOWIN TECHNOLOGIES Inc, BEIJING SHADOWIN TECHNOLOGIES Co Ltd filed Critical SHADOWIN TECHNOLOGIES Inc
Priority to CN2013100254107A priority Critical patent/CN103064718A/en
Publication of CN103064718A publication Critical patent/CN103064718A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a virtual machine loader. The virtual machine loader comprises a memory allocation module, a linking module, a relocation module and a load module, wherein the memory allocation module is used for allocating a memory space to a corresponding process; the linking module is used for handling the linkages between the dynamic depots; the relocation module is used for adjusting the size and location of a memory space to allow the allocated memory space to perform the associated process; and the load module is used for loading the logic module of the virtual machine. The virtual machine loader enables the virtual machine system to start and run smoothly.

Description

A kind of virtual machine loader
Technical field
The present invention relates to the virtual machine technique field, specifically, relate to a kind of virtual machine loader.
Background technology
In the prior art, development along with computer technology, the function of computing machine from strength to strength, although movable storage device or storage server have brought a lot of convenience to the user, the user can be worked at different computing machines, but, because the application software of the working environment of different computing machines and installation is far from each other, therefore bring great puzzlement to the user.In order to address the above problem, virtual opetrating system (VOS, VirtualOperating System) technology arises.VOS can allow the user use other operating system in the operating system of the machine, and each virtual opetrating system can have system configuration, document, the application program of oneself.Independent of one another between the virtual opetrating system, can not interfere with each other.The user can prepare a plurality of virtual opetrating systems simultaneously on an operating system, each virtual opetrating system can have different purposes, for example, and game, office, artistic creation etc.
A kind of mode that creates virtual opetrating system in the prior art is that the virtual machine (HWVM, HeavyWeight VirtualMachine) by heavyweight is set up a plurality of isolated virtual opetrating systems.If on virtual machine (VM, Virtual Machine), install and run application, must reinstall a cover operating system (being the child-operation system, Guest OS) at VM first, then could install normally and run application.Because VM is the machine that needs a sky of simulation, therefore, the application program of operation (for example, reading and writing of files, demonstration forms etc.) when needs call hardware resource in VM, each instruction of assigning must see through layer by layer conversion could true(-)running with reception and registration.
In a kind of dummy machine system, can make up a plurality of separate virtual machines, for some users simultaneously, operating system in each virtual machine, application program, user data etc. are all independently processed separately, service data and file leave in respectively in separately the unit, such framework could be realized the backup/restoration function of virtual machine well, but resource how to coordinate each virtual machine is distributed, the operation of logic module separately is to need a problem solving!
Summary of the invention
The invention provides a kind of virtual machine loader, can be so that dummy machine system start-up and operation swimmingly.
A kind of virtual machine loader provided by the invention comprises:
Memory allocating module is used for the storage allocation space to corresponding process;
Link block, interrelated for the treatment of between the dynamic base;
The reorientation module is adjusted and memory headroom size, position, so that can carry out associated process based on institute's storage allocation;
Insmod, be used for being written into the logic module of virtual machine self.
Wherein, corresponding process is given in memory allocating module storage allocation space, specifically comprises:
For initial processes and follow-up subprocess thereof are allocated memory headroom in advance.
More appropriately, wherein link block is processed interrelated between the dynamic base, is specially:
Set up subprocess and suspend newly-established subprocess based on the internal memory that distributes;
The environment control table function entrance that replaces subprocess;
Activate subprocess.
Module and/or virtual machine logic module when wherein the logic module of virtual machine self comprises the virtual machine operation.
The invention provides a kind of virtual machine loader, by being provided for the storage allocation space to the memory allocating module of corresponding process, for the treatment of the link block that is mutually related between the dynamic base, adjust and memory headroom size, position, so that can carry out the reorientation module of associated process based on institute's storage allocation, and the insmoding of logic module that is used for being written into virtual machine self, can be so that this dummy machine system start-up and operation swimmingly.
Description of drawings
The dummy machine system configuration diagram of Fig. 1 for providing in the embodiment of the invention;
Fig. 2 is that software module virtual and loader provided by the invention consists of schematic diagram;
The process flow diagram in the detailed processing of virtual environment lower linking tube application program of Fig. 3 for providing in the embodiment of the invention;
Fig. 4 is the flow process of a kind of VME operating system operation subprocess provided by the invention;
The operating procedure of the VOS primary module that provides in the embodiment of the invention is provided Fig. 5.
Embodiment
In view of the problem that the dummy machine system start-up and operation faces, a kind of virtual machine loader provided by the invention can be accepted object program, and these object programs are connected into the program that a Ge can allow virtual machine carry out.
Loader provided by the present invention and general sensu lato loader function, usage are close, but specific aim is different, loader of the present invention is based on a kind of dummy machine system, with reference to Fig. 2, can make up virtual machine separate more than two in this system, for some users simultaneously, the operating system in each virtual machine, application program, user data etc. are all independently processed separately, and service data and file leave respectively the framework in separately the unit in.Design for this kind virtual machine.In the specific implementation, each loader has logic separately, but flow process communicates substantially, so roughly the same with traditional loader mode of operation, loader provided by the invention has distribution, connection, reorientation, is written into four large functions.
With reference to Fig. 2, a kind of virtual machine loader 200 provided by the invention comprises:
Memory allocating module 21 is used for the storage allocation space to corresponding process;
Link block 22, interrelated for the treatment of between the dynamic base;
Reorientation module 23 is adjusted and memory headroom size, position, so that can carry out associated process based on institute's storage allocation;
Insmod 24, be used for being written into the logic module of virtual machine self.
Wherein, in specific embodiments of the present invention, corresponding process is given in memory allocating module 21 storage allocation spaces, specifically comprises:
For initial processes and follow-up subprocess thereof are allocated memory headroom in advance.
In specific embodiments of the present invention, link block 22 is processed interrelated between the dynamic base, is specially:
Set up subprocess and suspend newly-established subprocess based on the internal memory that distributes;
With the environment control table that copies, such as Windows Access Control List (ACL) (ACL, Access ControlLists), with environment control table and the DLL function entrance point of dynamic link library (DLL) function entrance point replacement subprocess;
Check the file path of DLL lead in item in the subprocess DLL function entrance point;
Judge whether virtual route of this path, if so, then with this DLL lead in item deletion and be kept in the DLL virtual path table;
Activate subprocess and the DLL virtual path table is passed to subprocess.
Module and/or virtual machine logic module when the logic module of described virtual machine self comprises the virtual machine operation.
The loader that provides in the embodiment of the invention as shown in Figure 3, comprises following treatment step at the process flow diagram of the detailed processing of virtual environment lower linking tube application program:
Step S301 is written into internal memory with the execute file (exe file) of wanting start-up routine;
Step S302, the Manifest of temporary transient shielding harness (master operating system Host OS) detects;
Step S303 sets up subprocess and suspends newly-established subprocess with this internal memory;
Step S304 is written into the shell program internal memory and places program containers;
Step S305, the NT that replaces subprocess with NT table (Native API) and the dynamic link libraries DLL function entrance point that copies shows and DLL function entrance point;
Step S306, the file path of DLL lead in item in the inspection subprocess DLL function entrance point;
Step S307 judges whether virtual route of this path, if so, then with this DLL lead in item deletion and be kept in the DLL virtual path table, otherwise carries out next step;
Step S308 has judged whether untreated DLL lead in item, if so, and execution in step S306 then, otherwise enter next step;
Step S309 is with the gauge outfit of the DLL function entrance point of the dll file path intron process of virtual opetrating system VOS simulator primary module;
Step S310, the dotNET metadata of removing subprocess;
Step S311 activates subprocess and the DLL virtual path table is passed to subprocess, changes the operating procedure of subprocess over to this.
Step then below is the operating procedure that changes subprocess over to:
Step S401, system (Host OS) is written into VOS simulator primary module automatically;
Step S402, system (Host OS) is written into the DLL module of all non-virtual routes automatically;
Step S403, operation VOS primary module;
The operating procedure explanation of VOS primary module:
Step S501 reverts back original table with substituted NT table with DLL function entrance point;
Step S502 changes the inlet point of the SysEntry system service of Host OS into the inlet point of the SysEntry system service of VOS;
Step S503 is written into the allocation list of VOS;
Step S504 is written into the VOS functional module of appointment according to allocation list;
Step S505, initialization VOS functional module also obtains the system function tabulation of support;
Step S506 obtains the function entry in the function list;
Step S507, system determine whether the low order system function;
Step S508 if the judgment is Yes, then registers ID and the inlet point of this function to the SysEntry system service of VOS;
Step S509 if the judgment is No, then continues to determine whether the primary function of NT;
Step S510, if the judgment is Yes, then the interior respective function of Detours NTDLL is in the content of internal memory;
Step S511, if the judgment is No, then find out this function in DLL position, Win32DLL group place is carried out this DLL of Detours again respective function in the content of internal memory;
Step S512 judges whether to also have untreated function record, if the judgment is Yes, then gets back to step S507 and carries out, if be no, then continues next step;
Step S513 judges whether the functional module of no initializtion, if the judgment is Yes, then gets back to step S505 and carries out, if be no, then continues next step;
Step S514 is written into function according to the DLL virtual path table that imports into the DLL of VOS and is written into DLL all in the table;
Step S515, initialization TLS revises the work at present catalogue, removes the environmental variance that parent process VOS adds;
Step S516 determines whether dot NET process, if the judgment is Yes, then is written into and starts CLR, if the judgment is No, then directly carries out step S507;
Step S517 calls the dotNET metadata that CLR is written into subroutine again;
Step S518, the VOS primary module is according to the entrance of the entrance record calling process in the PE table.
For a kind of dummy machine system, can make up a plurality of separate virtual machines in this system, for some users simultaneously, operating system in each virtual machine, application program, user data etc. are all independently processed separately, service data and file leave respectively the framework in separately the unit in, the invention provides a kind of virtual machine loader, have for the memory allocating module of storage allocation space to corresponding process, for the treatment of the link block that is mutually related between the dynamic base, adjust and the memory headroom size, the position, so that can carry out the reorientation module of associated process based on institute's storage allocation, and the insmoding of logic module that is used for being written into virtual machine self, can be so that this dummy machine system start-up and operation swimmingly.
Although the present invention with exemplary embodiment openly as above; but it is not to limit the present invention; any those skilled in the art without departing from the spirit and scope of the present invention; can make possible change and modification, so protection scope of the present invention should be as the criterion with the scope that claim of the present invention was defined.
Although the present invention with preferred embodiment openly as above; but it is not to limit the present invention; any those skilled in the art without departing from the spirit and scope of the present invention; can make possible change and modification, so protection scope of the present invention should be as the criterion with the scope that claim of the present invention was defined.

Claims (4)

1. a virtual machine loader is characterized in that, comprising:
Memory allocating module is used for the storage allocation space to corresponding process;
Link block, interrelated for the treatment of between the dynamic base;
The reorientation module is adjusted and memory headroom size, position, so that can carry out associated process based on institute's storage allocation;
Insmod, be used for being written into the logic module of virtual machine self.
2. virtual machine loader as claimed in claim 1 is characterized in that, corresponding process is given in described memory allocating module storage allocation space, specifically comprises:
For initial processes and follow-up subprocess thereof are allocated memory headroom in advance.
3. virtual machine loader as claimed in claim 1 is characterized in that, described link block is processed interrelated between the dynamic base, is specially:
Set up subprocess and suspend newly-established subprocess based on the internal memory that distributes;
The environment control table function entrance that replaces subprocess;
Activate subprocess.
4. virtual machine loader as claimed in claim 1 is characterized in that, module and/or virtual machine logic module when the logic module of described virtual machine self comprises the virtual machine operation.
CN2013100254107A 2013-01-23 2013-01-23 Virtual machine loader Pending CN103064718A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013100254107A CN103064718A (en) 2013-01-23 2013-01-23 Virtual machine loader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013100254107A CN103064718A (en) 2013-01-23 2013-01-23 Virtual machine loader

Publications (1)

Publication Number Publication Date
CN103064718A true CN103064718A (en) 2013-04-24

Family

ID=48107355

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013100254107A Pending CN103064718A (en) 2013-01-23 2013-01-23 Virtual machine loader

Country Status (1)

Country Link
CN (1) CN103064718A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101154259A (en) * 2007-08-27 2008-04-02 电子科技大学 General automated shelling engine and method
US20080083030A1 (en) * 2006-09-29 2008-04-03 Durham David M Method and apparatus for run-time in-memory patching of code from a service processor
CN101158911A (en) * 2007-11-22 2008-04-09 北京飞天诚信科技有限公司 .Net program protection method and device
CN101236489A (en) * 2008-02-26 2008-08-06 北京深思洛克数据保护中心 Dummy hardware system and its instruction execution method and dummy machine
CN101645020A (en) * 2008-08-04 2010-02-10 优诺威讯国际有限公司 Virtual operating system creation method
US20100037040A1 (en) * 2008-08-11 2010-02-11 Eunovation Int'l Limited Method and apparatus for implementing virtual environment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080083030A1 (en) * 2006-09-29 2008-04-03 Durham David M Method and apparatus for run-time in-memory patching of code from a service processor
CN101154259A (en) * 2007-08-27 2008-04-02 电子科技大学 General automated shelling engine and method
CN101158911A (en) * 2007-11-22 2008-04-09 北京飞天诚信科技有限公司 .Net program protection method and device
CN101236489A (en) * 2008-02-26 2008-08-06 北京深思洛克数据保护中心 Dummy hardware system and its instruction execution method and dummy machine
CN101645020A (en) * 2008-08-04 2010-02-10 优诺威讯国际有限公司 Virtual operating system creation method
US20100037040A1 (en) * 2008-08-11 2010-02-11 Eunovation Int'l Limited Method and apparatus for implementing virtual environment

Similar Documents

Publication Publication Date Title
JP6122493B2 (en) Adaptively portable library
CN101751284B (en) I/O resource scheduling method for distributed virtual machine monitor
WO2012131507A1 (en) Running a plurality of instances of an application
US20180067674A1 (en) Memory management in virtualized computing
KR20070100367A (en) Method, apparatus and system for dynamically reassigning memory from one virtual machine to another
US10452686B2 (en) System and method for memory synchronization of a multi-core system
CN101819538A (en) The requests of operating systems in virtual machine is carried out in management
US10296400B2 (en) Configuring resources used by a graphics processing unit
US9529618B2 (en) Migrating processes between source host and destination host using a shared virtual file system
TW201738741A (en) Method and apparatus for creating virtual machine
US20060020701A1 (en) Thread transfer between processors
CN104573422A (en) Virtual machine-based application process operation method and device
KR102214698B1 (en) Servers and computer programs for debugging of native programs and virtual machine programs on integrated development environment
US20130212587A1 (en) Shared resources in a docked mobile environment
CN102750493B (en) Access right control method, Apparatus and system
EP2977897A1 (en) Compatibility method and apparatus
US20100042919A1 (en) Windowless cross platform program, method and environment
CN117573338A (en) Resource allocation method and device and electronic equipment
US20150269767A1 (en) Configuring resources used by a graphics processing unit
CN107315631A (en) A kind of method for scheduling task and device
Xu et al. Condroid: a container-based virtualization solution adapted for android devices
CN103064718A (en) Virtual machine loader
US10019287B1 (en) Virtual machine resource display
US6772259B2 (en) Interrupt handlers used in different modes of operations
CN103631648A (en) Task processing method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20130424