CN106708619A - Resource management method and apparatus - Google Patents
Resource management method and apparatus Download PDFInfo
- Publication number
- CN106708619A CN106708619A CN201510429902.1A CN201510429902A CN106708619A CN 106708619 A CN106708619 A CN 106708619A CN 201510429902 A CN201510429902 A CN 201510429902A CN 106708619 A CN106708619 A CN 106708619A
- Authority
- CN
- China
- Prior art keywords
- physical resource
- application
- use information
- user
- resource use
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
Abstract
Embodiments of the invention provide a resource management method and apparatus. The method comprises the steps of obtaining physical resource use information, wherein the physical resource use information is used for indicating an application to run required physical resources; and allocating independent physical resources to the application according to the physical resource use information, and allocating an interface used for directly accessing the physical resources to the application, thereby enabling the application to directly access the physical resources. Therefore, the resource contention of different applications to an operation system kernel is reduced and the system performance is improved.
Description
Technical field
The present embodiments relate to computer technology, more particularly to a kind of method for managing resource and device.
Background technology
In operating system general at present, application cannot be perceived and/or control physical resource, i.e., when any
When the application needs to access resource, it is required for being absorbed in the kernel of the operating system, by described interior
Core accesses resource.Therefore, when multiple applications of the operating system are required for accessing resource, can draw
Kernel resources contention is played, causes systematic function to decline.
The content of the invention
The embodiment of the present invention provides a kind of method for managing resource and device, improves systematic function.
In a first aspect, the embodiment of the present invention provides a kind of method for managing resource, including:
Physical resource use information is obtained, needed for the physical resource use information is used to indicate application to run
The physical resource wanted;
It is that the application distributes independent physical resource according to the physical resource use information, and for described
It is used to directly access the interface of the physical resource using distribution, so that the application directly accesses the thing
Reason resource.
With reference in a first aspect, in the first possible implementation of first aspect, the acquisition physics
Resource using information, including:
Obtain the default physical resource use information;Or,
The hardware controls data structure sent according to the application obtains the physical resource use information;Its
In, the hardware controls data structure includes the physical resource use information.
With reference to the first possible implementation of first aspect or first aspect, the second of first aspect
It is described for the application is distributed for directly accessing connecing for the physical resource in the possible implementation of kind
Mouthful, including:
For user's space system service functions storehouse is set up in the application, and by the kernel needed for the application
Management data structures are copied in the user's space system service functions storehouse, wherein, the management data
Structure is used to directly access the physical resource.
With reference to second possible implementation of first aspect, in the third possible reality of first aspect
In existing mode, also include:For the application distributes the management strategy for managing the physical resource;Its
In, the user's space system service functions storehouse includes:The management strategy.
With reference to first aspect, first aspect the first to the third any one possible implementation,
In 4th kind of possible implementation of first aspect, described is institute according to the physical resource use information
State using the independent physical resource of distribution, and for the application is distributed for directly accessing the physical resource
Interface after, also include:
Dynamic updates the independent physical resource, and synchronized update operating system nucleus and the user are empty
Between inner core managing data structure in system service functions storehouse.
With reference to first aspect, first aspect the first to the 4th kind of any one possible implementation,
In 5th kind of possible implementation of first aspect, described is institute according to the physical resource use information
State using the independent physical resource of distribution, and for the application is distributed for directly accessing the physical resource
Interface after, also include:
Abnormality processing function is set, and the abnormality processing function is used for when the applications trigger is abnormal, institute
State to apply and abnormality processing is carried out according to the abnormality processing function.
With reference to first aspect, first aspect the first to the 5th kind of any one possible implementation,
In 6th kind of possible implementation of first aspect, the physical resource use information include it is following at least
It is a kind of:Physical memory information, central processor CPU information, register access control authority, input/
Output equipment access limit and privileged instruction perform authority.
Second aspect, the embodiment of the present invention provides a kind of resource management apparatus, including:
Acquisition module, for obtaining physical resource use information, the physical resource use information is used to refer to
Show using the physical resource required for operation;
Distribute module, for being that the application distributes independent physics according to the physical resource use information
Resource, and for the application distributes the interface for directly accessing the physical resource, so that the application
Directly access the physical resource.
With reference to second aspect, in the first possible implementation of second aspect, the acquisition module
Specifically for:
Obtain the default physical resource use information;Or,
The hardware controls data structure sent according to the application obtains the physical resource use information;Its
In, the hardware controls data structure includes the physical resource use information.
With reference to the first possible implementation of second aspect or second aspect, the second of second aspect
In kind possible implementation, the distribute module specifically for:
For user's space system service functions storehouse is set up in the application, and by the kernel needed for the application
Management data structures are copied in the user's space system service functions storehouse, wherein, the management data
Structure is used to directly access the physical resource.
With reference to second possible implementation of second aspect, in the third possible reality of second aspect
In existing mode, the distribute module is additionally operable to:For the application is distributed for managing the physical resource
Management strategy;Wherein, the user's space system service functions storehouse includes:The management strategy.
With reference to second aspect, second aspect the first to the third any one possible implementation,
In 4th kind of possible implementation of second aspect, described device also includes:
Update module, the independent physical resource is updated for dynamic, and in synchronized update operating system
Inner core managing data structure in core and the user's space system service functions storehouse.
With reference to second aspect, second aspect the first to the 4th kind of any one possible implementation,
In 5th kind of possible implementation of second aspect, described device also includes:
Exception processing module, for setting abnormality processing function, the abnormality processing function is used for when described
When applications trigger is abnormal, the application carries out abnormality processing according to the abnormality processing function.
With reference to second aspect, second aspect the first to the 5th kind of any one possible implementation,
In 6th kind of possible implementation of second aspect, the physical resource use information include it is following at least
It is a kind of:Physical memory information, central processor CPU information, register access control authority, input/
Output equipment access limit and privileged instruction perform authority.
In the present invention, by obtaining physical resource use information, the physical resource use information is used to refer to
Show using the physical resource required for operation;Further, it is institute according to the physical resource use information
State using the independent physical resource of distribution, and for the application is distributed for directly accessing the physical resource
Interface so that it is described application directly access the physical resource;So as to reduce different application to operation
The contention for resources of system kernel, improves systematic function.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to reality
The accompanying drawing to be used needed for example or description of the prior art is applied to be briefly described, it should be apparent that, under
Accompanying drawing in the description of face is some embodiments of the present invention, for those of ordinary skill in the art,
On the premise of not paying creative labor, other accompanying drawings can also be obtained according to these accompanying drawings.
Figure 1A is the operating system Organization Chart one of method for managing resource of the present invention;
Figure 1B is the schematic flow sheet of method for managing resource embodiment one of the present invention;
Fig. 2A is the operating system Organization Chart two of method for managing resource of the present invention;
Fig. 2 B are the schematic diagram of method for managing resource embodiment three of the present invention;
Fig. 2 C are the schematic diagram of method for managing resource example IV of the present invention;
Fig. 3 is the structural representation of resource management apparatus embodiment one of the present invention;
Fig. 4 is the structural representation of resource management apparatus embodiment two of the present invention;
Fig. 5 is the structural representation of resource management apparatus embodiment three of the present invention.
Specific embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with this hair
Accompanying drawing in bright embodiment, is clearly and completely described to the technical scheme in the embodiment of the present invention,
Obviously, described embodiment is a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained under the premise of creative work is not made
The every other embodiment for obtaining, belongs to the scope of protection of the invention.
Figure 1A is the operating system Organization Chart one of method for managing resource of the present invention, and Figure 1B is resource of the present invention
The schematic flow sheet of management method embodiment one.The executive agent of the present embodiment is configuration in operating system
Resource management apparatus in core, the device can be realized by software and/or hardware.The scheme of the present embodiment
It is applied in general operating system, realizing User space application can directly be visited with workaround system kernel
It is the physical resource of application distribution to ask and manage.As shown in Figure 1B, the method for the present embodiment can be wrapped
Include:
S101, acquisition physical resource use information, the physical resource use information are used to indicate application fortune
Physical resource required for row.
As shown in Figure 1A, operating system at least includes:Hardware resource, operating system nucleus and application;
Wherein, resource management apparatus are provided with the operating system nucleus.In the embodiment of the present invention, obtain and use
The physical resource use information of the physical resource required for application operation is indicated;Alternatively, the physics
Resource using information includes following at least one:Physical memory information, central processor CPU information, post
Storage access control right, input-output apparatus access limit and privileged instruction perform authority;Alternatively,
The physical resource use information may also include other physical resource Informations, and the present invention is not restricted to this.
Alternatively, step S101 includes:Obtain the default physical resource use information;Or, root
The hardware controls data structure sent according to the application obtains the physical resource use information;Wherein, institute
Stating hardware controls data structure includes the physical resource use information.
In the embodiment of the present invention, the physical resource use information can be default physical resource use information,
Or be the hardware controls data structure including the physical resource use information sent according to the application
Obtain the physical resource use information.
S102, it is that the application distributes independent physical resource according to the physical resource use information, and
For the application distributes the interface for directly accessing the physical resource, so that the application is directly accessed
The physical resource.
In the embodiment of the present invention, the physics of the physical resource required for getting for indicating application operation
It is that the application distributes independent physics money according to the physical resource use information after resource using information
Source (i.e. the unusable physical resource of other application) (such as CPU, physical memory, I/O equipment and spy
Power instruction performs authority etc.), and for the application distributes the interface for directly accessing the physical resource,
So that the application directly accesses the physical resource by the interface, i.e., described application upgrade is for can be around
Cross operating system nucleus and directly access the physical resource (as directly performed privileged instruction, directly management
CPU, directly management physical memory and directly access I/O equipment etc.) propose power application;So as to reduce
Different application improves systematic function to the contention for resources of operating system nucleus.
Alternatively, it is that the application is distributed and included for directly accessing the interface of the physical resource:For institute
State using setting up user's space system service functions storehouse, and by the management data of the kernel needed for the application
Structure replication in the user's space system service functions storehouse, wherein, the management data structures are used for
Directly access the physical resource.
In order to ensure nutrition compatibility in the embodiment of the present invention, user's space system is set up by for the application
System service function storehouse, and it is empty that the management data structures of the kernel needed for the application are copied into the user
Between mode in system service functions storehouse provide for directly accessing connecing for the physical resource for the application
Mouthful;Alternatively, according to the physical resource initialization processor virtualization hardware, and by user's space system
Independent physical resource described in system service function library initialization, in order to be taken by the user's space system
Business function library provides interface (alternatively, the user's space system service functions storehouse Zhong Bao to the application
The corresponding Service Management function routine of the independent physical resource is included, the application is directly invoked when performing
Service Management function routine in the user's space system service functions storehouse is that may have access to or manage the thing
Reason resource, without being absorbed in operating system nucleus);Proposing the application after power can directly by management, renewal
The operation of management data structures in the user's space system service functions storehouse is maintaining application just
Often operation.
Alternatively, method for managing resource of the present invention also includes:For the application is distributed for managing the thing
Manage the management strategy of resource;Wherein, the user's space system service functions storehouse includes:The management plan
Slightly;In order to the application by the interface in the user's space system service functions storehouse and/or management plan
Slightly directly access or manage the physical resource.
In embodiments of the present invention, the operating system can be the (SuSE) Linux OS increased income,
Microsoft Corporation exploitation Windows operating system, the android system of Google companies or
The operating systems such as the iOS system of Apple companies exploitation, or this kind of embedded operations of Vxworks
System.The operating system includes for controlling and manage general system tasks, such as memory management, deposits
The control of storage equipment, power management etc., and contribute to the various assemblies that communicate between various software and hardwares and/or
Driver.
In the embodiment of the present invention, by obtaining physical resource use information, the physical resource use information
Physical resource required for for indicating application operation;Further, letter is used according to the physical resource
Cease for the application distributes independent physical resource, and for the application is distributed for directly accessing the thing
The interface of resource is managed, so that the application directly accesses the physical resource;I.e. described application can bypass behaviour
Make system kernel and directly access the physical resource, so as to reduce different application to operating system nucleus
Contention for resources, improves systematic function.
When the I/O equipment is shared equipment, in order to ensure that the application accesses the security of I/O equipment,
Alternatively, called by message type system and share the I/O equipment with other application, answered as described in
The interface provided with corresponding user's space system service functions storehouse, request institute is sent to operating system nucleus
State the message of I/O equipment.
Alternatively, also include after step S102:Dynamic updates the independent physical resource, and synchronously
Update the inner core managing data structure in operating system nucleus and the user's space system service functions storehouse.
In the embodiment of the present invention, alternatively, when it is described carry power application need in the process of running change physics
It is described to put forward power during resource (such as changing control authority or application physical memory, CPU, I/O equipment)
Using can by call include in the user's space system service functions storehouse for operating system nucleus
Interactive interface, request message (institute is sent to the resource management apparatus in the operating system nucleus
State in request message and carry the physical resource Information that power application needs to update comprising described) so that the resource
Managing device dynamically updates the independent physical resource according to the request message;Alternatively, according to institute
Stating needs the physical resource Information for updating to update user's space system service functions storehouses (in i.e. User space is specified
Deposit) and operating system nucleus in management data structures.
Alternatively, propose power application and need change physical resource (such as release physical in the process of running when described
Internal memory, CPU, I/O equipment etc.) when, it is described carry power application can directly by the user's space system clothes
Business function library dynamically updates independent physical resource, further, can be taken by the user's space system
Business function library updates the management data in user's space system service functions storehouse (i.e. User space specified memory)
Structure, and modification information is sent to the resource management apparatus in the operating system nucleus, so that
Inner core managing data structure in the resource management apparatus synchronized update operating system nucleus.
Alternatively, dynamic updates the independent physical resource also comprising following three kinds of scenes:
Scene 1:When the application (proposing power application) accesses the resource management apparatus every time, institute
State resource management apparatus (alternatively, described to call ginseng according to default resource allocation policy and call parameters
Number may include the parameters such as the resource type and resource size of the independent physical resource) judge whether needs
It is updated to the independent physical resource of the application distribution;
Scene 2:When the application (proposing power application) is trapped in operating system nucleus state because triggering is abnormal
When, operating system nucleus judges whether the independent physical resource for needing to be updated to the application distribution;
Scene 3:Operating system nucleus periodically judges whether to need to be updated to the only of the application distribution
Vertical physical resource;If hardware supported, task right is directly changed, directly update and CPU is set and is posted
Storage, and its execution authority is dynamically adjusted, such as by setting virtual machine control block (Virtual machine
Control block, abbreviation VMCS) data structure that provides visited changing its part to CPU hardware
Ask administration authority;If hardware is not supported, triggering interruption makes the application (proposing power application) be absorbed in kernel
State, and it is updated to the independent physical resource of the application distribution.
Alternatively, also include after step S102:Abnormality processing function, the abnormality processing function are set
For when the applications trigger is abnormal, the application to carry out abnormality processing according to the abnormality processing function.
In the embodiment of the present invention, by setting abnormality processing function, to work as the application, (putting forward power should
With) triggering it is abnormal when, the application carries out abnormality processing according to the abnormality processing function.Alternatively,
Exception handling procedure is divided into two classes:The first kind has been determined to be included in the user's space system service functions storehouse
The abnormality processing function of system, Equations of The Second Kind is to need by the processing procedure of operating system nucleus;Answered when described
Occur during except zero exception, page missing exception or invalid op code (invalid opcode) etc. with middle, institute
State to apply and abnormality processing is carried out by the abnormality processing function in the user's space system service functions storehouse;
When the application violates the corresponding physical resource extent of competence information of the application in the process of implementation
When, such as read and write the switching of the register without access limit, hardware trigger exception or state, then it is described to answer
With current performing environment is preserved, the performing environment of operating system nucleus is loaded, and according to the exception
Reason function carries out abnormality processing;Alternatively, after the completion of the abnormality processing, the resource management apparatus
The application recovery is applied into (re-executing the process of step S101 and step S102) to put forward power again,
To cause that the power that carries is performed using continuation is normal.
With reference to shown in Figure 1A, be may include steps of in method for managing resource embodiment two of the present invention:
1) interface that application is provided by operating system nucleus, will be used to indicate the application operation required
The physical resource use information of physical resource be sent to the resource management apparatus, alternatively, by hard
The form of part control data structure is sent to the resource management apparatus;Alternatively, the physical resource makes
Include following at least one with information:Physical memory information, central processor CPU information, register are visited
Ask that control authority, input-output apparatus access limit, privileged instruction perform authority and interrupt to point to.
2) physical resource that the resource management apparatus of the operating system nucleus send according to the application
Use information is that the application distributes independent physical resource, and for the application is distributed for directly access
The interface of the physical resource, is initialized such as the physical memory to the application, to the application institute
The register on CPU for needing is preserved and is initialized and build the data structures such as new interrupt vector table;
Alternatively, according to the physical resource initialization processor virtualization hardware distributed for the application, and
The physical resource as described in user's space system service functions library initialization, in order to pass through the user's space
System service functions storehouse provides the interface for directly accessing the physical resource to the application.
3) resource management apparatus preserve the current performing environment of the application, such as register value, deposit
Device state and segment register etc.;And the privilege loaded after the application upgrade applies corresponding execution context
(the independent physical resource of as described application distribution, such as physical memory information, central processor CPU
Information and the setting of CPU registers etc.) so that the privilege application is according to the user's space system service
Function library, directly accesses or manages the physical resource;Wherein, the user's space system service functions
Storehouse is used to provide the management strategy of the management physical resource and for directly accessing institute for the privilege application
State the interface of physical resource.
4) resource management apparatus set and perform entrance, and set abnormality processing function;Carried when described
When power application triggers abnormal in the process of implementation, context (such as CPU register informations) is preserved, cut
Next process is changed to, and abnormality processing is carried out according to the abnormality processing function.
In sum, in the present embodiment, independent physical resource is distributed by for the application, and be institute
The interface for being used to directly access the physical resource using distribution is stated, so that the application is according to user's space
System service functions storehouse directly manages or accesses the physical resource, and need not pass through operating system nucleus pipe
Reason physical resource, so as to reduce contention for resources of the different application to operating system nucleus, improves system
Performance.
Fig. 2A is the operating system Organization Chart two of method for managing resource of the present invention.As shown in Figure 2 A, manage
The instruction that core (core) is used to set application core (core) performs authority, register access limit and I/O
Equipment etc.;User's space system service functions storehouse (LibXOS) of the power application by customizing is carried directly to access
Or power is put forward described in management using corresponding independent physical resource;The resource management apparatus are carried for process
Power (will common application upgrade to carry power application, specifically, set by management core and held using on core
The access authorization for resource scope of traveling journey;Wherein, common application need every time by operating system nucleus access or
Operating physical resource, proposing power application can be directly direct according to its corresponding user's space system service functions storehouse
Access or operate its corresponding physical resource);The resource management apparatus are additionally operable to should to the power that carries
With the abnormality processing prescribed a time limit beyond right of execution;Adjusted by message type system in user's space system service functions storehouse
I/O for obtaining distal end is serviced;In addition, can not be by user's space system service work(when power application is proposed
During certain core functions that energy storehouse is realized, specified memory can be write by request queue, and read by service thread
Take response.
Fig. 2 B are the schematic diagram of method for managing resource embodiment three of the present invention, as shown in Figure 2 B, specifically
The method for describing to carry out page table management in user's state space.Alternatively, common application is being carried out to put forward power
When, the page table data structure by the common application in operating system nucleus copies specified physical memory to
In, and be managed by the page table management module in User space space system service function storehouse, including to page
Read-write and/or renewal of table etc. are operated.When the application is trapped in root (root) from non-root (non-root) pattern
During pattern, i.e., because, it is necessary to incite somebody to action when actively or passively reason is absorbed in operating system nucleus (such as extremely)
Page table structure of the page table data structure synchronization to original inner core managing.Because page table the inside is to virtual
Internal memory and physical memory carry out discrete mapping, therefore, copy page table data structure when, for
Physical memory through being mapped in kernel page table does not allow swapping out, it is necessary to locked in kernel;And it is right
In the also unfilled item in page table the inside, then be by User space system service functions storehouse according to application request, hold
The information such as row process status and reserved physical memory is managed.
Fig. 2 C are the schematic diagram of method for managing resource example IV of the present invention.As shown in Figure 2 C, specifically retouch
State and be managed, apply, distribute and discharge by user's space system service functions storehouse (LibXOS)
The content of internal memory.Memory management in LibXOS mainly provides two parts function, wherein, 1) first
Point function is:For the application needed for application and the function routine of releasing memory, LibXOS is only managed right
Using the physical memory for proposing temporary resource management apparatus distribution, therefore all applications and release operation all pins
To the physical memory reserved;But when the physical memory exhausts, it is necessary to by active and operation
The mode of system kernel interaction to the new physical memory of operating system nucleus application, to increase as the application
Reserved physical memory, applies for that the process of new physical memory is and be actively absorbed in operating system mode, i.e.,
Operating system nucleus is absorbed in by vmcall, then according to the parameter of transmission, by operating system nucleus
Abnormality processing function is responded, and distributes physical memory, is finally returned to;2) Part II function is:With
The treatment of family state page fault, wherein, when page fault refers to that mapping item in page table does not exist, accessing should
The hardware anomalies that virtual address is triggered;Existing Linux and most of other operating systems all pass through kernel
Abnormality processing function complete, but temporary update initial carrying to common application in the embodiment of the present invention
Existing hardware abnormality processing function is changed, and has been provided with VMCS data structure so that be different skipping leaf
Page fault can be thrown User space by Chang Shi, hardware, and by the use in user's space system service functions storehouse
Family state page fault treatment function is processed, specifically, can be according to paging on demand in existing operating system
Mode come write User space page fault treatment function, also can write use by the way of paging in advance
Family state page fault treatment function, therefore, improve the systematic function of the application of different internal memory use demands.
Fig. 3 is the structural representation of resource management apparatus embodiment one of the present invention, as shown in figure 3, this reality
The resource management apparatus 30 for applying example offer can include:Acquisition module 301 and distribute module 302.
Wherein, acquisition module 301 is used to obtain physical resource use information, and the physical resource uses letter
Cease the physical resource required for for indicating application operation;
It is that the application distributes independent thing that distribute module 302 is used for according to the physical resource use information
Reason resource, and for the application distributes the interface for directly accessing the physical resource, so that described should
With directly accessing the physical resource.
The resource management apparatus of the present embodiment can be used for performing above-mentioned method for managing resource embodiment of the invention
Technical scheme in one, its realization principle is similar with technique effect, and here is omitted.
Alternatively, as a kind of enforceable mode, on the basis of the implementation method shown in Fig. 3, institute
State acquisition module 301 specifically for:
Obtain the default physical resource use information;Or,
The hardware controls data structure sent according to the application obtains the physical resource use information;Its
In, the hardware controls data structure includes the physical resource use information.
Alternatively, as another enforceable mode, on the basis of the implementation method shown in Fig. 3,
The distribute module 302 specifically for:For user's space system service functions storehouse is set up in the application, and
The management data structures of the kernel needed for the application are copied into the user's space system service functions storehouse
In, wherein, the management data structures are used to directly access the physical resource.
Alternatively, the distribute module is additionally operable to:For the application is distributed for managing the physical resource
Management strategy;Wherein, the user's space system service functions storehouse includes:The management strategy.
Alternatively, as another enforceable mode, as shown in figure 4, Fig. 4 is resource pipe of the present invention
Manage the structural representation of device embodiment two, on the basis of the implementation method shown in Fig. 3, resource management
Device 30 also includes:Update module 303 is used for dynamic and updates the independent physical resource, and synchronously more
Inner core managing data structure in new operating system nucleus and the user's space system service functions storehouse;
Alternatively, also include:Exception processing module 304 is used to set abnormality processing function, the exception
Treatment function is used for when the applications trigger is abnormal, and the application is carried out according to the abnormality processing function
Abnormality processing.
Alternatively, the physical resource use information includes following at least one:Physical memory information, in
Central processor CPU information, register access control authority, input-output apparatus access limit and privilege
Instruction performs authority.
The resource management apparatus of the present embodiment can be used for performing above-mentioned method for managing resource embodiment of the invention
In technical scheme, its realization principle is similar with technique effect, and here is omitted.
Fig. 5 is the structural representation of resource management apparatus embodiment three of the present invention, as shown in figure 5, this reality
The resource management apparatus 50 for applying example offer can include processor 501 and memory 502.Resource management is filled
Putting 50 can also include data interface unit 503, and the data interface unit 503 can be with processor 501
It is connected.Wherein, data interface unit 503 is used for input/output data information, and memory 502 is used to deposit
Storage execute instruction.When resource management apparatus 50 run, communicated between processor 501 and memory 502,
Processor 501 calls the execute instruction in memory 502, is used to perform above-mentioned method for managing resource implementation
Operation in example.
The resource management apparatus of the present embodiment can be used for performing above-mentioned method for managing resource embodiment of the invention
In technical scheme, its realization principle is similar with technique effect, and here is omitted.
In several embodiments provided by the present invention, it should be understood that disclosed apparatus and method,
Can realize by another way.For example, device embodiment described above is only schematical,
For example, the division of the unit, only a kind of division of logic function, can have in addition when actually realizing
Dividing mode, such as multiple units or component can combine or be desirably integrated into another system, or
Some features can be ignored, or not perform.It is another, shown or discussed coupling each other or
Direct-coupling or communication connection can be the INDIRECT COUPLING or communication link of device or unit by some interfaces
Connect, can be electrical, mechanical or other forms.
It is described as separating component illustrate unit can be or may not be it is physically separate, make
For the part that unit shows can be or may not be physical location, you can with positioned at a place,
Or can also be distributed on multiple NEs.Can select according to the actual needs part therein or
Person whole units realize the purpose of this embodiment scheme.
In addition, during each functional unit in each embodiment of the invention can be integrated in a processing unit,
Can also be that unit is individually physically present, it is also possible to which two or more units are integrated in a list
In unit.Above-mentioned integrated unit can both be realized in the form of hardware, it would however also be possible to employ hardware adds software
The form of functional unit is realized.
The above-mentioned integrated unit realized in the form of SFU software functional unit, can store in a computer
In read/write memory medium.Above-mentioned SFU software functional unit storage is in a storage medium, including some fingers
Order is used to so that a computer equipment (can be personal computer, server, or network equipment etc.)
Or processor (processor) performs the part steps of each embodiment methods described of the invention.And it is foregoing
Storage medium include:USB flash disk, mobile hard disk, read-only storage (Read-Only Memory, ROM),
Random access memory (Random Access Memory, RAM), magnetic disc or CD etc. are various can
With the medium of store program codes.
Those skilled in the art can be understood that, for convenience and simplicity of description, only with above-mentioned each
The division of functional module is carried out for example, in practical application, as needed can divide above-mentioned functions
With being completed by different functional module, will the internal structure of device be divided into different functional modules, with
Complete all or part of function described above.The specific work process of the device of foregoing description, can be with
With reference to the corresponding process in preceding method embodiment, will not be repeated here.
One of ordinary skill in the art will appreciate that:Realize all or part of step of above-mentioned each method embodiment
Suddenly can be completed by the related hardware of programmed instruction.Foregoing program can be stored in a computer can
In reading storage medium.The program upon execution, performs the step of including above-mentioned each method embodiment;And
Foregoing storage medium includes:ROM, RAM, magnetic disc or CD etc. are various can be with store program codes
Medium.
Finally it should be noted that:Various embodiments above is merely illustrative of the technical solution of the present invention, rather than right
Its limitation;Although being described in detail to the present invention with reference to foregoing embodiments, this area it is common
Technical staff should be understood:It can still modify to the technical scheme described in foregoing embodiments,
Or equivalent is carried out to which part or all technical characteristic;And these modifications or replacement, and
The scope of the essence disengaging various embodiments of the present invention technical scheme of appropriate technical solution is not made.
Claims (14)
1. a kind of method for managing resource, it is characterised in that including:
Physical resource use information is obtained, needed for the physical resource use information is used to indicate application to run
The physical resource wanted;
It is that the application distributes independent physical resource according to the physical resource use information, and for described
It is used to directly access the interface of the physical resource using distribution, so that the application directly accesses the thing
Reason resource.
2. method according to claim 1, it is characterised in that the acquisition physical resource uses letter
Breath, including:
Obtain the default physical resource use information;Or,
The hardware controls data structure sent according to the application obtains the physical resource use information;Its
In, the hardware controls data structure includes the physical resource use information.
3. method according to claim 1 and 2, it is characterised in that described is application distribution
Interface for directly accessing the physical resource, including:
For user's space system service functions storehouse is set up in the application, and by the kernel needed for the application
Management data structures are copied in the user's space system service functions storehouse, wherein, the management data
Structure is used to directly access the physical resource.
4. method according to claim 3, it is characterised in that also include:For the application is distributed
Management strategy for managing the physical resource;Wherein, the user's space system service functions storehouse bag
Include:The management strategy.
5. the method according to any one of claim 1-4, it is characterised in that described in the basis
Physical resource use information is that the application distributes independent physical resource, and is used for for the application is distributed
Directly access after the interface of the physical resource, also include:
Dynamic updates the independent physical resource, and synchronized update operating system nucleus and the user are empty
Between inner core managing data structure in system service functions storehouse.
6. the method according to any one of claim 1-5, it is characterised in that described in the basis
Physical resource use information is that the application distributes independent physical resource, and is used for for the application is distributed
Directly access after the interface of the physical resource, also include:
Abnormality processing function is set, and the abnormality processing function is used for when the applications trigger is abnormal, institute
State to apply and abnormality processing is carried out according to the abnormality processing function.
7. the method according to any one of claim 1-6, it is characterised in that the physical resource
Use information includes following at least one:Physical memory information, central processor CPU information, register
Access control right, input-output apparatus access limit and privileged instruction perform authority.
8. a kind of resource management apparatus, it is characterised in that including:
Acquisition module, for obtaining physical resource use information, the physical resource use information is used to refer to
Show using the physical resource required for operation;
Distribute module, for being that the application distributes independent physics according to the physical resource use information
Resource, and for the application distributes the interface for directly accessing the physical resource, so that the application
Directly access the physical resource.
9. device according to claim 8, it is characterised in that the acquisition module specifically for:
Obtain the default physical resource use information;Or,
The hardware controls data structure sent according to the application obtains the physical resource use information;Its
In, the hardware controls data structure includes the physical resource use information.
10. device according to claim 8 or claim 9, it is characterised in that the distribute module is specific
For:
For user's space system service functions storehouse is set up in the application, and by the kernel needed for the application
Management data structures are copied in the user's space system service functions storehouse, wherein, the management data
Structure is used to directly access the physical resource.
11. devices according to claim 10, it is characterised in that the distribute module is additionally operable to:
For the application distributes the management strategy for managing the physical resource;Wherein, the user's space system
System service function storehouse includes:The management strategy.
12. device according to any one of claim 8-11, it is characterised in that also include:
Update module, the independent physical resource is updated for dynamic, and in synchronized update operating system
Inner core managing data structure in core and the user's space system service functions storehouse.
13. device according to any one of claim 8-12, it is characterised in that also include:
Exception processing module, for setting abnormality processing function, the abnormality processing function is used for when described
When applications trigger is abnormal, the application carries out abnormality processing according to the abnormality processing function.
14. device according to any one of claim 8-13, it is characterised in that the physics money
Source use information includes following at least one:Physical memory information, central processor CPU information, deposit
Device access control right, input-output apparatus access limit and privileged instruction perform authority.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510429902.1A CN106708619B (en) | 2015-07-21 | 2015-07-21 | Resource management method and device |
PCT/CN2016/073940 WO2017012339A1 (en) | 2015-07-21 | 2016-02-17 | Resource management method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510429902.1A CN106708619B (en) | 2015-07-21 | 2015-07-21 | Resource management method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106708619A true CN106708619A (en) | 2017-05-24 |
CN106708619B CN106708619B (en) | 2021-01-15 |
Family
ID=57834837
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510429902.1A Active CN106708619B (en) | 2015-07-21 | 2015-07-21 | Resource management method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106708619B (en) |
WO (1) | WO2017012339A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109144714A (en) * | 2017-06-19 | 2019-01-04 | 中兴通讯股份有限公司 | EMS memory management process and device |
CN109901935A (en) * | 2017-12-11 | 2019-06-18 | 航天信息股份有限公司 | A kind of method and apparatus communicated with USB Key |
CN109976886A (en) * | 2017-12-28 | 2019-07-05 | 深圳中电长城信息安全系统有限公司 | The long-range switching method of kernel and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103995731A (en) * | 2014-05-09 | 2014-08-20 | 华为技术有限公司 | Management center deployment method and virtual device |
CN104391949A (en) * | 2014-11-26 | 2015-03-04 | 国家电网公司 | Data dictionary based wide area data resource management method |
US20150074670A1 (en) * | 2013-09-10 | 2015-03-12 | Vmware, Inc. | Method and system for distributed processing of http requests |
CN104424034A (en) * | 2013-09-04 | 2015-03-18 | 华为技术有限公司 | Hardware resource access method and hardware resource access device |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101488098B (en) * | 2009-02-13 | 2011-11-30 | 华中科技大学 | Multi-core computing resource management system based on virtual computing technology |
CN102117113B (en) * | 2009-12-31 | 2015-03-04 | 联想(北京)有限公司 | Computer system and method of power supply management for central processing unit thereof |
US9146785B2 (en) * | 2011-09-14 | 2015-09-29 | Microsoft Technology Licensing, Llc | Application acceleration in a virtualized environment |
CN102385532A (en) * | 2011-12-02 | 2012-03-21 | 浪潮集团有限公司 | Method for improving cloud application property via non-transparent CACHE |
-
2015
- 2015-07-21 CN CN201510429902.1A patent/CN106708619B/en active Active
-
2016
- 2016-02-17 WO PCT/CN2016/073940 patent/WO2017012339A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104424034A (en) * | 2013-09-04 | 2015-03-18 | 华为技术有限公司 | Hardware resource access method and hardware resource access device |
US20150074670A1 (en) * | 2013-09-10 | 2015-03-12 | Vmware, Inc. | Method and system for distributed processing of http requests |
CN103995731A (en) * | 2014-05-09 | 2014-08-20 | 华为技术有限公司 | Management center deployment method and virtual device |
CN104391949A (en) * | 2014-11-26 | 2015-03-04 | 国家电网公司 | Data dictionary based wide area data resource management method |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109144714A (en) * | 2017-06-19 | 2019-01-04 | 中兴通讯股份有限公司 | EMS memory management process and device |
CN109901935A (en) * | 2017-12-11 | 2019-06-18 | 航天信息股份有限公司 | A kind of method and apparatus communicated with USB Key |
CN109901935B (en) * | 2017-12-11 | 2021-12-17 | 航天信息股份有限公司 | Method and equipment for communicating with USB Key |
CN109976886A (en) * | 2017-12-28 | 2019-07-05 | 深圳中电长城信息安全系统有限公司 | The long-range switching method of kernel and device |
Also Published As
Publication number | Publication date |
---|---|
CN106708619B (en) | 2021-01-15 |
WO2017012339A1 (en) | 2017-01-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104050045B (en) | Virtual resource allocation method and device based on disk I/O | |
CN103562894B (en) | Start in response to carrying out the data that subchannel instruction is returned | |
CN109791500A (en) | Intermediate host integrated circuit between virtual machine instance and client programmable logic | |
CN104981812B (en) | The mechanism of reliability, availability and serviceability (RAS) stream is supported in equity monitors | |
CN105900105A (en) | Media protection policy enforcement for multiple-operating-system environments | |
CN104636181A (en) | Method and system for migrating virtual machine | |
WO2017112166A1 (en) | Dynamic storage transitions employing tiered range volumes | |
CN104516769A (en) | Verification of dynamic logical partitioning | |
CN106776067A (en) | Method and device for managing system resources in multi-container system | |
CN108021378A (en) | Upgrade-system, the upgrade method based on virtual machine and device | |
US9792050B2 (en) | Distributed caching systems and methods | |
US11231951B2 (en) | Fault tolerant hyper-converged infrastructure upgrades in an environment with no additional physical infrastructure | |
CN107066292A (en) | Server environment dispositions method and device | |
CN108064377A (en) | A kind of management method and device of multisystem shared drive | |
CN115988217A (en) | Virtualized video coding and decoding system, electronic equipment and storage medium | |
CN106708619A (en) | Resource management method and apparatus | |
US8516209B2 (en) | Computer system, storage volume management method, and computer-readable storage medium | |
US9710308B1 (en) | Workflow for migration planning of data storage systems | |
CN108696373B (en) | Virtual resource allocation method, NFVO and system | |
US11947808B2 (en) | Expanding storage capacity for implementing logical corruption protection | |
CN114089926B (en) | Management method of distributed storage space, computing equipment and storage medium | |
CN102508696B (en) | A kind of asymmetric resource regulating method and device | |
CN106445691A (en) | Memory optimization method oriented to virtual cloud computing platform | |
CN111988160A (en) | Method and device for deploying virtualized network function | |
CN107528871A (en) | Data analysis in storage system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |