WO2015180648A1 - Resource allocation method and device - Google Patents

Resource allocation method and device Download PDF

Info

Publication number
WO2015180648A1
WO2015180648A1 PCT/CN2015/079943 CN2015079943W WO2015180648A1 WO 2015180648 A1 WO2015180648 A1 WO 2015180648A1 CN 2015079943 W CN2015079943 W CN 2015079943W WO 2015180648 A1 WO2015180648 A1 WO 2015180648A1
Authority
WO
WIPO (PCT)
Prior art keywords
physical storage
storage resource
information
application
allocation request
Prior art date
Application number
PCT/CN2015/079943
Other languages
French (fr)
Chinese (zh)
Inventor
魏巍
陈明宇
蒋德钧
熊劲
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015180648A1 publication Critical patent/WO2015180648A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and an apparatus for resource allocation.
  • an application process needs to request a physical storage resource, it needs to send a request message to the computer operating system, where the request message carries the information of the storage medium type of the requested physical storage resource.
  • the operating system first allocates virtual resources to it and returns the first address of the virtual resource to this application.
  • the application accesses the virtual resource based on the virtual address.
  • a page fault interrupt occurs because the operating system does not allocate physical storage resources for this application.
  • the operating system allocates corresponding physical storage resources to the application according to the storage medium type information of the physical storage resource.
  • the inventor has found that at least the following problems exist in the prior art: when the application requests the physical storage resource, the application must carry the information of the storage medium type of the physical storage resource.
  • the user pre-sets the type of storage medium that the data of each application needs to use, so that the user must understand the performance of each storage medium, and the user requirements are high.
  • setting the type of the storage medium to be used for the data of the application may cause the type of the set storage medium to be inappropriate for the data of the application, resulting in the operating system being
  • the physical storage resources allocated by this application's data are not suitable, reducing the performance of the application.
  • Embodiments of the present invention provide a method and apparatus for resource allocation, which are used to automatically allocate suitable resources for application data, improve application performance, and improve without requiring the user to understand the performance of each storage medium. user experience.
  • an embodiment of the present invention provides a method for resource allocation, where an application is in a processing device, and the processing device is connected to a storage device through a memory bus, where the storage device is configured.
  • the device includes at least two different types of storage media, and the method includes: the processing device receives, by using an acquiring interface, physical storage resource allocation request information sent by an application; and the physical storage resource allocation request information includes applying for a physical storage resource.
  • Size information size information, operation authority information for applying for a physical storage resource, and medium information for applying for a physical storage resource; wherein the medium information includes performance information of a physical storage resource that matches data to be stored; the processing device determines the Whether the physical storage resource allocation request information includes the information of the media type of the applied physical storage resource; if it is determined that the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource, the processing device Searching, in a pre-acquired spatial feature table, a storage medium type that matches the media information; the spatial feature table records all storage media types and corresponding performance information included in the storage device; the processing device Physical storage according to the application
  • the size information of the source allocates an available virtual resource to the application; the processing device allocates the available virtual resource to the application according to the physical storage resource allocation request information and the media type of the applied physical storage resource. Corresponding available physical storage resources.
  • the method further includes: the storage device includes: an integrated storage device UAS; and the processing device allocates the application according to the size information of the applied physical storage resource
  • the available virtual resources include: the processing device transmitting the physical storage resource allocation request information and a process number of the application to the UAS, so that the UAS determines whether the applicable physical storage resource can be allocated to the application.
  • the physical storage resource allocation request information further includes the determined media type information of the applied physical storage resource; and the processing device receives the physical storage resource according to the application when receiving the satisfaction of the distribution message sent by the UAS
  • the size information is used to allocate the available virtual resources to the application; the processing device allocates, according to the physical storage resource allocation request information and the media type of the application physical storage resource, the application to the available virtual resource.
  • Available physical storage resources include: the processing device will use the available virtual resources
  • the address information is sent to the UAS; the processing device sends a memory access request message to the UAS, so as to allocate, by the UAS, the application to the available virtual resource according to the physical storage resource allocation request information.
  • the physical storage resource is available; the fetch request message carries the process ID of the application.
  • the processing device receives the UAS transmission When the allocation message is not satisfied, the failure reason information is determined according to the dissatisfaction of the allocation message; the processing device transmits the failure reason information to the application; or the processing device allocates the physical storage resource request information And the process number of the application is resent to the UAS to cause the UAS to re-determine whether the application can be allocated physical storage resources.
  • the physical storage resource allocation request information further includes pre-allocated metadata type information, and / or pre-allocated cache data priority information, and / or pre-allocated physical storage resource priority information, and / or pre-allocated physical storage resource size information, and / or pre-allocated physical storage resource media type information.
  • the method further includes: the physical storage resource allocation request information It also includes cache information.
  • the embodiment of the present invention provides a method for resource allocation, which is applied to an integrated storage device UAS.
  • the UAS is connected to a processing device through a memory bus, and the UAS includes at least two different types of storage media.
  • the method includes: the UAS receiving the physical storage resource allocation request information sent by the processing device and the process number of the application; the physical storage resource allocation request information includes the size information of the applied physical storage resource, and the operation of applying the physical storage resource Permission information and information of a media type of the physical storage resource; the UAS determines whether the application can be allocated an available physical storage resource that matches the physical storage resource allocation request information; if it is determined to be allocated to the application And the UAS sends an address that satisfies the allocation message to the processing device; the UAS receives address information of the available virtual resource sent by the processing device; the UAS receives the available physical storage resource that is matched by the physical storage resource allocation request information; a memory access request message sent by the processing device; the memory access request And the UAS carries the
  • the size information of the application physical storage resource, the operation authority information of the application physical storage resource, and the available physical storage resource that matches the information of the medium type of the physical storage resource, and the address mapping table is updated according to the address information of the available physical storage resource;
  • the address mapping table is configured to record a mapping relationship between address information of the available virtual resource and address information of available physical storage resources allocated for the application.
  • the physical storage resource allocation request information further includes cache information
  • the method further includes: The UAS allocates an available cache to the application according to the cache information, and updates the address mapping table according to the address information of the available cache; the address mapping table is used to record the available information by using the cached address information.
  • the UAS before the UAS receives the memory access request message sent by the processing device, the UAS includes: pre-allocating metadata for the application according to the physical storage resource allocation request information and the process number of the application; after the UAS allocates metadata to the application in advance, the method further includes: And assigning the available physical storage resources to the application according to the physical storage resource allocation request information and the process ID of the application, and updating the address mapping table according to the address information of the available physical storage resources.
  • the UAS before the UAS receives the memory access request message sent by the processing device, includes: pre-allocating metadata for the application according to the physical storage resource allocation request information and the process number of the application; after the UAS allocates metadata to the application in advance, the method further includes: And the UAS allocates an available cache to the application according to the physical storage resource allocation request information and the process ID of the application, and updates the location according to the address information of the available cache allocated in advance for the application.
  • the address mapping table is described.
  • the physical storage resource allocation request information further includes pre-allocated metadata type information, and / or pre-allocated cache data priority information, and / or pre-allocated physical storage resource priority information, and / or pre-allocated physical storage resource size information, and / or pre-allocated physical storage resource media type
  • the information is allocated in advance according to the physical storage resource allocation request information and the process number of the application when the physical storage resource allocation request information includes the pre-allocated metadata type information.
  • the metadata includes: pre-allocating metadata to the application according to the pre-allocated metadata type information and a process number of the application;
  • the storage resource allocation request information includes the pre-allocated physical storage resource priority information, and/or size information of a pre-allocated physical storage resource, and/or media type information of a pre-allocated physical storage resource, the basis
  • the physical storage resource allocation request information and the process number of the application program pre-allocating the available physical storage resources to the application include: pre-assigned physical storage resource priority information, and/or pre-allocated physical storage.
  • the size information of the resource, and/or the media type information of the pre-allocated physical storage resource and the process number of the application, the available physical storage resource is allocated in advance to the application;
  • the physical storage resource allocation request information includes When the priority information of the pre-allocated cached data is described, the pre-allocating the available cache according to the physical storage resource allocation request information and the process number of the application for the application includes: pre-allocating the cached data according to the pre-allocated cached data Priority information and the process number of the application are allocated in advance for the application Available cache.
  • the method further includes: if it is determined that the application cannot be allocated The UAS sends an unsatisfied allocation message to the processing device, where the physical storage resource allocation request information matches the available physical storage resource.
  • an embodiment of the present invention provides a processing apparatus, including: a receiving unit, configured to receive, by using an acquiring interface, physical storage resource allocation request information sent by an application; and the physical storage resource allocation request information includes applying for a physical storage resource.
  • the allocating unit is used for root
  • the allocating the available virtual resources to the application according to the size information of the application for the physical storage resource includes: the allocating unit, specifically configured to send the physical storage resource allocation request information and the process number of the application to the Determining the UAS, so that the UAS determines whether the available physical storage resource can be allocated to the application; the physical storage resource allocation request information further includes the determined media type information of the applied physical storage resource; And when the UAS sends the contention request message, the application allocates an available virtual resource according to the size information of the application physical storage resource; the allocation unit is further configured to use the physical storage resource allocation request information and the Determining, by the application unit, the available physical storage resource corresponding to the available virtual resource, the method further includes: sending the address information of the available virtual resource to the UAS; sending a memory access request message to the UAS, according to the object by the UAS Storage resource allocation request information to the program allocates available physical storage resources and the available resource corresponding to the virtual application; the memory
  • the processing unit is configured to: when the unsatisfied allocation message sent by the UAS is received, a message, determining failure reason information; transmitting the failure reason information to the application; or resending the physical storage resource allocation request information and the process number of the application to the UAS, so that the The UAS re-determines whether a physical storage resource can be allocated for the application.
  • the physical storage resource allocation request information further includes pre-allocated metadata type information, And/or pre-allocated priority information of cached data, and/or pre-allocated physical storage resource priority information, and/or size information of pre-allocated physical storage resources, and/or media of pre-allocated physical storage resources Type information.
  • the physical storage resource allocation request information further includes cache information
  • an embodiment of the present invention provides an integrated storage device UAS, including: a receiving unit, configured to receive physical storage resource allocation request information sent by a processing device, and a process number of an application; and the physical storage resource allocation request The information includes the size information of the physical storage resource, the operation permission information of the physical storage resource, and the application physical storage.
  • a determining unit configured to determine, by the application, an available physical storage resource that matches the physical storage resource allocation request information
  • a sending unit configured to determine, in the determining unit, And when the application allocates an available physical storage resource that matches the physical storage resource allocation request information, sending a satisfaction fulfillment message to the processing device
  • the receiving unit is further configured to receive the available virtual resource sent by the processing device
  • the receiving unit is further configured to receive a memory access request message sent by the processing device, where the memory access request message carries a process number of the application, and an allocating unit, configured to be used according to the application And the application physical resource allocation request information corresponding to the process number, and the application program allocates the size information of the application physical storage resource included in the physical storage resource allocation request information, and applies the operation permission information of the physical storage resource.
  • an update unit configured to update an address mapping table according to the address information of the available physical storage resource allocated by the allocation unit for the application; the address mapping table is configured to record address information of the available virtual resource and The mapping between address information of available physical storage resources allocated for the application.
  • the physical storage resource allocation request information further includes cache information, where the allocation unit is further configured to use, according to the cache information, The application unit allocates an available cache; the update unit is further configured to update an address mapping table according to the address information of the available cache; the address mapping table is configured to record address information of the available virtual resource by using the cached address information A mapping relationship with address information of the available physical storage resources.
  • the physical storage resource allocation request information further includes cache information;
  • the unit is further configured to allocate an available cache to the application according to the cache information;
  • the update unit is further configured to update an address mapping table according to the address information of the available cache;
  • the address mapping table is used to pass
  • the cached address information records a mapping relationship between address information of the available virtual resources and address information of the available physical storage resources.
  • the allocation unit is further configured to allocate request information and a location according to the physical storage resource
  • the process number of the application is pre-allocated metadata for the application
  • the allocation unit is further configured to allocate a request letter according to the physical storage resource
  • the process number of the application pre-allocating the available physical storage resources to the application
  • the update unit is further configured to pre-allocate the address of the available physical storage resource for the application according to the allocation unit
  • the information updates the address mapping table. .
  • the allocating unit is further configured to allocate request information according to the physical storage resource
  • the process number of the application is allocated metadata for the application in advance; the allocating unit is further configured to allocate an available cache to the application according to the physical storage resource allocation request information and the process number of the application.
  • the update unit is further configured to update the address mapping table according to the address information of the available cache allocated by the allocation unit for the application in advance.
  • the physical storage resource allocation request information further includes pre-allocated metadata type information, and / or pre-allocated cache data priority information, and / or pre-allocated physical storage resource priority information, and / or pre-allocated physical storage resource size information, and / or pre-allocated physical storage resource media type
  • the allocation unit is configured to: when the physical storage resource allocation request information includes the pre-allocated metadata type information, according to the pre-allocated metadata type information and a process number of the application Metadata is allocated to the application in advance; the physical storage resource allocation request information includes the pre-allocated physical storage resource priority information, and/or pre-allocated physical storage resource size information, and/or pre- When the media type information of the allocated physical storage resource is based on the pre-allocated physical storage resource priority information, and/or pre-allocated physical storage The size information of the storage resource, and/or the media type information of the pre-allocated cache data priority information, and / or pre-allocated physical storage resource priority information, and /
  • the sending unit is further configured to determine, in the determining unit, that the And when the application allocates an available physical storage resource that matches the physical storage resource allocation request information, sending an unsatisfied allocation message to the processing device.
  • the present invention provides a processing apparatus comprising: a processor, a memory, a communication interface, and a bus, wherein the processor, the memory, and the communication interface pass the Bus communication; the memory is configured to store a program; the processor is configured to execute an execution instruction stored by the memory; the communication interface receives physical storage resource allocation request information sent by an application; the physical storage resource
  • the allocation request information includes the size information of the physical storage resource, the operation authority information of the physical storage resource, and the medium information of the physical storage resource.
  • the media information includes performance information of the physical storage resource that matches the data to be stored.
  • the processor runs a program to execute the following instructions: determining whether the physical storage resource allocation request information includes information about a media type of the applied physical storage resource; if the physical storage resource is determined If the information of the media type of the applied physical storage resource is not included in the allocation request information, the storage medium type matching the media information is searched in the pre-acquired spatial feature table; the storage device is recorded in the spatial feature table. All storage media classes included in Corresponding performance information; allocating available virtual resources to the application according to the size information of the physical storage resource; and determining, according to the physical storage resource allocation request information and the media type of the physical storage resource, the application The program allocates available physical storage resources corresponding to the available virtual resources.
  • an embodiment of the present invention provides an integrated storage device UAS, including: a processor, a memory, a communication interface, a bus, and a transmitter, wherein the processor, the memory, and the communication interface pass The bus communication;
  • the memory is configured to store a program and data, wherein the memory includes at least two different types of storage media;
  • the communication interface is configured to receive physical storage resource allocation request information sent by the processing device The process number of the application;
  • the physical storage resource allocation request information includes size information of the application physical storage resource, operation permission information of the application physical storage resource, and information of the media type of the physical storage resource;
  • the processor is configured to: Determining whether the application can be allocated an available physical storage resource that matches the physical storage resource allocation request information;
  • the processor is further configured to determine to allocate the physical storage resource allocation request information to the application Triggering the transmitter to the processing when matching available physical storage resources Sending a message that satisfies an allocation message;
  • the transmitter is configured to send a satisfaction message to the processing device;
  • the embodiment of the invention provides a method and a device for allocating resources, and receiving the physical storage resource allocation request information sent by the application by the acquiring interface, wherein the physical storage resource allocation request information includes the size information of the applied physical storage resource, and applies for the physics.
  • the type of the storage medium matching the media information of the applied physical storage resource may be searched in the spatial feature table, thereby The application allocates available virtual resources and their corresponding available physical storage resources.
  • the processing device may search for the spatial feature table according to the media information of the physical storage resource that is carried by the processing device, and automatically determine the application.
  • FIG. 1 is a schematic diagram of a method for resource allocation according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of another method for resource allocation according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of another method for resource allocation according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of another method for resource allocation according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of functions of a processing apparatus according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of functions of another processing device according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of functions of another processing apparatus according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a function of a UAS according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of a processing apparatus according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of a UAS according to an embodiment of the present invention.
  • An embodiment of the present invention provides a method for resource allocation, where the application is in a processing device, and the processing device is connected to at least one storage device through a memory bus, where the storage device includes at least two different types of storage media, as shown in the figure.
  • the method includes:
  • the processing device receives, by using an acquiring interface, physical storage resource allocation request information sent by an application.
  • the physical storage resource allocation request information includes information about the size of the physical storage resource, the operation authority information for applying the physical storage resource, and the medium information for applying the physical storage resource.
  • the media information includes performance information of physical storage resources that match data that needs to be stored.
  • the application function of the acquisition interface may be used to send the physical storage resource allocation request information to the processing device, and the processing device receives the physical storage resource allocation request information sent by the application through the acquiring interface. . That is, the application sends the physical storage resource allocation request information to the processing device in the form of parameters of the acquisition interface.
  • the parameters of the interface are the information about the physical storage resource, for example, the size information of the physical storage resource, the operation authority information of the physical storage resource, and the medium information of the physical storage resource.
  • the processing apparatus determines whether the physical storage resource allocation request information includes information about a medium type of a physical storage resource.
  • the processing device may The physical storage resource allocation request information is parsed, and if the information of the media type of the physical storage resource is parsed, it is determined that the physical storage resource allocation request information includes the information of the media type of the applied physical storage resource. If the information of the media type of the physical storage resource is not parsed, it is determined that the physical storage resource allocation request information does not include the media type information of the applied physical storage resource.
  • the processing device searches for a storage medium that matches the media information in a pre-acquired spatial feature table. Types of.
  • All the storage medium types and corresponding performance information included in the storage device are recorded in the spatial feature table.
  • the spatial feature table is acquired when the storage device is connected.
  • the performance information corresponding to each storage medium type in the storage device recorded in the spatial feature table may be information such as delay information, energy consumption information, stored data feature information, and persistent information. Of course, other performance information may also be recorded, which is not limited by the present invention.
  • the processing device determines that the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource
  • the media information for applying for the physical storage resource does not include the medium type for applying the physical storage resource.
  • the space feature table may be searched according to the media information of the physical storage resource requested by the physical storage resource allocation request information, so that the type of the storage medium matching the media information of the applied physical storage resource may be found in the spatial feature table, and then the phase is The matching storage media type is determined as the media type of the application's physical storage resource.
  • the media information of the physical storage resource does not include the media type information of the physical storage resource
  • the media information includes only the performance information of the physical storage resource that matches the data that needs to be stored.
  • the performance information may be data persistence performance information, and/or delay feature information, and/or power consumption feature information, and/or feature information of the data to be stored, and the like.
  • the processing device may determine, according to the media information of the physical storage resource, the storage medium that satisfies the media information of the applied physical storage resource by searching the spatial feature table, that is, determining the media type for applying the physical storage resource.
  • the performance information of the physical storage resource may also be a performance parameter, which is not limited by the present invention.
  • a storage medium DRAM Dynamic Random Access Memory
  • NVM Non-Volatile Memory, non-volatile memory
  • the processing device receives the physical storage resource allocation request information and parses the information, and then determines The media type of the requested physical storage resource is not included in the physical storage resource allocation request information.
  • the processing device searches for the pre-acquired spatial feature table according to the media information of the physical storage resource, and determines a storage medium whose delay is less than the first preset value. If it is DRAM, it can determine that the media type of the applied physical storage resource is DRAM. .
  • the first preset value is preset.
  • the processing device may allocate the available virtual resource of the corresponding size to the application according to the size information of the applied physical storage resource.
  • Allocate according to the physical storage resource allocation request information and the media type of the application physical storage resource, an available physical storage resource corresponding to the available virtual resource.
  • the processing device allocates the available physical storage resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the applied physical storage resource, according to the storage device connected to the processing device.
  • the method is different.
  • the processing device When the connected storage device can allocate the available physical resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, the processing device only needs to The physical storage resource allocation request information and the media type of the application physical storage resource are sent to the storage device, and the storage device allocates an available physical storage resource corresponding to the available virtual resource to the application. That is, the processing device allocates an available physical storage resource corresponding to the available virtual resource to the application through the storage device.
  • the processing device When the connected storage device can allocate the available physical resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, the processing device itself
  • the physical storage resource allocation request information and the media type of the application physical storage resource are application allocation and location The available physical storage resources corresponding to the available virtual resources.
  • An embodiment of the present invention provides a method for allocating resources, and receiving, by the acquiring interface, physical storage resource allocation request information sent by an application, where the physical storage resource allocation request information includes size information of applying for physical storage resources, and applying for physical storage resources.
  • the operation authority information and the medium information of the application physical storage resource determining whether the physical storage resource allocation request information includes the information of the media type for applying the physical storage resource.
  • the physical storage of the application requested by the application may be determined according to the media information of the physical storage resource and the spatial feature table. The media type of the resource, which allocates available virtual resources and available physical storage resources for this application.
  • the received physical storage resource allocation request information may automatically determine the application according to the information and the spatial feature table of the performance of the physical storage resource to be applied when the information of the medium type of the physical storage resource is not included.
  • the type of media that is required to apply for a physical storage resource which in turn can allocate suitable resources for the data of the application according to the media type, thereby realizing automatic data for the application without requiring the user to understand the performance of each storage medium. Allocating the right resources available improves the performance of your application and improves the user experience.
  • the embodiment of the present invention provides a method for resource allocation, which is applied to a UAS (Unified Access Storage).
  • the UAS is connected to a processing device through a memory bus, and the UAS includes at least two different types of storage. medium. As shown in FIG. 2, the method includes:
  • the UAS receives physical storage resource allocation request information sent by the processing device and a process ID of the application.
  • the physical storage resource allocation request information includes information about the size of the physical storage resource, the operation authority information of the physical storage resource, and the medium type of the physical storage resource.
  • the processing device needs to send the physical storage resource allocation request information and the process number of the application to the UAS. .
  • the UAS determines whether the application can be allocated an available allocated physical storage resource that matches the physical storage resource allocation request information.
  • the UAS After receiving the physical storage resource allocation request information, the UAS carries the information according to the physical storage resource allocation request The type of the physical storage resource to be applied to determine the type of the physical storage resource to be allocated, and according to the size information of the physical storage resource, the UAS determines whether the idle physical storage resource of this type can satisfy the physical storage required by the application. Resources. If so, it is determined that the application can be assigned this type of physical storage resource, that is, the application can be allocated an available physical storage resource that matches the physical storage resource allocation request information. If not, it is determined that the application cannot be assigned this type of physical storage resource, that is, the available physical storage resource that cannot be allocated to the application by the physical storage resource allocation request information.
  • the UAS sends a satisfaction fulfillment message to the processing device.
  • the UAS when determining that the corresponding physical storage resource can be allocated for the application, the UAS sends a satisfaction fulfillment message to the processing device, so that the processing device allocates a corresponding available virtual resource for the application.
  • the UAS receives address information of available virtual resources sent by the processing device.
  • the address information of the available virtual resources is sent to the UAS, so that the UAS allocates available physical storage resources corresponding to the available virtual resources to the application, and may be available according to the available
  • the address information of the virtual resource and the address information of the available physical storage resource update the address mapping table.
  • the UAS receives a memory access request message sent by the processing device.
  • the access request message carries the process ID of the application, so that the UAS knows which process of the application should allocate available physical storage resources.
  • the processing device may send a memory access request message to the UAS, and the UAS receives the memory access request message sent by the processing device.
  • the UAS allocates the size of the application physical storage resource included in the physical storage resource allocation request information to the application according to the physical storage resource allocation request information corresponding to the process ID of the application.
  • the information, the operation permission information of the application physical storage resource, and the available physical storage resource matching the information of the medium type of the physical storage resource, and the address mapping table is updated according to the address information of the available physical storage resource.
  • the address mapping table is configured to record address information of the available virtual resource and The mapping between address information of available physical storage resources allocated for the application.
  • the UAS determines the physical storage resource allocation request information corresponding to the process ID according to the process ID of the application carried in the memory access request message.
  • the UAS may apply for the physical storage resource operation permission information and the media type of the physical storage resource for the application according to the physical storage resource allocation request information. Allocate matching available physical storage resources. And after allocating the size information of the application physical storage resource included in the physical storage resource allocation request information, the operation permission information of the physical storage resource, and the available physical storage resource matching the media type of the physical storage resource, according to the application Updating the address mapping table by using the address information of the available virtual resources and the address information of the available physical storage resources, so that the address mapping table records the mapping relationship between the address information of the available virtual resources corresponding to the application and the address information of the available physical storage resources. . In this way, the application can send the address of the available virtual resource to the processing device when the physical storage resource is accessed, so that the processing device sends the address of the available virtual resource to the UAS to obtain the corresponding available physical storage resource.
  • UAS is a storage device that includes processing and various storage media.
  • the UAS can include DRAM, STT-RAM (Spin Transfer Torque Random Access Memory), RRAM (Resistive Random Access Memory), and PCM (Phase-Change Memory). , SSD (Solid State Disk), DISK (disk).
  • the UAS device is connected to the memory bus, and the CPU accesses any storage medium inside the device through a read/write instruction.
  • the embodiment of the present invention provides a data processing method, where the processing device receives the sent physical storage resource allocation request information and the process number of the application, and determines whether the application can be matched with the physical storage resource allocation request information.
  • the physical storage resource is allocated, and if it is determined that the application allocates the allocated physical storage resource that matches the physical storage resource allocation request information, the processing device returns to satisfy the allocation message.
  • the UAS can allocate the most suitable available physical storage resources to the application according to the needs of the application, thereby automatically allocating suitable resources for the application data without requiring the user to understand the performance of each storage medium. Improves application performance and improves user experience.
  • An embodiment of the present invention provides a method for resource allocation, where the application is in a processing device, and the processing device is connected to at least one storage device through a memory bus, where the storage device includes at least two different types of storage media.
  • the method as shown in FIG. 3, includes:
  • the processing device receives the physical storage resource allocation request information sent by the application by acquiring the interface.
  • the physical storage resource allocation information includes information about the size of the physical storage resource, the operation authority information of the physical storage resource, and the medium information of the physical storage resource.
  • the media information includes performance information of physical storage resources that match data that needs to be stored.
  • step 101 For details, refer to step 101, and details are not described herein again.
  • the resource allocation request message further includes cache information.
  • the physical storage resource allocation request information further includes pre-allocated metadata type information, and/or pre-allocated cache data priority information, and / or pre-allocated physical storage resource priority information, and / or pre-allocated physical storage resource size information, and / or pre-allocated physical storage resource media type information.
  • the processing apparatus determines whether the physical storage resource allocation request information includes information about a media type of the applied physical storage resource.
  • step 102 For details, refer to step 102, and details are not described herein again.
  • step 304 is directly executed, and step 303 does not need to be performed.
  • step 303 is performed.
  • the processing device searches for the storage medium type that matches the media information in the pre-acquired spatial feature table.
  • All the storage medium types and corresponding performance information included in the storage device are recorded in the spatial feature table.
  • step 103 For details, refer to step 103, and details are not described herein again.
  • the processing device sends the physical storage resource allocation request information and a process ID of the application to the UAS, so that the UAS determines whether the applicable physical storage resource can be allocated to the application.
  • the UAS receives the physical storage resource allocation request information sent by the processing device and the process ID of the application.
  • the physical storage resource allocation request information further includes media type information for applying for a physical storage resource.
  • the processing device determines the information
  • the processing device adds the determined information of the media type of the physical storage resource to the determined
  • the physical storage resource allocation request information is sent to the UAS along with the process ID of the application. If the physical storage resource allocation request information includes the information of the media type of the application physical storage resource, it is directly sent to the UAS along with the process ID of the application.
  • the processing device may directly send the physical storage resource allocation request information including the media type information of the application physical storage resource to the UAS and the process ID of the application.
  • the processing device may encapsulate the physical storage resource allocation request information and the process ID of the application into a message and send the message to the UAS.
  • processing device may also send the physical storage resource allocation request information and the process number of the application to the UAS, which is not limited in the present invention.
  • the physical storage resource allocation request information and the process number of the application may be randomly sent to a certain UAS, or may be based on a preset rule.
  • a UAS is determined among the plurality of UASs that need to allocate available physical storage resources for the application, thereby allocating the physical storage resource allocation request information and the process number of the application to the UAS.
  • the manner in which the processing device determines which UAS to allocate the available physical storage resources for the application in the plurality of UASs may be other manners. For example, according to the polling manner, the polling between the multiple UASs is determined as The application that allocates the available physical storage resources allocates the UAS of the available physical storage resources, which is not limited by the present invention.
  • the UAS determines whether the application can be allocated an available physical storage resource that matches the physical storage resource allocation request information.
  • step 202 For details, refer to step 202, and details are not described herein again.
  • steps 306a-307a, 308-311 are performed, and if the UAS determines that the available physical storage resources cannot be allocated for the application, steps 306b-307b are performed.
  • the UAS sends a satisfaction fulfillment message to the processing device; and the processing device receives the satisfaction of the assignment message.
  • step 203 For details, refer to step 203, and details are not described herein again.
  • the UAS sends an unsatisfied allocation message to the processing device.
  • the processing device receives the unsatisfied allocation message sent by the UAS.
  • the UAS may find the failure number table according to the reason that the application cannot be allocated, thereby determining the variable failure number, and sending the failure number as the content that does not satisfy the allocation message, and sending the failure number to the content of the failure message. Processing device.
  • failure number table is stored in advance in both the UAS and the processing device.
  • the failure number table refers to the failure reason that cannot allocate available physical storage resources and the mapping relationship between certain numbers.
  • the UAS can directly use the reason for failure as the message that does not satisfy the allocation message.
  • the content is sent to the processing device, and the UAS can also send the cause of the failure to the processing device in other manners, which is not limited in the present invention.
  • the processing device when receiving the satisfaction allocation message sent by the UAS, allocates an available virtual resource to the application according to the size information of the application physical storage resource.
  • the UAS may allocate the physical storage resource required by the application for the application, and the processing device may firstly determine, according to the size information of the physical storage resource, The application allocates available virtual resources. Reference may be made to step 104, and details are not described herein again.
  • the processing device determines the failure reason information according to the unsatisfied allocation message, and performs corresponding processing according to the failure reason information.
  • the processing device receives the failure to satisfy the allocation message, and parses the message to obtain the failure number, so as to find the failure number table according to the failure number, and determine the corresponding failure reason information, so as to perform processing corresponding to the failure reason information. .
  • processing device can perform different processing according to different failure reasons.
  • the same reason for failure may also be handled differently, and the present invention does not limit this.
  • the processing device may determine the failure reason information household, and may send the failure reason information to the application, thereby ending the resource allocation of the current time.
  • the processing device may resend the physical storage resource allocation request information and the process number of the application to the UAS, so that the UAS re-determines whether the physical storage resource can be allocated to the application.
  • step 308 when a plurality of UASs are included in the storage device connected to the processing device, step 308 may be performed. When only one UAS is included in the storage device connected to the processing device, step 309 is directly executed without performing step 308.
  • the processing device updates the first mapping table according to the address information of the available virtual resources allocated to the application and the UAS.
  • the first mapping table is used to record a mapping relationship between address information of the virtual resource and the UAS.
  • the processing device when the processing device is connected to multiple UASs, the processing device is in the application After the available virtual resources are allocated, the address information of the available virtual resources and the information about the UAS that needs to be allocated the available physical storage resources for the application may be recorded in the first mapping table, thereby updating the first mapping table.
  • mapping relationship between the identification number of the UAS recorded in the first mapping table and the address information of the virtual resource For example, the mapping relationship between the identification number of the UAS recorded in the first mapping table and the address information of the virtual resource.
  • the address information of the available virtual resources and the identification information of the UAS for which the available physical storage resources are allocated for the application may be recorded in the first mapping table. Thereby updating the first mapping table.
  • the mapping relationship between the address information of the virtual resource and the UAS in the first mapping table refers to the mapping relationship between the address information of the virtual resource and the information that can uniquely identify the UAS, for example, the UAS can be uniquely identified.
  • the first mapping table records the mapping relationship between the address information of the virtual resource and the UAS identifier.
  • the information that can uniquely identify the UAS may be other information.
  • the first mapping table records the mapping relationship between the address information of the virtual resource and other information that can uniquely identify the UAS.
  • the processing device sends address information of the available virtual resource to the UAS.
  • the UAS receives address information of available virtual resources sent by the processing device.
  • the processing device sends the address information of the available virtual resources to the UAS.
  • the UAS can refer to step 204, and details are not described herein again.
  • step 308 may be performed first, and then step 309 may be performed.
  • Step 309 may be performed first, and then step 308 may be performed.
  • Steps 308 and 309 may also be performed simultaneously, and only one of them is shown in the figure.
  • the UAS pre-allocates available resources for the application.
  • the UAS allocates metadata to the application in advance according to the physical storage resource allocation request information and the process ID of the application.
  • the UAS can allocate metadata to the application in advance according to the physical storage resource allocation request information, and record the correspondence between the metadata and the process number.
  • the UAS allocates request information according to the physical storage resource and
  • the process number of the application pre-allocating metadata to the application includes: the UAS pre-allocating metadata to the application according to the pre-allocated metadata type information and the process number of the application.
  • the UAS may further allocate an available physical storage resource to the application according to the physical storage resource allocation request information and the process ID of the application, and update the address mapping table according to the address information of the available physical storage resource. .
  • the UAS may allocate a portion of the available physical storage resources to the application in advance according to the physical storage resource allocation request information, and update the address mapping table according to the address information of the pre-allocated available physical storage resources. That is, the mapping relationship between the address information of the pre-allocated available physical storage resource and the address information of the available virtual resource is recorded in the address mapping table.
  • the UAS pre-allocates part of the available physical storage resources for the application, and when updating the address mapping table, the updated address information of the physical storage resource and the address information of the corresponding available virtual resources are available for this part.
  • the UAS allocates the remaining available physical storage resources for the application, and updates the address mapping table, the address information of the remaining available physical storage resources and the address information of the corresponding available virtual resources are updated.
  • the physical storage resource allocation request information includes the pre-allocated physical storage resource priority information, and/or size information of pre-allocated physical storage resources, and/or a medium of pre-allocated physical storage resources.
  • the UAS pre-allocating the available physical storage resources for the application according to the physical storage resource allocation request information and the process number of the application, including: the UAS according to the pre-allocated physical storage resource priority information.
  • size information of the pre-allocated physical storage resource, and/or media type information of the pre-allocated physical storage resource and the process number of the application pre-allocate the available physical storage resources to the application.
  • the physical storage resource allocation request information further includes cache information.
  • the UAS pre-determines the application according to the physical storage resource allocation request information and the process number of the application.
  • the available cache is allocated and the address mapping table is updated based on the address information of the available cache previously allocated for the application.
  • the UAS can pre-allocate a portion of the available cache for the application and update the address mapping table based on the pre-allocated address information of the available cache.
  • the address mapping table records the mapping relationship between the address information of the available virtual resources and the address information of the available physical storage resources by using the cached address information. That is, the address mapping table records the mapping relationship between the address information of the available virtual resources and the address information of the available cache, and the mapping relationship between the cached address information and the address information of the available physical storage resources.
  • the UAS pre-determines according to the physical storage resource allocation request information and the process number of the application.
  • the application allocation available cache includes: the UAS pre-allocating the available cache to the application according to the priority information of the pre-allocated cache data and the process number of the application.
  • the processing device sends a memory access request message to the UAS, so that the application allocates an available physical storage resource corresponding to the available virtual resource according to the physical storage resource allocation request information by using the UAS.
  • the UAS receives the memory access request message sent by the processing device.
  • the access request message carries the process ID of the application.
  • the UAS can manage various physical storage resources, and the UAS can allocate the physical storage resources for the application by itself.
  • the processing device only needs to send the memory access request message to the UAS.
  • triggering, by the UAS to allocate, to the application, an available physical storage resource corresponding to the available virtual resource according to the physical storage resource allocation request information.
  • For the UAS to receive the Fetch Request message sent by the processing device refer to step 205, and details are not described herein again.
  • the UAS allocates size information of the application physical storage resource included in the physical storage resource allocation request information to the application according to the physical storage resource allocation request information corresponding to the process ID of the application,
  • the operation permission information of the application physical resource and the available physical storage resource matching the information of the medium type of the physical storage resource are updated, and the address mapping table is updated according to the address information of the available physical storage resource.
  • the address mapping table is configured to record a mapping relationship between the address information of the available virtual resource and the address information of the available physical storage resource allocated for the application.
  • step 206 For details, refer to step 206, and details are not described herein again.
  • the UAS allocates an available cache to the application according to the cache information, and according to the Update the address mapping table with the cached address information.
  • the address mapping table is configured to record a mapping relationship between the address information of the available virtual resource and the address information of the available physical storage resource by using the cached address information.
  • the embodiment of the present invention provides a data processing method, which is configured to receive physical storage resource allocation request information sent by an application by acquiring an interface, where the physical storage resource allocation request information includes size information of applying for a physical storage resource, and applying for a physical storage resource.
  • the operation authority information and the medium information of the application physical storage resource determining whether the physical storage resource allocation request information includes the information of the media type of the applied physical storage resource.
  • the storage medium type matching the media information is searched for in the previously obtained spatial feature table.
  • the physical storage resource allocation request information including the determined media type information of the applied physical storage resource and the process number of the application are sent to the UAS.
  • the UAS receives the physical storage resource allocation request information sent by the processing device and the process ID of the application, and can determine whether the applicable physical storage resource that matches the physical storage resource allocation request information can be allocated to the application, and if it is determined to be an application allocation.
  • the available physical storage resource that matches the physical storage resource allocation request information returns, to the processing device, the address information of the available virtual resource that satisfies the allocation message and is transmitted by the receiving processing device.
  • the application When receiving the memory access request message carrying the process number of the application sent by the processing device, the application includes the physical storage resource allocation request information corresponding to the process number, and the application includes the location included in the physical storage resource allocation request information.
  • the size information of the physical storage resource is applied, the operation permission information of the physical storage resource is applied, and the available physical storage resource that matches the information of the media type of the physical storage resource, and the address mapping table is updated according to the address information of the available physical storage resource.
  • the physical storage resource allocation request information received by the processing device can automatically determine the application according to the media information of the physical storage resource that is applied to the physical storage resource when the information of the media type of the physical storage resource is not included.
  • the required media type of the physical storage resource is requested, and the physical storage resource allocation request information including the determined information of the media type of the physical storage resource is sent to the UAS, so that the UAS allocates the application suitable for storing the application.
  • the physical storage resources of the program's data thereby automatically allocating suitable available resources to the application's data without requiring the user to understand the performance of each storage medium, improving the performance of the application and improving the user experience.
  • the UAS contains disk storage In the case of media, you can directly allocate disk resources to the application and directly establish the mapping relationship between available virtual resources and disk resources without going through the file system, thus simplifying the system overhead of the application to apply for disk resources.
  • the UAS directly allocates available physical storage resources to the application, and the processing device simply allocates available virtual resources to the application, thereby reducing the workload of the processing device and providing system performance.
  • An embodiment of the present invention provides a method for resource allocation, where the application is in a processing device, and the processing device is connected to at least one storage device through a memory bus, where the storage device includes at least two storage media.
  • the at least one storage device includes a hybrid memory, and the application needs to mix the memory for the available physical storage resources, the method, as shown in FIG. 4, includes:
  • the processing device receives the physical storage resource allocation request information sent by the application by acquiring the interface.
  • the physical storage resource allocation information includes information about the size of the physical storage resource, the operation authority information of the physical storage resource, and the medium information of the physical storage resource.
  • the media information includes performance information of physical storage resources that match data that needs to be stored.
  • step 101 For details, refer to step 101, and details are not described herein again.
  • the processing apparatus determines whether the physical storage resource allocation request information includes information about a media type of the applied physical storage resource.
  • step 102 For details, refer to step 102, and details are not described herein again.
  • step 404 is directly performed. Go to step 403.
  • step 403 is performed.
  • the processing device searches for the storage medium type that matches the media information in the pre-acquired spatial feature table.
  • All the storage medium types and corresponding performance information included in the storage device are recorded in the spatial feature table.
  • step 103 For details, refer to step 103, and details are not described herein again.
  • the processing device allocates an available virtual resource to the application according to the size information of the application physical storage resource.
  • step 104 For details, refer to step 104, and details are not described herein again.
  • the processing device allocates, according to the physical storage resource allocation request information and the media type of the application physical storage resource, an available physical storage resource corresponding to the available virtual resource.
  • the processing device updates the VMA (Virtual) according to the address information of the available virtual resource and the media type of the physical storage resource, the size information of the physical storage resource, and the operation authority information of the physical storage resource. Memory Area, virtual management area).
  • the VMA is configured to record address information of the virtual resource and corresponding storage related information.
  • the address information of the available virtual resources and the related information required by the application for allocating the available resources are recorded in the VMA. That is, the address information of the available virtual resource and the media type of the application physical storage resource, the size information of the applied physical storage resource, and the operation authority information of the applied physical storage resource are recorded in the VMA.
  • the processing device when the resource allocation request message further includes the cache information, the processing device further records the cache information to a corresponding location in the VMA. That is, the processing device, according to the address information of the available virtual resource and the media type of the application physical storage resource, the size information of the application physical storage resource, the operation authority information of the application physical storage resource, and the cache information , update the VMA.
  • the processing device allocates available physical storage resources to the application according to the address information of the available virtual resource and the VMA, and updates the second mapping table. .
  • the second mapping table is configured to record a mapping relationship between address information of available virtual resources allocated by the application and address information of available physical storage resources.
  • the available virtual resource is accessed through the address information of the available virtual resource obtained by the application, and the processing device does not allocate the available physical storage resource for the processing device.
  • the page is broken.
  • the processing device is interrupted, the VMA is searched according to the address information of the available virtual resources, thereby being in the VMA.
  • the second mapping table is updated according to the address information of the available physical storage resources and the address information of the available virtual resources allocated for the application. That is, the mapping relationship between the address information of the available physical storage resources and the address information of the available virtual resources allocated for the application is recorded in the second mapping table.
  • the processing device uses the size information of the application physical storage resource recorded in the VMA corresponding to the address information of the available virtual resource, the operation authority information of the application physical storage resource, and the application physical storage.
  • the media type of the resource allocates available physical storage resources to the application.
  • the processing device may: when the application accesses the available virtual resource, the cache information recorded in the VMA corresponding to the address information of the available virtual resource is The application allocates an available cache.
  • the processing device updates the location information of the available cache allocated to the application according to the address information of the available virtual resources allocated for the application, and the address information of the available physical storage resources allocated for the application.
  • the second mapping table is described.
  • the processing device may search for the VMA according to the address information of the available virtual resources, find the corresponding entry, and obtain the cache information sent by the application in the entry, and process The device allocates an available cache to the application based on this cached information.
  • the mapping between the address information of the available virtual resources and the address information of the available cache, and the mapping between the cached address information and the address information of the available physical storage resources may be used.
  • the relationship is recorded in the second mapping table.
  • the embodiment of the present invention provides a data processing method, which is configured to receive physical storage resource allocation request information sent by an application by acquiring an interface, where the physical storage resource allocation request information carries size information of the applied physical storage resource, and applies for physical storage.
  • the operation authority information of the resource and the medium information of the application physical storage resource determining whether the physical storage resource allocation request information includes the information of the media type of the applied physical storage resource.
  • the medium may be searched for in the pre-acquired spatial feature table. The type of storage media that the information matches to allocate available virtual resources for this application.
  • the VMA And updating the VMA according to the address information of the available virtual resources, the medium type of the physical storage resource, the size information of the physical storage resource, and the operation authority information of the physical storage resource.
  • an appropriate physical storage resource is allocated to the application according to the content recorded by the VMA.
  • the physical storage resource allocation request information received by the processing device can be used to search for the spatial feature table according to the media information of the physical storage resource that is carried by the device, and automatically determine the application program when the information of the media type of the physical storage resource is not carried.
  • the required media type of the physical storage resource is requested, and when the application accesses the available virtual resource, the physical storage resource is allocated to the application, thereby allocating suitable resources for the application and improving the operating efficiency of the system. And the user does not need to know the characteristics of each storage medium in advance, which improves the user experience.
  • An embodiment of the present invention provides a processing device, where the processing device is connected to at least one storage device through a memory bus, where the storage device includes at least two different types of storage media, and the processing device is as shown in FIG. ,include:
  • the receiving unit 501 is configured to receive physical storage resource allocation request information sent by the application by using the acquiring interface.
  • the physical storage resource allocation information includes information about the size of the physical storage resource, the operation authority information of the physical storage resource, and the medium information of the physical storage resource.
  • the media information includes performance information of physical storage resources that match data that needs to be stored.
  • the physical storage resource allocation request information further includes cache information.
  • the physical storage resource allocation request information further includes pre-allocated metadata type information, and/or pre-allocated cache data priority information, and/or pre-allocated physical storage resource priority information, and/or Or size information of pre-allocated physical storage resources, and/or media type information of pre-allocated physical storage resources.
  • the determining unit 502 is configured to determine whether the physical storage resource allocation request information includes information about a media type of the physical storage resource.
  • the determining unit 502 is further configured to: when it is determined that the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource, search for the media information in the pre-acquired spatial feature table.
  • the type of storage media is further configured to: when it is determined that the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource, search for the media information in the pre-acquired spatial feature table.
  • All the storage medium types and corresponding performance information included in the storage device are recorded in the spatial feature table.
  • the spatial feature table is acquired when the storage device is connected.
  • the performance information corresponding to each storage medium type in the storage device recorded in the spatial feature table may be information such as delay information, energy consumption information, stored data feature information, and persistent information. Of course, other performance information may also be recorded, which is not limited by the present invention.
  • the determining unit 502 when determining that the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource, the determining unit 502 indicates that the media information of the applied physical storage resource does not include the medium type of the physical storage resource.
  • the space feature table may be searched according to the media information of the physical storage resource that is included in the physical storage resource allocation request information, so that the type of the storage medium matching the media information of the applied physical storage resource may be found in the spatial feature table, and then the The matching storage media type is determined as the media type of the application's physical storage resource.
  • the media information of the physical storage resource does not include the media type information of the physical storage resource
  • the media information includes only the performance information of the physical storage resource that matches the data that needs to be stored.
  • the performance information may be data persistence performance information, and/or delay feature information, and/or power consumption feature information, and/or feature information of the data to be stored, and the like.
  • the processing device may determine, according to the media information of the physical storage resource, the storage medium that satisfies the media information of the applied physical storage resource by searching the spatial feature table, that is, determining the media type for applying the physical storage resource.
  • the performance information of the physical storage resource may also be a performance parameter, which is not limited by the present invention.
  • the determining unit 502 adds the determined media type information of the applied physical storage resource to the In the physical storage resource allocation request information.
  • the allocating unit 503 is configured to allocate an available virtual resource to the application according to the size information of the application physical storage resource.
  • the allocating unit 503 is further configured to allocate, according to the physical storage resource allocation request information and the media type of the application physical storage resource, an available physical storage resource corresponding to the available virtual resource.
  • the processing device is different from the storage device connected thereto, and the allocating unit 503
  • the method for allocating the available physical storage resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the medium type of the application physical storage resource is different.
  • the allocation unit 503 When the connected storage device can allocate the available physical resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, the allocation unit 503 only The physical storage resource allocation request information and the media type of the application physical storage resource are sent to the storage device, and the storage device allocates an available physical storage resource corresponding to the available virtual resource to the application. That is, the allocating unit 503 allocates an available physical storage resource corresponding to the available virtual resource to the application through the storage device.
  • the allocating unit 503 itself Allocating an available physical storage resource corresponding to the available virtual resource to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource.
  • the allocating unit 503 is further configured to: when the determining unit 502 determines that the physical storage resource allocation request information includes information about a media type of applying for a physical storage resource, directly requesting the physical storage resource according to the application The size information allocates available virtual resources to the application. Allocating an available physical storage resource corresponding to the available virtual resource to the application according to the physical storage resource allocation request information.
  • the media information of the application physical storage resource includes: information about a media type of the physical storage resource.
  • the allocating unit configured to allocate the available virtual resources to the application according to the size information of the application physical storage resource, specifically includes:
  • the allocating unit 503 is specifically configured to send the physical storage resource allocation request information and the process ID of the application to the UAS, so that the UAS determines whether the applicable physical storage resource can be allocated to the application. .
  • the application Upon receiving the satisfaction of the distribution message sent by the UAS, the application allocates an available virtual resource according to the size information of the application physical storage resource.
  • the physical storage resource allocation request information further includes information about the determined medium type of the physical storage resource.
  • the allocating unit 503 may encapsulate the physical storage resource allocation request information and the process ID of the application into a message and send the message to the UAS.
  • the allocation unit 503 may also send the physical storage resource allocation request information and the process number of the application to the UAS, which is not limited in the present invention.
  • the allocating unit 503 is further configured to: allocate the available physical storage resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, and specifically include:
  • the allocating unit 503 is specifically configured to send address information of the available virtual resource to the UAS. And sending, by the UAS, a memory access request message, to allocate, by the UAS, the available physical storage resource corresponding to the available virtual resource according to the physical storage resource allocation request information.
  • the access request message carries the process ID of the application.
  • the processing device when the storage device includes multiple UASs, the processing device, as shown in FIG. 6, further includes:
  • the first update unit 504 is configured to update the first mapping table according to the address information of the available virtual resources allocated for the application and the UAS.
  • the first mapping table is used to record a mapping relationship between address information of the virtual resource and the UAS.
  • processing device as shown in FIG. 6, further includes:
  • the processing unit 505 is configured to determine, according to the unsatisfied allocation message, the failure reason information when receiving the dissatisfaction message sent by the UAS. And sending the failure reason information to the application.
  • the physical storage resource allocation request information and the process ID of the application are resent to the UAS, so that the UAS re-determines whether the physical storage resource can be allocated to the application.
  • the processing device further includes: a second update unit 506.
  • the allocating unit 503 is further configured to: allocate the available physical storage resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, and specifically include:
  • the allocating unit 503 is specifically configured to trigger the second updating unit 506 according to the The address information of the available virtual resource and the media type of the physical storage resource, the size information of the application physical storage resource, the operation authority information of the application physical storage resource, and the virtual management area VMA are updated.
  • the available physical storage resource is allocated to the application according to the address information of the available virtual resource and the VMA updated by the second update unit 506.
  • the VMA is configured to record address information of the virtual resource and corresponding storage related information.
  • the second update unit 506 is configured to: according to the address information of the available virtual resource and the media type of the application physical storage resource, the size information of the application physical storage resource, and the operation permission information of the application physical storage resource , update the virtual management area VMA.
  • the second update unit 506 is further configured to update the second mapping table according to the address information of the available virtual resource and the address information of the available physical storage resource allocated by the allocating unit 503.
  • the second mapping table is configured to record a mapping relationship between address information of available virtual resources allocated by the application and address information of available physical storage resources.
  • the second update unit 506 is specifically configured to: according to the address information of the available virtual resource and the media type of the application physical storage resource, And the size information of the application physical storage resource, the operation authority information of the application physical storage resource, and the cache information, and the VMA is updated.
  • the allocating unit 503 is specifically configured to: when the application accesses the available virtual resource, the cache information recorded by the entry of the VMA corresponding to the address information of the available virtual resource is The application allocates an available cache.
  • the size information of the application physical storage resource recorded by the entry of the VMA corresponding to the address information of the available virtual resource, the operation authority information of the application physical storage resource, and the media type of the physical storage resource Allocate available physical storage resources for the application.
  • the second updating unit 506 is specifically configured to: according to the address information of the available virtual resources allocated for the application, the address information of the available cache allocated to the application, and the available physical storage resources allocated for the application. Address information, update the second Mapping table.
  • the embodiment of the present invention provides a processing device, which receives the physical storage resource allocation request information sent by the application by the acquiring interface, where the physical storage resource allocation request information includes the size information of the applied physical storage resource, and the operation of applying for the physical storage resource.
  • the permission information and the medium information of the application physical storage resource determining whether the physical storage resource allocation request information includes the information of the medium type of the applied physical storage resource.
  • the storage medium type matching the media information is searched in the pre-acquired spatial feature table, thereby allocating the application for the application. Available virtual resources and their corresponding available physical storage resources.
  • the physical storage resource allocation request information received by the processing device can automatically determine the application according to the media information of the physical storage resource that is applied to the physical storage resource when the information of the media type of the physical storage resource is not included.
  • the type of media required to apply for a physical storage resource which in turn can allocate appropriate physical storage resources for the data of the application according to the media type, thereby automatically applying the application without requiring the user to understand the performance of each storage medium.
  • the program's data is allocated to the available resources, which improves the performance of the application and improves the user experience.
  • An embodiment of the present invention provides an integrated storage device UAS, as shown in FIG.
  • the receiving unit 801 is configured to receive physical storage resource allocation request information sent by the processing device and a process ID of the application.
  • the physical storage resource allocation request information includes information about the size of the physical storage resource, the operation authority information of the physical storage resource, and the medium type of the physical storage resource.
  • the physical storage resource allocation request information further carries cache information.
  • the physical storage resource allocation request information further includes pre-allocated metadata type information, and/or pre-allocated cache data priority information, and/or pre-allocated physical storage resource priority information, and/or Or size information of pre-allocated physical storage resources, and/or media type information of pre-allocated physical storage resources.
  • the determining unit 802 is configured to determine whether the applicable physical storage resource that matches the physical storage resource allocation request information is allocated to the application.
  • the determining unit 802 determines the type of the physical storage resource that needs to be allocated according to the media type of the physical storage resource that is carried by the receiving unit 801, and determines the physical storage resource according to the application. Size information, Determination unit 802 determines if this type of free physical storage resource is capable of meeting the physical storage resources required by this application. If so, it is determined that the application can be assigned this type of physical storage resource, that is, the application can be allocated an available physical storage resource that matches the physical storage resource allocation request information. If not, it is determined that the application cannot be assigned this type of physical storage resource, that is, the application cannot be allocated an available physical storage resource that matches the physical storage resource allocation request information.
  • the sending unit 803 is configured to send, when the determining unit 802 determines, that the application allocates available physical storage resources that match the physical storage resource allocation request information, to the processing device.
  • the receiving unit 801 is further configured to receive address information of available virtual resources sent by the processing device.
  • the receiving unit 801 is further configured to receive a memory access request message sent by the processing device.
  • the access request message carries the process ID of the application.
  • the allocating unit 804 is configured to allocate the application physical storage resource included in the physical storage resource allocation request information to the application according to the application physical storage resource allocation request information corresponding to the process ID of the application.
  • the updating unit 805 is configured to update the address mapping table according to the address information of the available physical storage resource allocated by the allocating unit 804 for the application.
  • the address mapping table is configured to record a mapping relationship between the address information of the available virtual resource and the address information of the available physical storage resource allocated for the application.
  • the allocating unit 804 is further configured to allocate an available cache to the application according to the cache information.
  • the updating unit 805 is further configured to update the address mapping table according to the address information of the available cache.
  • the address mapping table is configured to record, by using the cached address information, a mapping relationship between the address information of the available virtual resource and the address information of the available physical storage resource.
  • the allocating unit 804 is further configured to allocate metadata to the application according to the physical storage resource allocation request information and the process ID of the application.
  • the allocating unit 804 is further configured to pre-allocate the available physical storage resources for the application according to the physical storage resource allocation request information and the process ID of the application.
  • the updating unit 805 is further configured to update the address mapping table according to the address information of the available physical storage resource allocated by the allocation unit 804 in advance for the application.
  • the allocating unit is further configured to allocate metadata to the application according to the physical storage resource allocation request information and the process ID of the application.
  • the allocating unit 804 is further configured to allocate an available cache to the application according to the physical storage resource allocation request information and the process ID of the application.
  • the updating unit 805 is further configured to update the address mapping table according to the address information of the available cache allocated by the allocation unit 804 in advance for the application.
  • the allocating unit 804 is specifically configured to: when the physical storage resource allocation request information includes the pre-allocated metadata type information, according to the pre-allocated metadata type information and the application The process number pre-allocates metadata for the application.
  • the physical storage resource allocation request information includes the pre-allocated physical storage resource priority information, and/or size information of a pre-allocated physical storage resource, and/or media type information of a pre-allocated physical storage resource Determining, according to the pre-allocated physical storage resource priority information, and/or pre-allocated physical storage resource size information, and/or pre-allocated physical storage resource media type information and the process number of the application
  • the application allocates available physical storage resources.
  • the physical storage resource allocation request information includes the priority information of the pre-allocated cache data
  • the application is previously Allocate an available cache.
  • the sending unit 803 is further configured to: when the determining unit 802 determines that the applicable physical storage resource physical storage resource that cannot match the physical storage resource allocation request information is not allocated to the application, The device sends a message that does not satisfy the assignment.
  • An embodiment of the present invention provides a UAS, which receives, by using a processing device, a physical storage resource allocation request message and a process ID of an application, to determine whether the application can be The allocated physical storage resource is matched with the physical storage resource allocation request information, and if it is determined that the application allocates the allocated physical storage resource that matches the physical storage resource allocation request information, the processing device returns to satisfy the allocation message. Receiving address information of available virtual resources sent by the processing device.
  • the UAS When receiving the access request message carrying the process number sent by the processing device, assigning, to the application, the application physics included in the physical storage resource allocation request information according to the physical storage resource allocation request information corresponding to the process number
  • the size information of the storage resource, the operation authority information of the application physical storage resource, and the available physical storage resource matching the media type of the physical storage resource, and the address mapping table is updated according to the address information of the available physical storage resource.
  • the UAS can allocate the most suitable available physical storage resources to the application according to the needs of the application, thereby automatically allocating suitable resources for the application data without requiring the user to understand the performance of each storage medium. Improves application performance and improves user experience.
  • the embodiment of the present invention provides a processing device, as shown in FIG. 9, including: a processor 901, a memory 902, a communication interface 903, and a bus 904, a transmitter 905, wherein the processor 901 and the memory 902 The communication interface 903 and the transmitter 905 communicate via the bus 904.
  • the memory 902 is configured to store a program.
  • the processor 901 is configured to execute an execution instruction of the memory storage.
  • the communication interface 903 receives physical storage resource allocation request information sent by an application.
  • the physical storage resource allocation request information includes size information of the applied physical storage resource, operation permission information for applying the physical storage resource, and medium information for applying the physical storage resource.
  • the media information includes performance information of physical storage resources that match data that needs to be stored.
  • the physical storage resource allocation request information further includes cache information.
  • the physical storage resource allocation request information further includes pre-allocated metadata type information, and/or pre-allocated cache data priority information, and/or pre-allocated physical storage resource priority information, and/or Or size information of pre-allocated physical storage resources, and/or media type information of pre-allocated physical storage resources.
  • the processor 901 runs a program to execute the following instructions:
  • the processor 901 is configured to determine whether the physical storage resource allocation request information includes information about a media type of the physical storage resource.
  • the processor 901 is further configured to: when determining that the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource, searching for the storage that matches the media information in the pre-acquired spatial feature table. Media type.
  • All the storage medium types and corresponding performance information included in the storage device are recorded in the spatial feature table.
  • the spatial feature table is acquired when the storage device is connected.
  • the performance information corresponding to each storage medium type in the storage device recorded in the spatial feature table may be information such as delay information, energy consumption information, stored data feature information, and persistent information. Of course, other performance information may also be recorded, which is not limited by the present invention.
  • the processor 901 determines that the media information of the applied physical storage resource does not include the medium type of the physical storage resource when the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource.
  • the space feature table may be searched according to the media information of the physical storage resource that is included in the physical storage resource allocation request information, so that the type of the storage medium matching the media information of the applied physical storage resource may be found in the spatial feature table, and then the The matching storage media type is determined as the media type of the application's physical storage resource.
  • the media information of the physical storage resource does not include the media type information of the physical storage resource
  • the media information includes only the performance information of the physical storage resource that matches the data that needs to be stored.
  • the performance information may be data persistence performance information, and/or delay feature information, and/or power consumption feature information, and/or feature information of the data to be stored, and the like.
  • the processing device may determine, according to the media information of the physical storage resource, the storage medium that satisfies the media information of the applied physical storage resource by searching the spatial feature table, that is, determining the media type for applying the physical storage resource.
  • the performance information of the physical storage resource may also be a performance parameter, which is not limited by the present invention.
  • the information is determined by the processor 901 if the physical storage resource allocation request information does not include the information of the media type of the physical storage resource, the information of the media type of the physical storage resource is added to the physical Storage resource allocation request information.
  • the processor 901 is further configured to allocate the available virtual resources to the application according to the size information of the application physical storage resource.
  • the processor 901 is further configured to allocate, according to the physical storage resource allocation request information and the media type of the application physical storage resource, an available physical storage resource corresponding to the available virtual resource.
  • the processor 901 allocates the available physical storage corresponding to the available virtual resource to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, according to the storage device connected thereto.
  • the method of resources is different.
  • the processor 901 When the connected storage device can allocate the available physical resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the physical storage resource, the processor 901 only The physical storage resource allocation request information and the media type of the application physical storage resource are sent to the storage device, and the storage device allocates an available physical storage resource corresponding to the available virtual resource to the application. That is, the processor 901 allocates an available physical storage resource corresponding to the available virtual resource to the application through the storage device.
  • the processor 901 When the connected storage device can allocate the available physical resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, the processor 901 itself Allocating an available physical storage resource corresponding to the available virtual resource to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource.
  • the processor 901 is further configured to determine that the physical storage resource allocation request information includes information about a media type of the physical storage resource, and directly, according to the size information of the applied physical storage resource, the application Allocate available virtual resources. Allocating an available physical storage resource corresponding to the available virtual resource to the application according to the physical storage resource allocation request information.
  • the media information of the application physical storage resource includes: information about a media type of the physical storage resource.
  • processing device 901 is connected to at least one storage device through a bus 904, and the storage device includes at least two different types of storage media.
  • the processor 901 is further configured to trigger the transmitter 905 to send the physical storage resource allocation request information and a process ID of the application to the UAS. So that the UAS determines whether the application can be allocated available physical storage resources.
  • the transmitter 905 is configured to send the physical storage resource allocation request information and a process ID of the application to the UAS.
  • the physical storage resource allocation request information further includes information about the determined media type of the physical storage resource.
  • the transmitter 905 may encapsulate the physical storage resource allocation request information and the process number of the application into a message and send the message to the UAS.
  • the transmitter 905 may also send the physical storage resource allocation request information and the process number of the application to the UAS, which is not limited in the present invention.
  • the processor 901 is specifically configured to allocate an available virtual resource to the application according to the size information of the application physical storage resource when receiving the satisfaction of the distribution message sent by the UAS.
  • the processor 901 is further configured to allocate, according to the physical storage resource allocation request information and the media type of the application physical storage resource, an available physical storage resource corresponding to the available virtual resource for the application, including :
  • the processor 901 is specifically configured to trigger the transmitter 905 to send address information of the available virtual resource to the UAS. And sending, by the UAS, a memory access request message, to allocate, by the UAS, the available physical storage resource corresponding to the available virtual resource according to the physical storage resource allocation request information.
  • the transmitter 905 is further configured to send address information of the available virtual resource to the UAS.
  • the transmitter 905 is further configured to send a memory access request message to the UAS.
  • the processor 901 is further configured to update the first mapping table according to the address information of the available virtual resources allocated to the application and the UAS.
  • the first mapping table is used to record a mapping relationship between address information of the virtual resource and the UAS.
  • the processor 901 is further configured to: when receiving the unsatisfied allocation message sent by the UAS, determine the failure reason information according to the unsatisfied allocation message.
  • the trigger transmitter 905 transmits the failure cause information to the application.
  • the trigger transmitter 905 resends the physical storage resource allocation request information and the process number of the application to the UAS, so that the UAS re-determines whether the application can be allocated Manage storage resources.
  • the transmitter 905 is further configured to send the failure reason information to the application.
  • the trigger transmitter 905 resends the physical storage resource allocation request information and the process number of the application to the UAS.
  • the processor 901 is configured to: according to the address information of the available virtual resource and the media type of the application physical storage resource, the size of the applied physical storage resource, when the storage device includes: The information, the operation authority information of the application physical storage resource, updates the virtual management area VMA.
  • the available physical storage resource is allocated to the application according to the address information of the available virtual resource and the VMA, and the second mapping table is updated.
  • the VMA is configured to record address information of the virtual resource and corresponding storage related information.
  • the second mapping table is configured to record a mapping relationship between address information of available virtual resources allocated to an application and address information of available physical storage resources.
  • the processor 901 is specifically configured to: according to the address information of the available virtual resource and the media type of the application physical storage resource, And applying the size information of the physical storage resource, the operation authority information of the application physical storage resource, and the cache information, and updating the VMA.
  • the processor 901 is specifically configured to: when the application accesses the available virtual resource, the cache information recorded by the entry of the VMA corresponding to the address information of the available virtual resource is the application Allocate an available cache.
  • the processor 901 is specifically configured to: according to address information of an available virtual resource allocated for the application, address information of an available cache allocated to the application, and an address of the available physical storage resource allocated for the application Information, updating the second mapping table.
  • the embodiment of the present invention provides a processing device, which receives the physical storage resource allocation request information sent by the application by the acquiring interface, where the physical storage resource allocation request information includes the size information of the applied physical storage resource, and the operation of applying for the physical storage resource.
  • Permission information and media information for applying physical storage resources determining physical storage resource allocation request Whether the information contains information about the type of media on which the physical storage resource is applied.
  • the storage medium type matching the media information is searched in the pre-acquired spatial feature table, thereby allocating the application for the application. Available virtual resources and their corresponding available physical storage resources.
  • the physical storage resource allocation request information received by the processing device can automatically determine the application according to the media information of the physical storage resource that is applied to the physical storage resource when the information of the media type of the physical storage resource is not included.
  • the type of media required to apply for a physical storage resource which in turn can allocate appropriate physical storage resources for the data of the application according to the media type, thereby automatically applying the application without requiring the user to understand the performance of each storage medium.
  • the program's data is allocated to the available resources, which improves the performance of the application and improves the user experience.
  • An embodiment of the present invention provides an integrated storage device UAS, as shown in FIG. 10, including: a processor 1001, a memory 1002, a communication interface 1003, a bus 1004, and a transmitter 1005, wherein the processor 1001, The memory 1002, the communication interface 1003, and the transmitter 1005 communicate via the bus 1004.
  • the memory 1002 is configured to store programs and data.
  • the memory comprises at least two different types of storage media.
  • the communication interface 1003 is configured to receive physical storage resource allocation request information sent by the processing device and a process ID of the application.
  • the physical storage resource allocation request information includes information about the size of the physical storage resource, the operation authority information of the physical storage resource, and the medium type of the physical storage resource.
  • the physical storage resource allocation request information further carries cache information.
  • the physical storage resource allocation request information further includes pre-allocated metadata type information, and/or pre-allocated cache data priority information, and/or pre-allocated physical storage resource priority information, and/or Or size information of pre-allocated physical storage resources, and/or media type information of pre-allocated physical storage resources.
  • the processor 1001 is configured to determine whether an available physical storage resource that matches the physical storage resource allocation request information is allocated to the application.
  • the processor 1001 is further configured to: after receiving the physical storage resource allocation request information, the communication interface 1003 determines the type of the physical storage resource that needs to be allocated according to the media type of the physical storage resource that is carried by the communication interface 1003, and According to the application for physical storage resources Based on the size information, the processor 1001 determines whether this type of free physical storage resource can satisfy the physical storage resources needed for the application. If so, it is determined that the application can be assigned this type of physical storage resource, that is, the application can be allocated an available physical storage resource that matches the physical storage resource allocation request information. If not, it is determined that the application cannot be assigned this type of physical storage resource, that is, the application cannot be allocated an available physical storage resource that matches the physical storage resource allocation request information.
  • the processor 1001 is further configured to: when determining to allocate, to the application, an available physical storage resource that matches the physical storage resource allocation request information, trigger the transmitter 1005 to send an satisfaction fulfillment message to the processing device.
  • the transmitter 1005 is configured to send, when the processor 1001 determines that the application allocates available physical storage resources that match the physical storage resource allocation request information, to the processing device.
  • the communication interface 1003 is further configured to receive address information of available virtual resources sent by the processing device.
  • the communication interface 1003 is further configured to receive a memory access request message sent by the processing device.
  • the access request message carries the process ID of the application.
  • the processor 1001 is further configured to allocate the application included in the physical storage resource allocation request information to the application according to the application physical storage resource allocation request information corresponding to the process ID of the application.
  • the processor 1001 is further configured to update an address mapping table according to address information of the available physical storage resource.
  • the address mapping table is configured to record a mapping relationship between the address information of the available virtual resource and the address information of the available physical storage resource allocated for the application.
  • the processor 1001 is further configured to allocate an available cache to the application according to the cache information.
  • the processor 1001 is further configured to update an address mapping table according to the address information of the available cache.
  • the address mapping table is configured to record, by using the cached address information, a mapping relationship between the address information of the available virtual resource and the address information of the available physical storage resource.
  • processor 1001 is further configured to pre-allocate metadata for the application according to the physical storage resource allocation request information and the process ID of the application.
  • the processor 1001 is further configured to allocate an available physical storage resource to the application according to the physical storage resource allocation request information and a process ID of the application, and update according to the address information of the available physical storage resource.
  • the address mapping table is further configured to allocate an available physical storage resource to the application according to the physical storage resource allocation request information and a process ID of the application, and update according to the address information of the available physical storage resource.
  • the processor 1001 is further configured to pre-allocate an available cache for the application according to the physical storage resource allocation request information and a process number of the application, and according to the available cache allocated in advance for the application.
  • the address information is updated by the address mapping table.
  • the processor 1001 is specifically configured to: when the physical storage resource allocation request information includes the pre-allocated metadata type information, according to the pre-allocated metadata type information and the application The process number pre-allocates metadata for the application.
  • the physical storage resource allocation request information includes the pre-allocated physical storage resource priority information, and/or size information of a pre-allocated physical storage resource, and/or media type information of a pre-allocated physical storage resource Determining, according to the pre-allocated physical storage resource priority information, and/or pre-allocated physical storage resource size information, and/or pre-allocated physical storage resource media type information and the process number of the application
  • the application allocates available physical storage resources.
  • the physical storage resource allocation request information includes the priority information of the pre-allocated cache data
  • the application is previously Allocate an available cache.
  • the transmitter 1005 is further configured to: when the processor 1001 determines that the application cannot allocate an available physical storage resource physical storage resource that matches the physical storage resource allocation request information, to the processing The device sends a message that does not satisfy the assignment.
  • the embodiment of the present invention provides a UAS, which receives, by the processing device, the transmitted physical storage resource allocation request information and the process ID of the application, and determines whether the allocated physical medium that matches the physical storage resource allocation request information can be obtained for the application.
  • a storage resource if it is determined to allocate an allocated physical storage that matches the physical storage resource allocation request information for the application The resource returns the processing device to satisfy the allocation message. Receiving address information of available virtual resources sent by the processing device.
  • the UAS When receiving the access request message carrying the process number sent by the processing device, assigning, to the application, the application physics included in the physical storage resource allocation request information according to the physical storage resource allocation request information corresponding to the process number
  • the size information of the storage resource, the operation authority information of the application physical storage resource, and the available physical storage resource matching the media type of the physical storage resource, and the address mapping table is updated according to the address information of the available physical storage resource.
  • the UAS can allocate the most suitable available physical storage resources to the application according to the needs of the application, thereby automatically allocating suitable resources for the application data without requiring the user to understand the performance of each storage medium. Improves application performance and improves user experience.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the software functional units described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform portions of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), and a random access memory (RAM).
  • ROM read-only memory
  • RAM random access memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

The present invention relates to the field of communications. Provided are a resource allocation method and device, which are used for automatically allocating suitable available resources to data of an application, so as to improve the performance of the application. The method comprises: receiving, through an acquisition interface, physical storage resource allocation request information sent by an application; determining whether the physical storage resource allocation request information contains information of a medium type of a physical storage resource applied for; if it is determined that the physical storage resource allocation request information does not contain the information of the medium type of the physical storage resource applied for, searching in a spatial characteristic table acquired in advance a storage medium type matching with the medium information; allocating an available virtual resource to the application according to the size information of the physical storage resource applied for; and allocating, to the application, an available physical storage resource corresponding to the available virtual resource according to the physical storage resource allocation request information and the medium type of the physical storage resource applied for.

Description

一种资源分配的方法及装置Method and device for resource allocation 技术领域Technical field
本发明涉及通信领域,尤其涉及一种资源分配的方法及装置。The present invention relates to the field of communications, and in particular, to a method and an apparatus for resource allocation.
背景技术Background technique
目前,随着计算机技术的发展,处理器处理能力对内存的存储介质的要求也越来越高。近年来,混合了不同存储介质的新型内存结构被广泛关注。At present, with the development of computer technology, the processing power of the processor has become more and more demanding on the storage medium of the memory. In recent years, new memory structures mixed with different storage media have been widely concerned.
现有技术中,若某个应用程序进程需要请求物理存储资源时,需要向计算机操作系统发送请求消息,此请求消息中携带有请求的物理存储资源的存储介质类型的信息。操作系统先为其分配虚拟资源,并将虚拟资源的首地址返回至此应用程序。应用程序根据虚拟地址访问该虚拟资源。此时,由于操作系统并未为此应用程序分配物理存储资源,会产生缺页中断。操作系统在检测到应用程序产生的缺页中断后,根据此物理存储资源的存储介质类型的信息为此应用程序分配相应的物理存储资源。In the prior art, if an application process needs to request a physical storage resource, it needs to send a request message to the computer operating system, where the request message carries the information of the storage medium type of the requested physical storage resource. The operating system first allocates virtual resources to it and returns the first address of the virtual resource to this application. The application accesses the virtual resource based on the virtual address. At this point, a page fault interrupt occurs because the operating system does not allocate physical storage resources for this application. After detecting the page fault interrupt generated by the application, the operating system allocates corresponding physical storage resources to the application according to the storage medium type information of the physical storage resource.
在实现上述物理存储资源分配的过程中,发明人发现现有技术中至少存在如下问题:应用程序在进行物理存储资源请求时,必须携带有物理存储资源的存储介质类型的信息,此时,需要用户预先设置各个应用程序的数据需要使用的存储介质的类型,从而要求用户必须了解每种存储介质的性能,对用户要求较高。并且若用户在不了解每种存储介质的性能的情况下,为应用程序的数据设置需要使用的存储介质的类型,可能导致设置的存储介质的类型不适合该应用程序的数据,导致操作系统为此应用程序的数据分配的物理存储资源不适合,降低了应用程序的性能。In the process of implementing the foregoing physical storage resource allocation, the inventor has found that at least the following problems exist in the prior art: when the application requests the physical storage resource, the application must carry the information of the storage medium type of the physical storage resource. The user pre-sets the type of storage medium that the data of each application needs to use, so that the user must understand the performance of each storage medium, and the user requirements are high. And if the user does not understand the performance of each storage medium, setting the type of the storage medium to be used for the data of the application may cause the type of the set storage medium to be inappropriate for the data of the application, resulting in the operating system being The physical storage resources allocated by this application's data are not suitable, reducing the performance of the application.
发明内容Summary of the invention
本发明的实施例提供一种资源分配的方法及装置,在无需用户了解每种存储介质的性能的情况下,用以自动为应用程序的数据分配适合的可用资源,提高应用程序的性能,提高用户体验。Embodiments of the present invention provide a method and apparatus for resource allocation, which are used to automatically allocate suitable resources for application data, improve application performance, and improve without requiring the user to understand the performance of each storage medium. user experience.
为达到上述目的,本发明的实施例采用如下技术方案:In order to achieve the above object, embodiments of the present invention adopt the following technical solutions:
第一方面,本发明实施例提供了一种资源分配的方法,应用程序于处理装置,所述处理装置通过内存总线连接存储设备,所述存储设 备中包含有至少两种不同类型的存储介质,所述方法包括:所述处理装置通过获取接口接收应用程序发送的物理存储资源分配请求信息;所述物理存储资源分配请信息包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息;其中,所述介质信息中包括与需要存储的数据匹配的物理存储资源的性能信息;所述处理装置确定所述物理存储资源分配请求信息是否包含有所申请物理存储资源的介质类型的信息;若确定出所述物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息,则所述处理装置在预先获取的空间特征表中查找与所述介质信息匹配的存储介质类型;所述空间特征表中记录有所述存储设备中所包含的所有存储介质类型和对应的性能信息;所述处理装置根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源;所述处理装置根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源。In a first aspect, an embodiment of the present invention provides a method for resource allocation, where an application is in a processing device, and the processing device is connected to a storage device through a memory bus, where the storage device is configured. The device includes at least two different types of storage media, and the method includes: the processing device receives, by using an acquiring interface, physical storage resource allocation request information sent by an application; and the physical storage resource allocation request information includes applying for a physical storage resource. Size information, operation authority information for applying for a physical storage resource, and medium information for applying for a physical storage resource; wherein the medium information includes performance information of a physical storage resource that matches data to be stored; the processing device determines the Whether the physical storage resource allocation request information includes the information of the media type of the applied physical storage resource; if it is determined that the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource, the processing device Searching, in a pre-acquired spatial feature table, a storage medium type that matches the media information; the spatial feature table records all storage media types and corresponding performance information included in the storage device; the processing device Physical storage according to the application The size information of the source allocates an available virtual resource to the application; the processing device allocates the available virtual resource to the application according to the physical storage resource allocation request information and the media type of the applied physical storage resource. Corresponding available physical storage resources.
在第一方面的第一种可能的实现方式中,还包括:所述存储设备中包括:一体化存储设备UAS;所述处理装置根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源包括:所述处理装置将所述物理存储资源分配请求信息及所述应用程序的进程号发送至所述UAS,以使得所述UAS确定能否为所述应用程序分配可用物理存储资源;所述物理存储资源分配请求信息中还包括确定的所述申请物理存储资源的介质类型的信息;所述处理装置在接收到所述UAS发送的满足分配消息时,根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源;所述处理装置根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源包括:所述处理装置将所述可用虚拟资源的地址信息发送至所述UAS;所述处理装置向所述UAS发送访存请求消息,以便通过所述UAS根据所述物理存储资源分配请求信息为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源;所述访存请求消息中携带有所述应用程序的进程号。In a first possible implementation manner of the first aspect, the method further includes: the storage device includes: an integrated storage device UAS; and the processing device allocates the application according to the size information of the applied physical storage resource The available virtual resources include: the processing device transmitting the physical storage resource allocation request information and a process number of the application to the UAS, so that the UAS determines whether the applicable physical storage resource can be allocated to the application. The physical storage resource allocation request information further includes the determined media type information of the applied physical storage resource; and the processing device receives the physical storage resource according to the application when receiving the satisfaction of the distribution message sent by the UAS The size information is used to allocate the available virtual resources to the application; the processing device allocates, according to the physical storage resource allocation request information and the media type of the application physical storage resource, the application to the available virtual resource. Available physical storage resources include: the processing device will use the available virtual resources The address information is sent to the UAS; the processing device sends a memory access request message to the UAS, so as to allocate, by the UAS, the application to the available virtual resource according to the physical storage resource allocation request information. The physical storage resource is available; the fetch request message carries the process ID of the application.
结合第一方面,或第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述处理装置在接收到所述UAS发送 的不满足分配消息时,根据不满足分配消息,确定失败原因信息;所述处理装置将所述失败原因信息发送至所述应用程序;或者,所述处理装置将所述物理存储资源分配请求信息及所述应用程序的进程号重新发送至所述UAS,以使得所述UAS重新确定能否为所述应用程序分配物理存储资源。In conjunction with the first aspect, or the first possible implementation of the first aspect, in a second possible implementation of the first aspect, the processing device receives the UAS transmission When the allocation message is not satisfied, the failure reason information is determined according to the dissatisfaction of the allocation message; the processing device transmits the failure reason information to the application; or the processing device allocates the physical storage resource request information And the process number of the application is resent to the UAS to cause the UAS to re-determine whether the application can be allocated physical storage resources.
结合第一方面的第一或第二种可能的实现方式,在第一方面的第三种可能的实现方式中,所述物理存储资源分配请求信息中还包括预分配的元数据类型信息、和/或预分配的缓存数据的优先级信息、和/或预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息。With reference to the first or second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the physical storage resource allocation request information further includes pre-allocated metadata type information, and / or pre-allocated cache data priority information, and / or pre-allocated physical storage resource priority information, and / or pre-allocated physical storage resource size information, and / or pre-allocated physical storage resource media type information.
结合第一方面,或第一方面的第一至第三任一种可能的实现方式中,在第一方面的第四种可能的实现方式中,还包括:所述物理存储资源分配请求信息中还包括缓存信息。With reference to the first aspect, or any one of the first to the third possible implementation manners of the first aspect, in a fourth possible implementation manner of the first aspect, the method further includes: the physical storage resource allocation request information It also includes cache information.
第二方面,本发明实施例提供了一种资源分配的方法,应用于一体化存储设备UAS,所述UAS通过内存总线连接处理装置,所述UAS中包含有至少两种不同类型的存储介质,所述方法包括:所述UAS接收处理装置发送的物理存储资源分配请求信息及应用程序的进程号;所述物理存储资源分配请求信息中包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息;所述UAS确定能否为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源;若确定为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源,则所述UAS向所述处理装置发送满足分配消息;所述UAS接收所述处理装置发送的可用虚拟资源的地址信息;所述UAS接收所述处理装置发送的访存请求消息;所述访存请求消息中携带有应用程序的进程号;所述UAS根据所述应用程序的进程号对应的所述物理存储资源分配请求信息,为所述应用程序分配与所述物理存储资源分配请求信息所包括的所述申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息匹配的可用物理存储资源,根据所述可用物理存储资源的地址信息更新地址映射表;所述地址映射表用于记录所述可用虚拟资源的地址信息与为应用程序分配的可用物理存储资源的地址信息间的映射关系。 In a second aspect, the embodiment of the present invention provides a method for resource allocation, which is applied to an integrated storage device UAS. The UAS is connected to a processing device through a memory bus, and the UAS includes at least two different types of storage media. The method includes: the UAS receiving the physical storage resource allocation request information sent by the processing device and the process number of the application; the physical storage resource allocation request information includes the size information of the applied physical storage resource, and the operation of applying the physical storage resource Permission information and information of a media type of the physical storage resource; the UAS determines whether the application can be allocated an available physical storage resource that matches the physical storage resource allocation request information; if it is determined to be allocated to the application And the UAS sends an address that satisfies the allocation message to the processing device; the UAS receives address information of the available virtual resource sent by the processing device; the UAS receives the available physical storage resource that is matched by the physical storage resource allocation request information; a memory access request message sent by the processing device; the memory access request And the UAS carries the process ID of the application; the UAS allocates the physical storage resource allocation request information corresponding to the process ID of the application, and allocates, by the application, the physical storage resource allocation request information. The size information of the application physical storage resource, the operation authority information of the application physical storage resource, and the available physical storage resource that matches the information of the medium type of the physical storage resource, and the address mapping table is updated according to the address information of the available physical storage resource; The address mapping table is configured to record a mapping relationship between address information of the available virtual resource and address information of available physical storage resources allocated for the application.
在第二方面的第一种可能的实现方式中,所述物理存储资源分配请求信息中还携带有缓存信息,在所述UAS接收所述处理装置发送的访存请求消息之后,还包括:所述UAS根据所述缓存信息,为所述应用程序分配可用缓存,并根据所述可用缓存的地址信息更新所述地址映射表;所述地址映射表用于通过可用缓存的地址信息记录所述可用虚拟资源的地址信息与所述可用物理存储资源的地址信息间的映射关系。In a first possible implementation manner of the second aspect, the physical storage resource allocation request information further includes cache information, and after the UAS receives the memory access request message sent by the processing device, the method further includes: The UAS allocates an available cache to the application according to the cache information, and updates the address mapping table according to the address information of the available cache; the address mapping table is used to record the available information by using the cached address information. A mapping relationship between address information of the virtual resource and address information of the available physical storage resource.
结合第二方面,或第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,在所述UAS接收所述处理装置发送的访存请求消息之前,还包括:所述UAS根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配元数据;在所述UAS预先为所述应用程序分配元数据之后,还包括:根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源,并根据所述可用物理存储资源的地址信息更新所述地址映射表。With reference to the second aspect, or the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, before the UAS receives the memory access request message sent by the processing device, The UAS includes: pre-allocating metadata for the application according to the physical storage resource allocation request information and the process number of the application; after the UAS allocates metadata to the application in advance, the method further includes: And assigning the available physical storage resources to the application according to the physical storage resource allocation request information and the process ID of the application, and updating the address mapping table according to the address information of the available physical storage resources.
结合第二方面,或第二方面的第一种可能的实现方式,在第二方面的第三种可能的实现方式中,在所述UAS接收所述处理装置发送的访存请求消息之前,还包括:所述UAS根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配元数据;在所述UAS预先为所述应用程序分配元数据之后,还包括:所述UAS根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用缓存,并根据预先为所述应用程序分配的所述可用缓存的地址信息,更新所述地址映射表。With reference to the second aspect, or the first possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, before the UAS receives the memory access request message sent by the processing device, The UAS includes: pre-allocating metadata for the application according to the physical storage resource allocation request information and the process number of the application; after the UAS allocates metadata to the application in advance, the method further includes: And the UAS allocates an available cache to the application according to the physical storage resource allocation request information and the process ID of the application, and updates the location according to the address information of the available cache allocated in advance for the application. The address mapping table is described.
结合第二方面的第二或第三种可能的实现方式,在第二方面的第四种可能的实现方式中,所述物理存储资源分配请求信息中还包括预分配的元数据类型信息、和/或预分配的缓存数据的优先级信息、和/或预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息;在所述物理存储资源分配请求信息包含有所述预分配的元数据类型信息时,所述根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配元数据包括:根据所述预分配的元数据类型信息及所述应用程序的进程号预先为所述应用程序分配元数据;在所述物理 存储资源分配请求信息包含有所述预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息时,所述根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源包括:根据所述预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源;在所述物理存储资源分配请求信息包含有所述预分配的缓存数据的优先级信息时,所述根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用缓存包括:根据所述预分配的缓存数据的优先级信息及所述应用程序的进程号预先为所述应用程序分配可用缓存。With reference to the second or third possible implementation of the second aspect, in a fourth possible implementation manner of the second aspect, the physical storage resource allocation request information further includes pre-allocated metadata type information, and / or pre-allocated cache data priority information, and / or pre-allocated physical storage resource priority information, and / or pre-allocated physical storage resource size information, and / or pre-allocated physical storage resource media type The information is allocated in advance according to the physical storage resource allocation request information and the process number of the application when the physical storage resource allocation request information includes the pre-allocated metadata type information. The metadata includes: pre-allocating metadata to the application according to the pre-allocated metadata type information and a process number of the application; When the storage resource allocation request information includes the pre-allocated physical storage resource priority information, and/or size information of a pre-allocated physical storage resource, and/or media type information of a pre-allocated physical storage resource, the basis The physical storage resource allocation request information and the process number of the application program pre-allocating the available physical storage resources to the application include: pre-assigned physical storage resource priority information, and/or pre-allocated physical storage. The size information of the resource, and/or the media type information of the pre-allocated physical storage resource and the process number of the application, the available physical storage resource is allocated in advance to the application; the physical storage resource allocation request information includes When the priority information of the pre-allocated cached data is described, the pre-allocating the available cache according to the physical storage resource allocation request information and the process number of the application for the application includes: pre-allocating the cached data according to the pre-allocated cached data Priority information and the process number of the application are allocated in advance for the application Available cache.
结合第二方面,或者第二方面第一至第四任一种可能的实现方式,在第二方面的第五种可能的实现方式中,还包括:若确定不能为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源,则所述UAS向所述处理装置发送不满足分配消息。With reference to the second aspect, or the first to fourth possible implementation manners of the second aspect, in a fifth possible implementation manner of the second aspect, the method further includes: if it is determined that the application cannot be allocated The UAS sends an unsatisfied allocation message to the processing device, where the physical storage resource allocation request information matches the available physical storage resource.
第三方面,本发明实施例提供了一种处理装置,包括:接收单元,用于通过获取接口接收应用程序发送的物理存储资源分配请求信息;所述物理存储资源分配请信息包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息;其中,所述介质信息中包括与需要存储的数据匹配的物理存储资源的性能信息;确定单元,用于确定所述物理存储资源分配请求信息是否包含有所申请物理存储资源的介质类型的信息;所述确定单元,还用于在确定出所述物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息时,在预先获取的空间特征表中查找与所述介质信息匹配的存储介质类型;所述空间特征表中记录有所述存储设备中所包含的所有存储介质类型和对应的性能信息;分配单元,用于根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源;所述分配单元,还用于根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源。In a third aspect, an embodiment of the present invention provides a processing apparatus, including: a receiving unit, configured to receive, by using an acquiring interface, physical storage resource allocation request information sent by an application; and the physical storage resource allocation request information includes applying for a physical storage resource. The size information, the operation authority information of the physical storage resource, and the medium information of the physical storage resource; wherein the media information includes performance information of the physical storage resource that matches the data to be stored; and the determining unit is configured to determine Whether the physical storage resource allocation request information includes the information of the media type of the applied physical storage resource; the determining unit is further configured to: determine, in the physical storage resource allocation request information, the medium that does not include the applied physical storage resource Searching for a type of storage medium that matches the media information in a pre-acquired spatial feature table; the spatial feature table records all storage media types and corresponding performance information included in the storage device An allocation unit for The size information of the physical storage resource is used to allocate the available virtual resource to the application; the allocating unit is further configured to allocate the application according to the physical storage resource allocation request information and the media type of the applied physical storage resource. An available physical storage resource corresponding to the available virtual resource.
在第三方面的第一种可能的实现方式中,所述分配单元,用于根 据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源具体包括:所述分配单元,具体用于将所述物理存储资源分配请求信息及所述应用程序的进程号发送至所述UAS,以使得所述UAS确定能否为所述应用程序分配可用物理存储资源;所述物理存储资源分配请求信息中还包括确定的所述申请物理存储资源的介质类型的信息;在接收到所述UAS发送的满足分配消息时,根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源;所述分配单元,还用于根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源具体包括:所述分配单元,具体用于将所述可用虚拟资源的地址信息发送至所述UAS;向所述UAS发送访存请求消息,以便通过所述UAS根据所述物理存储资源分配请求信息为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源;所述访存请求消息中携带有所述应用程序的进程号。In a first possible implementation manner of the third aspect, the allocating unit is used for root The allocating the available virtual resources to the application according to the size information of the application for the physical storage resource includes: the allocating unit, specifically configured to send the physical storage resource allocation request information and the process number of the application to the Determining the UAS, so that the UAS determines whether the available physical storage resource can be allocated to the application; the physical storage resource allocation request information further includes the determined media type information of the applied physical storage resource; And when the UAS sends the contention request message, the application allocates an available virtual resource according to the size information of the application physical storage resource; the allocation unit is further configured to use the physical storage resource allocation request information and the Determining, by the application unit, the available physical storage resource corresponding to the available virtual resource, the method further includes: sending the address information of the available virtual resource to the UAS; sending a memory access request message to the UAS, according to the object by the UAS Storage resource allocation request information to the program allocates available physical storage resources and the available resource corresponding to the virtual application; the memory access request message carries the process ID of the application.
结合第三方面的第一种可能的实现方式,在第三方面的第二种可能的实现方式中,处理单元,用于在接收到所述UAS发送的不满足分配消息时,根据不满足分配消息,确定失败原因信息;将所述失败原因信息发送至所述应用程序;或者,将所述物理存储资源分配请求信息及所述应用程序的进程号重新发送至所述UAS,以使得所述UAS重新确定能否为所述应用程序分配物理存储资源。With reference to the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the processing unit is configured to: when the unsatisfied allocation message sent by the UAS is received, a message, determining failure reason information; transmitting the failure reason information to the application; or resending the physical storage resource allocation request information and the process number of the application to the UAS, so that the The UAS re-determines whether a physical storage resource can be allocated for the application.
结合第三方面的第一种或第二种可能的实现方式,在第三方面的第三种可能的实现方式中,所述物理存储资源分配请求信息中还包括预分配的元数据类型信息、和/或预分配的缓存数据的优先级信息、和/或预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息。With reference to the first or second possible implementation manner of the third aspect, in a third possible implementation manner of the third aspect, the physical storage resource allocation request information further includes pre-allocated metadata type information, And/or pre-allocated priority information of cached data, and/or pre-allocated physical storage resource priority information, and/or size information of pre-allocated physical storage resources, and/or media of pre-allocated physical storage resources Type information.
结合第三方面,或第三方面的第一至第三种可能的实现方式,在第三方面的第四种可能的实现方式中,所述物理存储资源分配请求信息中还包括缓存信息With reference to the third aspect, or the first to third possible implementation manners of the third aspect, in the fourth possible implementation manner of the third aspect, the physical storage resource allocation request information further includes cache information
第四方面,本发明实施例提供了一种一体化存储设备UAS,包括:接收单元,用于接收处理装置发送的物理存储资源分配请求信息及应用程序的进程号;所述物理存储资源分配请求信息中包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存 储资源的介质类型的信息;确定单元,用于确定能否为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源;发送单元,用于在所述确定单元确定为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源时,向所述处理装置发送满足分配消息;所述接收单元,还用于接收所述处理装置发送的可用虚拟资源的地址信息;所述接收单元,还用于接收所述处理装置发送的访存请求消息;所述访存请求消息中携带有应用程序的进程号;分配单元,用于根据所述应用程序的进程号对应的所述申请物理存储资源分配请求信息,为所述应用程序分配与所述物理存储资源分配请求信息所包括的所述申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息匹配的可用物理存储资源;更新单元,用于根据所述分配单元为所述应用程序分配的所述可用物理存储资源的地址信息更新地址映射表;所述地址映射表用于记录所述可用虚拟资源的地址信息与为应用程序分配的可用物理存储资源的地址信息间的映射关系。In a fourth aspect, an embodiment of the present invention provides an integrated storage device UAS, including: a receiving unit, configured to receive physical storage resource allocation request information sent by a processing device, and a process number of an application; and the physical storage resource allocation request The information includes the size information of the physical storage resource, the operation permission information of the physical storage resource, and the application physical storage. And a determining unit, configured to determine, by the application, an available physical storage resource that matches the physical storage resource allocation request information; and a sending unit, configured to determine, in the determining unit, And when the application allocates an available physical storage resource that matches the physical storage resource allocation request information, sending a satisfaction fulfillment message to the processing device; the receiving unit is further configured to receive the available virtual resource sent by the processing device The receiving unit is further configured to receive a memory access request message sent by the processing device, where the memory access request message carries a process number of the application, and an allocating unit, configured to be used according to the application And the application physical resource allocation request information corresponding to the process number, and the application program allocates the size information of the application physical storage resource included in the physical storage resource allocation request information, and applies the operation permission information of the physical storage resource. And available physical storage matching the information of the media type of the physical storage resource And an update unit, configured to update an address mapping table according to the address information of the available physical storage resource allocated by the allocation unit for the application; the address mapping table is configured to record address information of the available virtual resource and The mapping between address information of available physical storage resources allocated for the application.
结合第四方面,在第四方面的第一种可能的实现方式中,所述物理存储资源分配请求信息中还携带有缓存信息;所述分配单元,还用于根据所述缓存信息,为所述应用程序分配可用缓存;所述更新单元,还用于根据所述可用缓存的地址信息更新地址映射表;所述地址映射表用于通过可用缓存的地址信息记录所述可用虚拟资源的地址信息与所述可用物理存储资源的地址信息间的映射关系。With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the physical storage resource allocation request information further includes cache information, where the allocation unit is further configured to use, according to the cache information, The application unit allocates an available cache; the update unit is further configured to update an address mapping table according to the address information of the available cache; the address mapping table is configured to record address information of the available virtual resource by using the cached address information A mapping relationship with address information of the available physical storage resources.
结合第四方面,或第四方面的第一种可能的实现方式,在第四方面的第二种可能的实现方式中,所述物理存储资源分配请求信息中还携带有缓存信息;所述分配单元,还用于根据所述缓存信息,为所述应用程序分配可用缓存;所述更新单元,还用于根据所述可用缓存的地址信息更新地址映射表;所述地址映射表用于通过可用缓存的地址信息记录所述可用虚拟资源的地址信息与所述可用物理存储资源的地址信息间的映射关系。With reference to the fourth aspect, or the first possible implementation manner of the fourth aspect, in the second possible implementation manner of the fourth aspect, the physical storage resource allocation request information further includes cache information; The unit is further configured to allocate an available cache to the application according to the cache information; the update unit is further configured to update an address mapping table according to the address information of the available cache; the address mapping table is used to pass The cached address information records a mapping relationship between address information of the available virtual resources and address information of the available physical storage resources.
结合第四方面,或第四方面第一种可能的实现方式,在第四方面的第三种可能的实现方式中,所述分配单元,还用于根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配元数据;所述分配单元,还用于根据所述物理存储资源分配请求信 息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源;所述更新单元,还用于根据所述分配单元预先为所述应用程序分配的所述可用物理存储资源的地址信息更新所述地址映射表。。With reference to the fourth aspect, or the first possible implementation manner of the fourth aspect, in a third possible implementation manner of the fourth aspect, the allocation unit is further configured to allocate request information and a location according to the physical storage resource The process number of the application is pre-allocated metadata for the application; the allocation unit is further configured to allocate a request letter according to the physical storage resource And the process number of the application pre-allocating the available physical storage resources to the application; the update unit is further configured to pre-allocate the address of the available physical storage resource for the application according to the allocation unit The information updates the address mapping table. .
结合第四方面,或第四方面第一种可能的实现方式,在第四方面的第四种可能的实现方式中,所述分配单元,还用于根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配元数据;所述分配单元,还用于根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用缓存;所述更新单元,还用于根据所述分配单元预先为所述应用程序分配的所述可用缓存的地址信息,更新所述地址映射表。With reference to the fourth aspect, or the first possible implementation manner of the fourth aspect, in a fourth possible implementation manner of the fourth aspect, the allocating unit is further configured to allocate request information according to the physical storage resource The process number of the application is allocated metadata for the application in advance; the allocating unit is further configured to allocate an available cache to the application according to the physical storage resource allocation request information and the process number of the application. The update unit is further configured to update the address mapping table according to the address information of the available cache allocated by the allocation unit for the application in advance.
结合第四方面的第三或第四种可能的实现方式,在第四方面的第五种可能的实现方式中,所述物理存储资源分配请求信息中还包括预分配的元数据类型信息、和/或预分配的缓存数据的优先级信息、和/或预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息;所述分配单元,具体用于在所述物理存储资源分配请求信息包含有所述预分配的元数据类型信息时,根据所述预分配的元数据类型信息及所述应用程序的进程号预先为所述应用程序分配元数据;在所述物理存储资源分配请求信息包含有所述预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息时,根据所述预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源;在所述物理存储资源分配请求信息包含有所述预分配的缓存数据的优先级信息时,根据所述预分配的缓存数据的优先级信息及所述应用程序的进程号预先为所述应用程序分配可用缓存。With reference to the third or fourth possible implementation manner of the fourth aspect, in a fifth possible implementation manner of the fourth aspect, the physical storage resource allocation request information further includes pre-allocated metadata type information, and / or pre-allocated cache data priority information, and / or pre-allocated physical storage resource priority information, and / or pre-allocated physical storage resource size information, and / or pre-allocated physical storage resource media type The allocation unit is configured to: when the physical storage resource allocation request information includes the pre-allocated metadata type information, according to the pre-allocated metadata type information and a process number of the application Metadata is allocated to the application in advance; the physical storage resource allocation request information includes the pre-allocated physical storage resource priority information, and/or pre-allocated physical storage resource size information, and/or pre- When the media type information of the allocated physical storage resource is based on the pre-allocated physical storage resource priority information, and/or pre-allocated physical storage The size information of the storage resource, and/or the media type information of the pre-allocated physical storage resource and the process number of the application, the available physical storage resource is allocated in advance to the application; the physical storage resource allocation request information includes And pre-allocating the priority information of the cached data, and pre-allocating the available cache to the application according to the priority information of the pre-allocated cached data and the process ID of the application.
结合第四方面,或第四方面的第一至或第五种可能的实现方式,在第四方面的第六种可能的实现方式中,发送单元,还用于在所述确定单元确定不能为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源时,向所述处理装置发送不满足分配消息。With reference to the fourth aspect, or the first or fifth possible implementation manner of the fourth aspect, in a sixth possible implementation manner of the fourth aspect, the sending unit is further configured to determine, in the determining unit, that the And when the application allocates an available physical storage resource that matches the physical storage resource allocation request information, sending an unsatisfied allocation message to the processing device.
第五方面,本发明提供了一种处理装置,包括:处理器,存储器,通信接口,和总线,其中,所述处理器、所述存储器和所述通信接口通过所述 总线通信;所述存储器,用于存放程序;所述处理器,用于执行所述存储器存储的执行指令;所述通信接口,接收应用程序发送的物理存储资源分配请求信息;所述物理存储资源分配请求信息包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息;其中,所述介质信息中包括与需要存储的数据匹配的物理存储资源的性能信息;当所述处理装置运行时,处理器运行程序,以执行以下指令:确定所述物理存储资源分配请求信息是否包含有所申请物理存储资源的介质类型的信息;若确定出所述物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息,则在预先获取的空间特征表中查找与所述介质信息匹配的存储介质类型;所述空间特征表中记录有所述存储设备中所包含的所有存储介质类型和对应的性能信息;根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源;根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源。In a fifth aspect, the present invention provides a processing apparatus comprising: a processor, a memory, a communication interface, and a bus, wherein the processor, the memory, and the communication interface pass the Bus communication; the memory is configured to store a program; the processor is configured to execute an execution instruction stored by the memory; the communication interface receives physical storage resource allocation request information sent by an application; the physical storage resource The allocation request information includes the size information of the physical storage resource, the operation authority information of the physical storage resource, and the medium information of the physical storage resource. The media information includes performance information of the physical storage resource that matches the data to be stored. When the processing device is running, the processor runs a program to execute the following instructions: determining whether the physical storage resource allocation request information includes information about a media type of the applied physical storage resource; if the physical storage resource is determined If the information of the media type of the applied physical storage resource is not included in the allocation request information, the storage medium type matching the media information is searched in the pre-acquired spatial feature table; the storage device is recorded in the spatial feature table. All storage media classes included in Corresponding performance information; allocating available virtual resources to the application according to the size information of the physical storage resource; and determining, according to the physical storage resource allocation request information and the media type of the physical storage resource, the application The program allocates available physical storage resources corresponding to the available virtual resources.
第六方面,本发明实施例提供了一种一体化存储设备UAS,包括:处理器,存储器,通信接口,总线,和发射器,其中,所述处理器、所述存储器和所述通信接口通过所述总线通信;所述存储器,用于存储程序及数据,其中,所述存储器包含至少两种不同类型的存储介质;所述通信接口,用于接收处理装置发送的物理存储资源分配请求信息及应用程序的进程号;所述物理存储资源分配请求信息中包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息;所述处理器,用于确定能否为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源;所述处理器,还用于在确定为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源时,触发所述发射器向所述处理装置发送满足分配消息;所述发射器,用于向所述处理装置发送满足分配消息;所述通信接口,还用于接收所述处理装置发送的可用虚拟资源的地址信息;所述通信接口,还用于接收所述处理装置发送的访存请求消息;所述访存请求消息中携带有应用程序的进程号;所述处理器,还用于根据所述应用程序的进程号对应的所述物理存储资源分配请求信息,为所述应用程序分配与所述物理存储资源分配请求信息所包括的所述申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物 理存储资源的介质类型的信息匹配的可用物理存储资源,根据所述可用物理存储资源的地址信息更新地址映射表;所述地址映射表用于记录所述可用虚拟资源的地址信息与为应用程序分配的可用物理存储资源的地址信息间的映射关系。In a sixth aspect, an embodiment of the present invention provides an integrated storage device UAS, including: a processor, a memory, a communication interface, a bus, and a transmitter, wherein the processor, the memory, and the communication interface pass The bus communication; the memory is configured to store a program and data, wherein the memory includes at least two different types of storage media; the communication interface is configured to receive physical storage resource allocation request information sent by the processing device The process number of the application; the physical storage resource allocation request information includes size information of the application physical storage resource, operation permission information of the application physical storage resource, and information of the media type of the physical storage resource; the processor is configured to: Determining whether the application can be allocated an available physical storage resource that matches the physical storage resource allocation request information; the processor is further configured to determine to allocate the physical storage resource allocation request information to the application Triggering the transmitter to the processing when matching available physical storage resources Sending a message that satisfies an allocation message; the transmitter is configured to send a satisfaction message to the processing device; the communication interface is further configured to receive address information of an available virtual resource sent by the processing device; And receiving, by the processing device, a memory access request message; the memory access request message carries a process ID of the application; the processor is further configured to: according to the physical medium corresponding to the process number of the application And storing the resource allocation request information, the size information of the application physical storage resource included in the physical storage resource allocation request information, and the operation authority information and the application for applying for the physical storage resource An available physical storage resource that matches the information of the media type of the storage resource, and an address mapping table is updated according to the address information of the available physical storage resource; the address mapping table is used to record address information of the available virtual resource and serve as an application The mapping relationship between the address information of the allocated available physical storage resources.
本发明实施例提供了一种资源分配的方法及装置,通过获取接口接收应用程序发送的物理存储资源分配请求信息,其中,物理存储资源分配请求信息中包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息;确定物理存储资源分配请求信息中是否包含有所申请物理存储资源的介质类型的信息。在定物理存储资源分配请求信息中没有包含申请物理存储资源的介质类型的信息时,则可以在空间特征表中查找与所述申请物理存储资源的介质信息相匹配的存储介质类型,从而为此应用程序分配可用虚拟资源及其对应的可用物理存储资源。这样,在接收的物理存储资源分配请求信息中,没有包含申请物理存储资源的介质类型的信息时,处理装置可以根据其携带的申请物理存储资源的介质信息查找空间特征表,自动确定出应用程序存储数据时所需的申请物理存储资源的介质类型,进而可以根据此介质类型为此应用程序的数据分配适合的物理存储资源,从而实现了在无需用户了解每种存储介质的性能的情况下,自动为应用程序的数据分配适合的可用资源,提高了应用程序的性能,并提高了用户体验。The embodiment of the invention provides a method and a device for allocating resources, and receiving the physical storage resource allocation request information sent by the application by the acquiring interface, wherein the physical storage resource allocation request information includes the size information of the applied physical storage resource, and applies for the physics. The operation authority information of the storage resource and the medium information of the application physical storage resource; and determining whether the physical storage resource allocation request information includes the information of the medium type of the applied physical storage resource. When the information about the media type of the physical storage resource is not included in the physical storage resource allocation request information, the type of the storage medium matching the media information of the applied physical storage resource may be searched in the spatial feature table, thereby The application allocates available virtual resources and their corresponding available physical storage resources. In this manner, when the received physical storage resource allocation request information does not include the information of the media type of the physical storage resource, the processing device may search for the spatial feature table according to the media information of the physical storage resource that is carried by the processing device, and automatically determine the application. The type of media that is required for the physical storage resource to be stored when the data is stored, and then the appropriate physical storage resources can be allocated for the data of the application according to the media type, thereby realizing the performance of each storage medium without requiring the user to understand the performance of each storage medium. Automatically allocate the appropriate resources available to the application's data, improving application performance and improving the user experience.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only some of the present invention. For the embodiments, those skilled in the art can obtain other drawings according to the drawings without any creative work.
图1为本发明实施例提供的一种资源分配的方法的示意图;FIG. 1 is a schematic diagram of a method for resource allocation according to an embodiment of the present invention;
图2为本发明实施例提供的另一种资源分配的方法的示意图;2 is a schematic diagram of another method for resource allocation according to an embodiment of the present invention;
图3为本发明实施例提供的另一种资源分配的方法的示意图;FIG. 3 is a schematic diagram of another method for resource allocation according to an embodiment of the present invention;
图4为本发明实施例提供的另一种资源分配的方法的示意图;4 is a schematic diagram of another method for resource allocation according to an embodiment of the present invention;
图5为本发明实施例提供的一种处理装置的功能示意图; FIG. 5 is a schematic diagram of functions of a processing apparatus according to an embodiment of the present disclosure;
图6为本发明实施例提供的另一种处理装置的功能示意图;FIG. 6 is a schematic diagram of functions of another processing device according to an embodiment of the present invention;
图7为本发明实施例提供的另一种处理装置的功能示意图;FIG. 7 is a schematic diagram of functions of another processing apparatus according to an embodiment of the present invention;
图8为本发明实施例提供的一种UAS的功能示意图;FIG. 8 is a schematic diagram of a function of a UAS according to an embodiment of the present disclosure;
图9为本发明实施例提供的一种处理装置的结构示意图;FIG. 9 is a schematic structural diagram of a processing apparatus according to an embodiment of the present disclosure;
图10为本发明实施例提供的一种UAS的结构示意图。FIG. 10 is a schematic structural diagram of a UAS according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明实施例提供了一种资源分配的方法,应用程序于处理装置,所述处理装置通过内存总线连接至少一个存储设备,所述存储设备中包含有至少两种不同类型的存储介质,如图1所示,所述方法包括:An embodiment of the present invention provides a method for resource allocation, where the application is in a processing device, and the processing device is connected to at least one storage device through a memory bus, where the storage device includes at least two different types of storage media, as shown in the figure. As shown in Figure 1, the method includes:
101、所述处理装置通过获取接口接收应用程序发送的物理存储资源分配请求信息。101. The processing device receives, by using an acquiring interface, physical storage resource allocation request information sent by an application.
其中,所述物理存储资源分配请求信息中包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息。所述介质信息中包括与需要存储的数据匹配的物理存储资源的性能信息。The physical storage resource allocation request information includes information about the size of the physical storage resource, the operation authority information for applying the physical storage resource, and the medium information for applying the physical storage resource. The media information includes performance information of physical storage resources that match data that needs to be stored.
具体的,在应用程序需要申请物理存储资源时,可以通过调用获取接口的应用函数,向处理装置发送物理存储资源分配请求信息,处理装置通过获取接口接收到应用程序发送的物理存储资源分配请求信息。也就是说,应用程序将物理存储资源分配请求信息以获取接口的参数的形式发送至处理装置。Specifically, when the application needs to apply for the physical storage resource, the application function of the acquisition interface may be used to send the physical storage resource allocation request information to the processing device, and the processing device receives the physical storage resource allocation request information sent by the application through the acquiring interface. . That is, the application sends the physical storage resource allocation request information to the processing device in the form of parameters of the acquisition interface.
需要说明的是,获取接口的参数就是申请物理存储资源的相关信息,例如,申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息等信息。It should be noted that the parameters of the interface are the information about the physical storage resource, for example, the size information of the physical storage resource, the operation authority information of the physical storage resource, and the medium information of the physical storage resource.
102、所述处理装置确定所述物理存储资源分配请求信息是否包含有所申请物理存储资源的介质类型的信息。102. The processing apparatus determines whether the physical storage resource allocation request information includes information about a medium type of a physical storage resource.
具体的,处理装置在接收到物理存储资源分配请求信息后,可以 解析此物理存储资源分配请求信息,若解析出申请物理存储资源的介质类型的信息,则确定出物理存储资源分配请求信息中包含了所申请物理存储资源的介质类型的信息。若没有解析出申请物理存储资源的介质类型的信息,则确定物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型信息。Specifically, after receiving the physical storage resource allocation request information, the processing device may The physical storage resource allocation request information is parsed, and if the information of the media type of the physical storage resource is parsed, it is determined that the physical storage resource allocation request information includes the information of the media type of the applied physical storage resource. If the information of the media type of the physical storage resource is not parsed, it is determined that the physical storage resource allocation request information does not include the media type information of the applied physical storage resource.
103、若确定出所述物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息,则所述处理装置在预先获取的空间特征表中查找与所述介质信息匹配的存储介质类型。103. If it is determined that the physical storage resource allocation request information does not include information about a media type of the applied physical storage resource, the processing device searches for a storage medium that matches the media information in a pre-acquired spatial feature table. Types of.
其中,所述空间特征表中记录有所述存储设备中所包含的所有存储介质类型和对应的性能信息。All the storage medium types and corresponding performance information included in the storage device are recorded in the spatial feature table.
需要说明的是,空间特征表在连接存储设备时获取。空间特征表中记录的存储设备中的各个存储介质类型对应的性能信息可以是延迟性信息,能耗信息,存储的数据特征信息,持久化信息等信息。当然,还可以记录有其他性能信息,本发明对此不做限制。It should be noted that the spatial feature table is acquired when the storage device is connected. The performance information corresponding to each storage medium type in the storage device recorded in the spatial feature table may be information such as delay information, energy consumption information, stored data feature information, and persistent information. Of course, other performance information may also be recorded, which is not limited by the present invention.
具体的,处理装置在确定出物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息时,说明申请物理存储资源的介质信息没有包括申请物理存储资源的介质类型,这时,可以根据物理存储资源分配请求信息包含的申请物理存储资源的介质信息查找空间特征表,从而可以在空间特征表中查找出与申请物理存储资源的介质信息相匹配的存储介质类型,进而将此相匹配的存储介质类型确定为应用程序的物理存储资源的介质类型。Specifically, when the processing device determines that the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource, the media information for applying for the physical storage resource does not include the medium type for applying the physical storage resource. The space feature table may be searched according to the media information of the physical storage resource requested by the physical storage resource allocation request information, so that the type of the storage medium matching the media information of the applied physical storage resource may be found in the spatial feature table, and then the phase is The matching storage media type is determined as the media type of the application's physical storage resource.
需要说明的是,在申请物理存储资源的介质信息没有包括申请物理存储资源的介质类型信息时,所述介质信息中只包括了与需要存储的数据匹配的物理存储资源的性能信息。这些性能信息可以是数据的持久化性能信息,和/或延迟特征信息,和/或能耗特征信息,和/或需存储的数据的特征信息等。此时,处理装置可以根据此申请物理存储资源的介质信息,通过查找空间特征表,确定出满足申请物理存储资源的介质信息的存储介质,即为确定出申请物理存储资源的介质类型。It should be noted that, when the media information of the physical storage resource does not include the media type information of the physical storage resource, the media information includes only the performance information of the physical storage resource that matches the data that needs to be stored. The performance information may be data persistence performance information, and/or delay feature information, and/or power consumption feature information, and/or feature information of the data to be stored, and the like. At this time, the processing device may determine, according to the media information of the physical storage resource, the storage medium that satisfies the media information of the applied physical storage resource by searching the spatial feature table, that is, determining the media type for applying the physical storage resource.
需要说明的是,物理存储资源的性能信息还可是性能参数,本发明对此不做限制。It should be noted that the performance information of the physical storage resource may also be a performance parameter, which is not limited by the present invention.
示例性的,处理装置预先获取的空间特征表中记录了存储介质DRAM(Dynamic Random Access Memory,动态随机访问内存),NVM (Non-Volatile Memory,非易失内存),磁盘及其对应的性能信息。若接收到的物理存储资源分配请求信息中携带的申请物理存储资源的介质信息是延迟小于第一预设值,则处理装置在接收到物理存储资源分配请求信息,并对其进行解析后,确定出此物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型。处理装置根据申请物理存储资源的介质信息,查找预先获取的空间特征表,确定出延迟小于第一预设值的存储介质,假设为DRAM,则可以确定出此申请物理存储资源的介质类型为DRAM。Exemplarily, a storage medium DRAM (Dynamic Random Access Memory) is recorded in a spatial feature table acquired by the processing device in advance, and NVM is recorded. (Non-Volatile Memory, non-volatile memory), disk and its corresponding performance information. If the media information of the applied physical storage resource carried in the physical storage resource allocation request information is delayed by less than the first preset value, the processing device receives the physical storage resource allocation request information and parses the information, and then determines The media type of the requested physical storage resource is not included in the physical storage resource allocation request information. The processing device searches for the pre-acquired spatial feature table according to the media information of the physical storage resource, and determines a storage medium whose delay is less than the first preset value. If it is DRAM, it can determine that the media type of the applied physical storage resource is DRAM. .
需要说明的是,第一预设值是预先设置的。It should be noted that the first preset value is preset.
104、根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源。104. Allocate an available virtual resource to the application according to the size information of the application physical storage resource.
具体的,处理装置在确定出申请物理存储资源的介质类型后,可以根据申请物理存储资源的大小信息为此应用程序分配相应大小的可用虚拟资源。Specifically, after determining the type of the medium for applying the physical storage resource, the processing device may allocate the available virtual resource of the corresponding size to the application according to the size information of the applied physical storage resource.
105、根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源。105. Allocate, according to the physical storage resource allocation request information and the media type of the application physical storage resource, an available physical storage resource corresponding to the available virtual resource.
具体的,处理装置根据与其连接的存储设备不同,根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源的方法不同。Specifically, the processing device allocates the available physical storage resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the applied physical storage resource, according to the storage device connected to the processing device. The method is different.
在其连接的存储设备可以根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型自行为所述应用程序分配与所述可用虚拟资源对应的可用物理资时,处理装置只需将物理存储资源分配请求信息及所述申请物理存储资源的介质类型发至存储设备,由存储设备为应用程序分配与所述可用虚拟资源对应的可用物理存储资源。即为,处理装置通过存储设备为应用程序分配与所述可用虚拟资源对应的可用物理存储资源。When the connected storage device can allocate the available physical resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, the processing device only needs to The physical storage resource allocation request information and the media type of the application physical storage resource are sent to the storage device, and the storage device allocates an available physical storage resource corresponding to the available virtual resource to the application. That is, the processing device allocates an available physical storage resource corresponding to the available virtual resource to the application through the storage device.
在其连接的存储设备可以根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型不能为所述应用程序分配与所述可用虚拟资源对应的可用物理资时,处理装置自身根据物理存储资源分配请求信息及所述申请物理存储资源的介质类型为应用程序分配与所 述可用虚拟资源对应的可用物理存储资源。When the connected storage device can allocate the available physical resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, the processing device itself The physical storage resource allocation request information and the media type of the application physical storage resource are application allocation and location The available physical storage resources corresponding to the available virtual resources.
本发明实施例提供了一种资源分配的方法,通过获取接口接收应用程序发送的物理存储资源分配请求信息,其中,物理存储资源分配请求信息中包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息;确定物理存储资源分配请求信息中是否包含有申请物理存储资源的介质类型的信息。在定物理存储资源分配请求信息中没有包含申请物理存储资源的介质类型的信息时,则可以根据所述申请物理存储资源的介质信息,及空间特征表,确定所述应用程序请求的申请物理存储资源的介质类型,从而为此应用程序分配可用虚拟资源及可用的物理存储资源。这样,接收的物理存储资源分配请求信息中,在没有包含申请物理存储资源的介质类型的信息时,可以根据其携带的申请物理存储资源的性能的信息及空间特征表,自动确定出应用程序所需的申请物理存储资源的介质类型,进而可以根据此介质类型为此应用程序的数据分配适合的资源,从而实现了在无需用户了解每种存储介质的性能的情况下,自动为应用程序的数据分配适合的可用资源,提高了应用程序的性能,并提高了用户体验。An embodiment of the present invention provides a method for allocating resources, and receiving, by the acquiring interface, physical storage resource allocation request information sent by an application, where the physical storage resource allocation request information includes size information of applying for physical storage resources, and applying for physical storage resources. The operation authority information and the medium information of the application physical storage resource; determining whether the physical storage resource allocation request information includes the information of the media type for applying the physical storage resource. When the information about the media type of the physical storage resource is not included in the physical storage resource allocation request information, the physical storage of the application requested by the application may be determined according to the media information of the physical storage resource and the spatial feature table. The media type of the resource, which allocates available virtual resources and available physical storage resources for this application. In this way, the received physical storage resource allocation request information may automatically determine the application according to the information and the spatial feature table of the performance of the physical storage resource to be applied when the information of the medium type of the physical storage resource is not included. The type of media that is required to apply for a physical storage resource, which in turn can allocate suitable resources for the data of the application according to the media type, thereby realizing automatic data for the application without requiring the user to understand the performance of each storage medium. Allocating the right resources available improves the performance of your application and improves the user experience.
本发明实施例提供了一种资源分配的方法,应用于UAS(Unified Access Storage,一体化存储设备),所述UAS通过内存总线连接处理装置,所述UAS中包含有至少两种不同类型的存储介质。如图2所示,所述方法包括:The embodiment of the present invention provides a method for resource allocation, which is applied to a UAS (Unified Access Storage). The UAS is connected to a processing device through a memory bus, and the UAS includes at least two different types of storage. medium. As shown in FIG. 2, the method includes:
201、所述UAS接收处理装置发送的物理存储资源分配请求信息及应用程序的进程号。201. The UAS receives physical storage resource allocation request information sent by the processing device and a process ID of the application.
其中,所述物理存储资源分配请求信息中包含有申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息。The physical storage resource allocation request information includes information about the size of the physical storage resource, the operation authority information of the physical storage resource, and the medium type of the physical storage resource.
需要说明的是,在处理装置连接的存储设备中包括UAS时,且需要通过UAS为应用程序进行物理存储资源的分配,则处理装置需要向UAS发送物理存储资源分配请求信息及应用程序的进程号。It should be noted that, when the UAS is included in the storage device connected to the processing device, and the UAS needs to allocate physical storage resources for the application, the processing device needs to send the physical storage resource allocation request information and the process number of the application to the UAS. .
202、所述UAS确定能否为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用分配物理存储资源。202. The UAS determines whether the application can be allocated an available allocated physical storage resource that matches the physical storage resource allocation request information.
具体的,UAS在接收到物理存储资源分配请求信息后,根据其携带 的申请物理存储资源的介质类型,确定其需要分配的物理存储资源的类型,并根据申请物理存储资源的大小信息,UAS确定此类型的空闲的物理存储资源是否能够满足应用程序所需的物理存储资源。若满足,则确定可以为应用程序分配此类型的物理存储资源,即为可以为应用程序分配与物理存储资源分配请求信息匹配的可用物理存储资源。若不满足,则确定不能为应用程序分配此类型的物理存储资源,即为不能为应用程序分配物理存储资源分配请求信息匹配的可用物理存储资源。Specifically, after receiving the physical storage resource allocation request information, the UAS carries the information according to the physical storage resource allocation request The type of the physical storage resource to be applied to determine the type of the physical storage resource to be allocated, and according to the size information of the physical storage resource, the UAS determines whether the idle physical storage resource of this type can satisfy the physical storage required by the application. Resources. If so, it is determined that the application can be assigned this type of physical storage resource, that is, the application can be allocated an available physical storage resource that matches the physical storage resource allocation request information. If not, it is determined that the application cannot be assigned this type of physical storage resource, that is, the available physical storage resource that cannot be allocated to the application by the physical storage resource allocation request information.
203、若确定为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源,则所述UAS向所述处理装置发送满足分配消息。203. If it is determined that the application allocates an available physical storage resource that matches the physical storage resource allocation request information, the UAS sends a satisfaction fulfillment message to the processing device.
具体的,UAS在确定能为应用程序分配相应的物理存储资源时,向处理装置发送满足分配消息,以使得处理装置为此应用程序分配相应的可用虚拟资源。Specifically, when determining that the corresponding physical storage resource can be allocated for the application, the UAS sends a satisfaction fulfillment message to the processing device, so that the processing device allocates a corresponding available virtual resource for the application.
204、所述UAS接收所述处理装置发送的可用虚拟资源的地址信息。204. The UAS receives address information of available virtual resources sent by the processing device.
具体的,在处理装置为应用程序分配了可用虚拟资源后,将此可用虚拟资源的地址信息发送给UAS,以便UAS为应用程序分配与此可用虚拟资源对应的可用物理存储资源,并可根据可用虚拟资源的地址信息及可用物理存储资源的地址信息更新地址映射表。Specifically, after the processing device allocates the available virtual resources to the application, the address information of the available virtual resources is sent to the UAS, so that the UAS allocates available physical storage resources corresponding to the available virtual resources to the application, and may be available according to the available The address information of the virtual resource and the address information of the available physical storage resource update the address mapping table.
205、所述UAS接收所述处理装置发送的访存请求消息。205. The UAS receives a memory access request message sent by the processing device.
其中,所述访存请求消息中携带有应用程序的进程号,以便UAS获知应该为应用程序的哪个进程分配可用物理存储资源。The access request message carries the process ID of the application, so that the UAS knows which process of the application should allocate available physical storage resources.
具体的,在应用程序需要访问可用物理存储资源时,处理装置可以向UAS发送访存请求消息,此时UAS接收处理装置发送的访存请求消息。Specifically, when the application needs to access the available physical storage resources, the processing device may send a memory access request message to the UAS, and the UAS receives the memory access request message sent by the processing device.
206、所述UAS根据所述应用程序的进程号对应的所述物理存储资源分配请求信息,为所述应用程序分配与所述物理存储资源分配请求信息所包括的所述申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息匹配的可用物理存储资源,根据所述可用物理存储资源的地址信息更新地址映射表。The UAS allocates the size of the application physical storage resource included in the physical storage resource allocation request information to the application according to the physical storage resource allocation request information corresponding to the process ID of the application. The information, the operation permission information of the application physical storage resource, and the available physical storage resource matching the information of the medium type of the physical storage resource, and the address mapping table is updated according to the address information of the available physical storage resource.
其中,所述地址映射表用于记录所述可用虚拟资源的地址信息与 为应用程序分配的可用物理存储资源的地址信息间的映射关系。The address mapping table is configured to record address information of the available virtual resource and The mapping between address information of available physical storage resources allocated for the application.
具体的,UAS在接收到访存请求消息后,根据访存请求消息中携带的应用程序的进程号,确定出与此进程号对应的物理存储资源分配请求信息。Specifically, after receiving the memory access request message, the UAS determines the physical storage resource allocation request information corresponding to the process ID according to the process ID of the application carried in the memory access request message.
UAS在确定出物理存储资源分配请求信息后,可以根据物理存储资源分配请求信息包括的申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型为此应用程序分配相匹配的可用物理存储资源。并在分配了与物理存储资源分配请求信息包括的申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型相匹配的可用物理存储资源后,根据此应用程序对应的可用虚拟资源的地址信息及可用物理存储资源的地址信息,更新地址映射表,以便地址映射表记录此应用程序对应的可用虚拟资源的地址信息及可用物理存储资源的地址信息间的映射关系。这样,应用程序在进行物理存储资源访问时,可以向处理装置发送可用虚拟资源的地址,从而使得处理装置将此可用虚拟资源的地址发送至UAS,进而获取对应的可用物理存储资源。After determining the physical storage resource allocation request information, the UAS may apply for the physical storage resource operation permission information and the media type of the physical storage resource for the application according to the physical storage resource allocation request information. Allocate matching available physical storage resources. And after allocating the size information of the application physical storage resource included in the physical storage resource allocation request information, the operation permission information of the physical storage resource, and the available physical storage resource matching the media type of the physical storage resource, according to the application Updating the address mapping table by using the address information of the available virtual resources and the address information of the available physical storage resources, so that the address mapping table records the mapping relationship between the address information of the available virtual resources corresponding to the application and the address information of the available physical storage resources. . In this way, the application can send the address of the available virtual resource to the processing device when the physical storage resource is accessed, so that the processing device sends the address of the available virtual resource to the UAS to obtain the corresponding available physical storage resource.
需要说明的是,UAS是一种包含处理和多种存储介质的存储设备。在UAS中可以包含DRAM、STT-RAM(Spin Transfer Torque Random Access Memory,自旋转移矩随机内存),RRAM(Resistive Random Access Memory,阻变式存储器),PCM(Phase-Change Memory,相变化内存),SSD(Solid State Disk,固态硬盘),DISK(磁盘)。UAS设备连接到内存总线,CPU通过读取/写入指令访问设备内部的任一存储介质。It should be noted that UAS is a storage device that includes processing and various storage media. The UAS can include DRAM, STT-RAM (Spin Transfer Torque Random Access Memory), RRAM (Resistive Random Access Memory), and PCM (Phase-Change Memory). , SSD (Solid State Disk), DISK (disk). The UAS device is connected to the memory bus, and the CPU accesses any storage medium inside the device through a read/write instruction.
需要说明的是,UAS中还可以包含其他存储介质,本发明对此不做限制。It should be noted that other storage media may also be included in the UAS, which is not limited by the present invention.
本发明实施例提供了一种数据处理的方法,通过处理装置接收发送的物理存储资源分配请求信息及应用程序的进程号,确定能否为所述应用程序可用与物理存储资源分配请求信息相匹配的分配物理存储资源,若确定为应用程序分配与物理存储资源分配请求信息相匹配的分配物理存储资源,则将处理装置返回满足分配消息。接收处理装置发送的可用虚拟资源的地址信息。在接收处理装置发送的携带了进程号的访存请求消息时,根据此进程号对应的物理存储资源分配请求信息,为应用程序分配与所述物理存储资源分配请求信息所包括的所述 申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型相匹配的可用物理存储资源,并根据所述可用物理存储资源的地址信息更新地址映射表。这样,UAS可以根据应用程序的需要为应用程序分配最适合的可用物理存储资源,从而实现了在无需用户了解每种存储介质的性能的情况下,自动为应用程序的数据分配适合的可用资源,提高了应用程序的性能,并提高了用户体验。The embodiment of the present invention provides a data processing method, where the processing device receives the sent physical storage resource allocation request information and the process number of the application, and determines whether the application can be matched with the physical storage resource allocation request information. The physical storage resource is allocated, and if it is determined that the application allocates the allocated physical storage resource that matches the physical storage resource allocation request information, the processing device returns to satisfy the allocation message. Receiving address information of available virtual resources sent by the processing device. And receiving, by the receiving processing device, the memory storage resource allocation request information corresponding to the process ID, and allocating the application to the physical storage resource allocation request information according to the physical storage resource allocation request information corresponding to the process ID. Applying the size information of the physical storage resource, requesting the operation permission information of the physical storage resource, and the available physical storage resource matching the media type of the physical storage resource, and updating the address mapping table according to the address information of the available physical storage resource. In this way, the UAS can allocate the most suitable available physical storage resources to the application according to the needs of the application, thereby automatically allocating suitable resources for the application data without requiring the user to understand the performance of each storage medium. Improves application performance and improves user experience.
本发明实施例提供了一种资源分配的方法,应用程序于处理装置,所述处理装置通过内存总线连接至少一个存储设备,所述存储设备中包含有至少两种不同类型的存储介质。在所述至少一个存储设备中包括UAS,且应用程序需要UAS为其分配可用物理存储资源时,所述方法,如图3所示,包括:An embodiment of the present invention provides a method for resource allocation, where the application is in a processing device, and the processing device is connected to at least one storage device through a memory bus, where the storage device includes at least two different types of storage media. When the UAS is included in the at least one storage device, and the application needs the UAS to allocate the available physical storage resources, the method, as shown in FIG. 3, includes:
301、处理装置通过获取接口接收应用程序发送的物理存储资源分配请求信息。301. The processing device receives the physical storage resource allocation request information sent by the application by acquiring the interface.
其中,所述物理存储资源分配请信息包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息。所述介质信息中包括与需要存储的数据匹配的物理存储资源的性能信息。The physical storage resource allocation information includes information about the size of the physical storage resource, the operation authority information of the physical storage resource, and the medium information of the physical storage resource. The media information includes performance information of physical storage resources that match data that needs to be stored.
具体的,可参考步骤101,在此不再赘述。For details, refer to step 101, and details are not described herein again.
进一步的,在应用程序需要缓存时,所述资源分配请消息中还包括缓存信息。Further, when the application needs to be cached, the resource allocation request message further includes cache information.
进一步的,在应用程序可以指定UAS预先为其分配可用资源时,所述物理存储资源分配请求信息中还包括预分配的元数据类型信息、和/或预分配的缓存数据的优先级信息、和/或预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息。Further, when the application can specify that the UAS allocates available resources to the UAS in advance, the physical storage resource allocation request information further includes pre-allocated metadata type information, and/or pre-allocated cache data priority information, and / or pre-allocated physical storage resource priority information, and / or pre-allocated physical storage resource size information, and / or pre-allocated physical storage resource media type information.
302、处理装置确定所述物理存储资源分配请求信息是否包含有所申请物理存储资源的介质类型的信息。302. The processing apparatus determines whether the physical storage resource allocation request information includes information about a media type of the applied physical storage resource.
具体的,可参考步骤102,在此不再赘述。For details, refer to step 102, and details are not described herein again.
需要说明的是,根据处理装置确定的结果不同,则执行的步骤不同,在处理装置确定物理存储资源分配请求信息包含有所申请物理存 储资源的介质类型的信息时,则直接执行步骤304,无需执行步骤303。在处理装置确定物理存储资源分配请求信息没有包含有所申请物理存储资源的介质类型的信息时,则执行步骤303。It should be noted that, according to different results determined by the processing device, the steps performed are different, and the processing device determines that the physical storage resource allocation request information includes the applied physical storage. When the information of the media type of the resource is stored, step 304 is directly executed, and step 303 does not need to be performed. When the processing device determines that the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource, step 303 is performed.
303、若确定出所述物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息,则处理装置在预先获取的空间特征表中查找与所述介质信息匹配的存储介质类型。303. If it is determined that the physical storage resource allocation request information does not include information about the media type of the applied physical storage resource, the processing device searches for the storage medium type that matches the media information in the pre-acquired spatial feature table.
其中,所述空间特征表中记录有所述存储设备中所包含的所有存储介质类型和对应的性能信息。All the storage medium types and corresponding performance information included in the storage device are recorded in the spatial feature table.
具体的,可参考步骤103,在此不再赘述。For details, refer to step 103, and details are not described herein again.
304、所述处理装置将所述物理存储资源分配请求信息及所述应用程序的进程号发送至所述UAS,以使得所述UAS确定能否为所述应用程序分配可用物理存储资源。所述UAS接收所述处理装置发送的物理存储资源分配请求信息及应用程序的进程号。304. The processing device sends the physical storage resource allocation request information and a process ID of the application to the UAS, so that the UAS determines whether the applicable physical storage resource can be allocated to the application. The UAS receives the physical storage resource allocation request information sent by the processing device and the process ID of the application.
其中,所述物理存储资源分配请求信息中还包括申请物理存储资源的介质类型信息。The physical storage resource allocation request information further includes media type information for applying for a physical storage resource.
具体的,处理装置在确定出信息后,若物理存储资源分配请求信息中没有包含此申请物理存储资源的介质类型的信息,则处理装置将确定出的申请物理存储资源的介质类型的信息添加至所述物理存储资源分配请求信息中,与应用程序的进程号一起发送至UAS。若物理存储资源分配请求信息中包含有此申请物理存储资源的介质类型的信息,则直接与应用程序的进程号一起发送至UAS。Specifically, after the processing device determines the information, if the physical storage resource allocation request information does not include the information of the media type of the physical storage resource, the processing device adds the determined information of the media type of the physical storage resource to the determined The physical storage resource allocation request information is sent to the UAS along with the process ID of the application. If the physical storage resource allocation request information includes the information of the media type of the application physical storage resource, it is directly sent to the UAS along with the process ID of the application.
需要说明的是,在处理装置确定出物理存储资源分配请求信息中包含有申请物理存储资源的介质类型的信息时,说明申请物理存储资源的介质信息中包含了申请物理存储资源的介质类型的信息,此时处理装置可以直接向UAS发送包含了申请物理存储资源的介质类型信息的物理存储资源分配请求信息及所述应用程序的进程号。It should be noted that, when the processing device determines that the physical storage resource allocation request information includes information about the media type of the physical storage resource, the medium information for applying the physical storage resource includes information about the media type of the physical storage resource. At this time, the processing device may directly send the physical storage resource allocation request information including the media type information of the application physical storage resource to the UAS and the process ID of the application.
可选的,处理装置可以将物理存储资源分配请求信息及应用程序的进程号封装至一个消息中,发送至UAS。Optionally, the processing device may encapsulate the physical storage resource allocation request information and the process ID of the application into a message and send the message to the UAS.
需要说明的是,处理装置也可将物理存储资源分配请求信息及应用程序的进程号分别发送指UAS,本发明对此不作限制。It should be noted that the processing device may also send the physical storage resource allocation request information and the process number of the application to the UAS, which is not limited in the present invention.
UAS接收处理装置发送的物理存储资源分配请求信息及应用程序 的进程号可参考步骤201,在此不再赘述。UAS receiving physical storage resource allocation request information and application sent by the processing device For the process ID, refer to step 201, and details are not described herein again.
需要说明的是,在处理装置连接了多个UAS时,可以将所述物理存储资源分配请求信息及所述应用程序的进程号随机的发送至某个UAS,也可以根据预设的规则,在多个UAS中确定出需要为此应用程序分配可用物理存储资源的UAS,从而将所述物理存储资源分配请求信息及所述应用程序的进程号此UAS。当然,处理装置在多个UAS确定出哪个UAS为此应用程序进行可用物理存储资源的分配的方式还可以是其他方式,例如,根据轮询的方式,在多个UAS间轮询的确定出为请求分配可用物理存储资源的应用程序分配可用物理存储资源的UAS,本发明对此不做限制。It should be noted that when the processing device is connected to multiple UASs, the physical storage resource allocation request information and the process number of the application may be randomly sent to a certain UAS, or may be based on a preset rule. A UAS is determined among the plurality of UASs that need to allocate available physical storage resources for the application, thereby allocating the physical storage resource allocation request information and the process number of the application to the UAS. Of course, the manner in which the processing device determines which UAS to allocate the available physical storage resources for the application in the plurality of UASs may be other manners. For example, according to the polling manner, the polling between the multiple UASs is determined as The application that allocates the available physical storage resources allocates the UAS of the available physical storage resources, which is not limited by the present invention.
305、UAS确定能否为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源。305. The UAS determines whether the application can be allocated an available physical storage resource that matches the physical storage resource allocation request information.
具体的,可参考步骤202,在此不再赘述。For details, refer to step 202, and details are not described herein again.
需要说明的是,根据UAS确定的结果不同,则下面执行的步骤不同。若UAS确定可以为应用程序分配可用物理存储资源,则执行步骤306a-307a,308-311,若UAS确定不能为应用程序分配可用物理存储资源,则执行步骤306b-307b。It should be noted that the steps performed below are different according to the results determined by the UAS. If the UAS determines that the application can allocate available physical storage resources, then steps 306a-307a, 308-311 are performed, and if the UAS determines that the available physical storage resources cannot be allocated for the application, steps 306b-307b are performed.
306a、若确定为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源,则UAS向所述处理装置发送满足分配消息;处理装置接收满足分配消息。306a. If it is determined that the application allocates an available physical storage resource that matches the physical storage resource allocation request information, the UAS sends a satisfaction fulfillment message to the processing device; and the processing device receives the satisfaction of the assignment message.
具体的,可参考步骤203,在此不再赘述。For details, refer to step 203, and details are not described herein again.
306b、若确定不能为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源,则UAS向所述处理装置发送不满足分配消息。处理装置接收UAS发送的不满足分配消息。306b. If it is determined that the application cannot allocate an available physical storage resource that matches the physical storage resource allocation request information, the UAS sends an unsatisfied allocation message to the processing device. The processing device receives the unsatisfied allocation message sent by the UAS.
具体的,UAS在确定不能为应用程序分配可用物理存储资源时,可以根据其不能分配的原因查找失败编号表,从而确定出变失败编号,将此失败编号作为不满足分配消息的内容,发送至处理装置。Specifically, when determining that the available physical storage resource cannot be allocated for the application, the UAS may find the failure number table according to the reason that the application cannot be allocated, thereby determining the variable failure number, and sending the failure number as the content that does not satisfy the allocation message, and sending the failure number to the content of the failure message. Processing device.
需要说明的是,在UAS及处理装置中均预先存储了失败编号表。失败编号表是指不能分配可用物理存储资源的失败原因及某种编号间的映射关系。It should be noted that the failure number table is stored in advance in both the UAS and the processing device. The failure number table refers to the failure reason that cannot allocate available physical storage resources and the mapping relationship between certain numbers.
需要说明的是,UAS也可以直接将失败原因作为不满足分配消息的 内容发送至处理装置,UAS还可将失败原因以其他方式发送至处理装置,本发明对此不做限制。It should be noted that the UAS can directly use the reason for failure as the message that does not satisfy the allocation message. The content is sent to the processing device, and the UAS can also send the cause of the failure to the processing device in other manners, which is not limited in the present invention.
307a、所述处理装置在接收到所述UAS发送的满足分配消息时,根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源。307a. The processing device, when receiving the satisfaction allocation message sent by the UAS, allocates an available virtual resource to the application according to the size information of the application physical storage resource.
具体的,在接收到所述UAS发送的满足分配消息时,说明UAS可以为此应用程序分配其所需的物理存储资源,此时,处理装置可以先根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源。可参考步骤104,在此不再赘述。Specifically, when receiving the satisfaction of the distribution message sent by the UAS, the UAS may allocate the physical storage resource required by the application for the application, and the processing device may firstly determine, according to the size information of the physical storage resource, The application allocates available virtual resources. Reference may be made to step 104, and details are not described herein again.
307b、在接收到所述UAS发送的不满足分配消息时,处理装置根据不满足分配消息,确定失败原因信息,并根据所述失败原因信息进行相应处理。307b. When receiving the unsatisfied allocation message sent by the UAS, the processing device determines the failure reason information according to the unsatisfied allocation message, and performs corresponding processing according to the failure reason information.
具体的,处理装置接收到不满足分配消息,将解析此消息可以获取失败编号,从而根据此失败编号查找失败编号表,确定出对应的失败原因信息,从而根据失败原因信息进行与之对应的处理。Specifically, the processing device receives the failure to satisfy the allocation message, and parses the message to obtain the failure number, so as to find the failure number table according to the failure number, and determine the corresponding failure reason information, so as to perform processing corresponding to the failure reason information. .
需要说明的是,处理装置可以根据不同的失败原因,进行不同的处理。当然,相同的失败原因,也可以有不同的处理方式,本发明对此不做限制。It should be noted that the processing device can perform different processing according to different failure reasons. Of course, the same reason for failure may also be handled differently, and the present invention does not limit this.
进一步的,处理装置在确定出失败原因信息户,可以将所述失败原因信息发送至所述应用程序,从而结束此次的资源分配。或者,处理装置也可以将所述物理存储资源分配请求信息及所述应用程序的进程号重新发送至所述UAS,以使得所述UAS重新确定能否为所述应用程序分配物理存储资源。Further, the processing device may determine the failure reason information household, and may send the failure reason information to the application, thereby ending the resource allocation of the current time. Alternatively, the processing device may resend the physical storage resource allocation request information and the process number of the application to the UAS, so that the UAS re-determines whether the physical storage resource can be allocated to the application.
需要说明的是,在处理装置连接的存储设备中包括多个UAS时,可以执行步骤308,在处理装置连接的存储设备中只包括一个UAS时,无需执行步骤308,直接执行步骤309。It should be noted that, when a plurality of UASs are included in the storage device connected to the processing device, step 308 may be performed. When only one UAS is included in the storage device connected to the processing device, step 309 is directly executed without performing step 308.
308、处理装置根据为所述应用程序分配的可用虚拟资源的地址信息及所述UAS,更新第一映射表。308. The processing device updates the first mapping table according to the address information of the available virtual resources allocated to the application and the UAS.
其中,所述第一映射表用于记录虚拟资源的地址信息与UAS间的映射关系。The first mapping table is used to record a mapping relationship between address information of the virtual resource and the UAS.
具体的,在处理装置连接了多个UAS时,处理装置在为应用程序 分配了可用虚拟资源后,可以将此可用虚拟资源的地址信息与需要为此应用程序分配可用物理存储资源的UAS的相关信息,记录至第一映射表中,从而更新第一映射表。Specifically, when the processing device is connected to multiple UASs, the processing device is in the application After the available virtual resources are allocated, the address information of the available virtual resources and the information about the UAS that needs to be allocated the available physical storage resources for the application may be recorded in the first mapping table, thereby updating the first mapping table.
例如,第一映射表中记录的UAS的标识号与虚拟资源的地址信息间的映射关系。此时,处理装置在为应用程序分配了可用虚拟资源后,可以将此可用虚拟资源的地址信息,及为此应用程序分配可用物理存储资源的UAS的标识信息,记录至第一映射表中,从而更新第一映射表。For example, the mapping relationship between the identification number of the UAS recorded in the first mapping table and the address information of the virtual resource. At this time, after the processing device allocates the available virtual resources to the application, the address information of the available virtual resources and the identification information of the UAS for which the available physical storage resources are allocated for the application may be recorded in the first mapping table. Thereby updating the first mapping table.
需要说明的是,第一映射表中记录虚拟资源的地址信息与UAS间的映射关系是指记录虚拟资源的地址信息与能够唯一标识出UAS的信息间的映射关系,例如能够唯一标识出UAS的信息为UAS标识时,第一映射表中记录虚拟资源的地址信息与UAS标识间的映射关系。当然,能够唯一标识出UAS的信息还可是其他信息,此时第一映射表中记录虚拟资源的地址信息与其他能够唯一标识出UAS的信息间的映射关系,本发明对此不做限制。It should be noted that the mapping relationship between the address information of the virtual resource and the UAS in the first mapping table refers to the mapping relationship between the address information of the virtual resource and the information that can uniquely identify the UAS, for example, the UAS can be uniquely identified. When the information is a UAS identifier, the first mapping table records the mapping relationship between the address information of the virtual resource and the UAS identifier. Certainly, the information that can uniquely identify the UAS may be other information. In this case, the first mapping table records the mapping relationship between the address information of the virtual resource and other information that can uniquely identify the UAS.
309、处理装置将所述可用虚拟资源的地址信息发送至所述UAS。UAS接收所述处理装置发送的可用虚拟资源的地址信息。309. The processing device sends address information of the available virtual resource to the UAS. The UAS receives address information of available virtual resources sent by the processing device.
具体的,处理装置在为应用程序分配了可用虚拟资源后,将此可用虚拟资源的地址信息发送至UAS。UAS接收所述处理装置发送的可用虚拟资源的地址信息可参考步骤204,在此不再赘述。Specifically, after the processing device allocates available virtual resources to the application, the processing device sends the address information of the available virtual resources to the UAS. For the address information of the available virtual resource that is sent by the processing device, the UAS can refer to step 204, and details are not described herein again.
需要说明的是,在处理装置连接的存储设备中包括多个UAS时,本发明实施例对步骤308与步骤309间的顺序不做限制。可以先执行步骤308,再执行步骤309,也可以先执行步骤309,再执行步骤308,还可以同时执行步骤308和309,在图示中只表示了一种。It should be noted that, when a plurality of UASs are included in the storage device connected to the processing device, the embodiment of the present invention does not limit the order between step 308 and step 309. Step 308 may be performed first, and then step 309 may be performed. Step 309 may be performed first, and then step 308 may be performed. Steps 308 and 309 may also be performed simultaneously, and only one of them is shown in the figure.
310、UAS为应用程序预先分配可用的资源。310. The UAS pre-allocates available resources for the application.
具体的,UAS根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配元数据。Specifically, the UAS allocates metadata to the application in advance according to the physical storage resource allocation request information and the process ID of the application.
也就说是,UAS可以根据物理存储资源分配请求信息预先为此应用程序分配元数据,并记录此元数据与进程号间的对应关系。That is to say, the UAS can allocate metadata to the application in advance according to the physical storage resource allocation request information, and record the correspondence between the metadata and the process number.
进一步的,在物理存储资源分配请求信息中包含有所述预分配的元数据类型信息时,所述UAS根据所述物理存储资源分配请求信息及 所述应用程序的进程号预先为所述应用程序分配元数据包括:UAS根据所述预分配的元数据类型信息及所述应用程序的进程号预先为所述应用程序分配元数据。Further, when the physical storage resource allocation request information includes the pre-allocated metadata type information, the UAS allocates request information according to the physical storage resource and The process number of the application pre-allocating metadata to the application includes: the UAS pre-allocating metadata to the application according to the pre-allocated metadata type information and the process number of the application.
进一步的,UAS还可根据物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源,并根据所述可用物理存储资源的地址信息更新所述地址映射表。Further, the UAS may further allocate an available physical storage resource to the application according to the physical storage resource allocation request information and the process ID of the application, and update the address mapping table according to the address information of the available physical storage resource. .
也就是说,UAS可以根据物理存储资源分配请求信息预先为此应用程序分配部分的可用物理存储资源,并根据此预先分配的可用物理存储资源的地址信息更新地址映射表。即为在地址映射表中记录此预先分配的可用物理存储资源的地址信息与可用虚拟资源的地址信息间的映射关系。That is, the UAS may allocate a portion of the available physical storage resources to the application in advance according to the physical storage resource allocation request information, and update the address mapping table according to the address information of the pre-allocated available physical storage resources. That is, the mapping relationship between the address information of the pre-allocated available physical storage resource and the address information of the available virtual resource is recorded in the address mapping table.
需要说明的是,UAS为应用程序预先分配部分可用物理存储资源,更新地址映射表时,更新的为此部分可用物理存储资源的地址信息及其对应的可用虚拟资源的地址信息。在UAS为应用程序分配剩余可用物理存储资源,更新地址映射表时,更新的为剩余可用物理存储资源的地址信息及其对应的可用虚拟资源的地址信息。It should be noted that the UAS pre-allocates part of the available physical storage resources for the application, and when updating the address mapping table, the updated address information of the physical storage resource and the address information of the corresponding available virtual resources are available for this part. When the UAS allocates the remaining available physical storage resources for the application, and updates the address mapping table, the address information of the remaining available physical storage resources and the address information of the corresponding available virtual resources are updated.
进一步的,在所述物理存储资源分配请求信息包含有所述预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息时,所述UAS根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源包括:UAS根据所述预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源。Further, the physical storage resource allocation request information includes the pre-allocated physical storage resource priority information, and/or size information of pre-allocated physical storage resources, and/or a medium of pre-allocated physical storage resources. And the UAS pre-allocating the available physical storage resources for the application according to the physical storage resource allocation request information and the process number of the application, including: the UAS according to the pre-allocated physical storage resource priority information. And/or size information of the pre-allocated physical storage resource, and/or media type information of the pre-allocated physical storage resource and the process number of the application pre-allocate the available physical storage resources to the application.
进一步的,在应用程序需要缓存时,物理存储资源分配请求信息中还包含有缓存信息,此时,UAS根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用缓存,并根据预先为所述应用程序分配的所述可用缓存的地址信息,更新所述地址映射表。Further, when the application needs to be cached, the physical storage resource allocation request information further includes cache information. In this case, the UAS pre-determines the application according to the physical storage resource allocation request information and the process number of the application. The available cache is allocated and the address mapping table is updated based on the address information of the available cache previously allocated for the application.
也就是说,在应用程序需要缓存时,UAS可以为此应用程序预先分配部分可用缓存,并根据预先分配的可用缓存的地址信息,更新地址映射表。 That is, when the application needs to cache, the UAS can pre-allocate a portion of the available cache for the application and update the address mapping table based on the pre-allocated address information of the available cache.
需要说明的是,若UAS为应用程序分配了缓存,则地址映射表中通过可用缓存的地址信息记录了可用虚拟资源的地址信息与可用物理存储资源的地址信息间的映射关系。即为,地址映射表中记录了可用虚拟资源的地址信息与可用缓存的地址信息间的映射关系,可用缓存的地址信息与可用物理存储资源的地址信息间的映射关系。It should be noted that, if the UAS allocates a cache to the application, the address mapping table records the mapping relationship between the address information of the available virtual resources and the address information of the available physical storage resources by using the cached address information. That is, the address mapping table records the mapping relationship between the address information of the available virtual resources and the address information of the available cache, and the mapping relationship between the cached address information and the address information of the available physical storage resources.
进一步的,在所述物理存储资源分配请求信息包含有所述预分配的缓存数据的优先级信息时,所述UAS根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用缓存包括:UAS根据所述预分配的缓存数据的优先级信息及所述应用程序的进程号预先为所述应用程序分配可用缓存。Further, when the physical storage resource allocation request information includes the priority information of the pre-allocated cache data, the UAS pre-determines according to the physical storage resource allocation request information and the process number of the application. The application allocation available cache includes: the UAS pre-allocating the available cache to the application according to the priority information of the pre-allocated cache data and the process number of the application.
311、处理装置向所述UAS发送访存请求消息,以便通过所述UAS根据所述物理存储资源分配请求信息为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源。UAS接收所述处理装置发送的访存请求消息。311. The processing device sends a memory access request message to the UAS, so that the application allocates an available physical storage resource corresponding to the available virtual resource according to the physical storage resource allocation request information by using the UAS. The UAS receives the memory access request message sent by the processing device.
其中,所述访存请求消息中携带有应用程序的进程号。The access request message carries the process ID of the application.
具体的,在应用程序需要利用物理存储资源时,由于UAS管理各种物理存储资源,且UAS可以自行为应用程序进行物理存储资源的分配,此时,处理装置只需向UAS发送访存请求消息,触发UAS根据所述物理存储资源分配请求信息为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源。UAS接收所述处理装置发送的访存请求消息可参考步骤205,在此不再赘述。Specifically, when the application needs to utilize physical storage resources, the UAS can manage various physical storage resources, and the UAS can allocate the physical storage resources for the application by itself. At this time, the processing device only needs to send the memory access request message to the UAS. And triggering, by the UAS, to allocate, to the application, an available physical storage resource corresponding to the available virtual resource according to the physical storage resource allocation request information. For the UAS to receive the Fetch Request message sent by the processing device, refer to step 205, and details are not described herein again.
312、UAS根据所述应用程序的进程号对应的所述物理存储资源分配请求信息,为所述应用程序分配与所述物理存储资源分配请求信息所包括的所述申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息匹配的可用物理存储资源,根据所述可用物理存储资源的地址信息更新地址映射表。312. The UAS allocates size information of the application physical storage resource included in the physical storage resource allocation request information to the application according to the physical storage resource allocation request information corresponding to the process ID of the application, The operation permission information of the application physical resource and the available physical storage resource matching the information of the medium type of the physical storage resource are updated, and the address mapping table is updated according to the address information of the available physical storage resource.
其中,所述地址映射表用于记录所述可用虚拟资源的地址信息与为应用程序分配的可用物理存储资源的地址信息间的映射关系。The address mapping table is configured to record a mapping relationship between the address information of the available virtual resource and the address information of the available physical storage resource allocated for the application.
具体的,可参考步骤206,在此不再赘述。For details, refer to step 206, and details are not described herein again.
进一步的,在物理存储资源分配请求信息中包含有缓存信息时,UAS根据所述缓存信息,为所述应用程序分配可用缓存,并根据所述可 用缓存的地址信息更新地址映射表。Further, when the physical storage resource allocation request information includes the cache information, the UAS allocates an available cache to the application according to the cache information, and according to the Update the address mapping table with the cached address information.
此时,所述地址映射表用于通过可用缓存的地址信息记录所述可用虚拟资源的地址信息与所述可用物理存储资源的地址信息间的映射关系。At this time, the address mapping table is configured to record a mapping relationship between the address information of the available virtual resource and the address information of the available physical storage resource by using the cached address information.
本发明实施例提供了一种数据处理的方法,通过获取接口接收应用程序发送的物理存储资源分配请求信息,其中,物理存储资源分配请求信息中包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息;确定物理存储资源分配请求信息中是否包含有所申请物理存储资源的介质类型的信息。在定物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息时,则在预先获取的空间特征表中查找与所述介质信息匹配的存储介质类型。并将包含了确定出的申请物理存储资源的介质类型的信息的物理存储资源分配请求信息及应用程序的进程号发送至UAS。UAS接收处理装置发送的物理存储资源分配请求信息及应用程序的进程号,可以确定能否为所述应用程序分配与物理存储资源分配请求信息相匹配的可用物理存储资源,若确定为应用程序分配与物理存储资源分配请求信息相匹配的可用物理存储资源,则向处理装置返回满足分配消息,接收处理装置发送的可用虚拟资源的地址信息。在接收处理装置发送的携带了应用程序的进程号的访存请求消息时,根据此进程号对应的物理存储资源分配请求信息,为应用程序分配与所述物理存储资源分配请求信息所包括的所述申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息匹配的可用物理存储资源,根据所述可用物理存储资源的地址信息更新地址映射表。这样,处理装置接收的物理存储资源分配请求信息中,在没有包含申请物理存储资源的介质类型的信息时,可以根据其携带的申请物理存储资源的介质信息查找空间特征表,自动确定出应用程序所需的申请物理存储资源的介质类型,并将包含了确定出的申请物理存储资源的介质类型的信息的物理存储资源分配请求信息发送至UAS,使得UAS为此应用程序分配适合于存储此应用程序的数据的物理存储资源,从而实现了在无需用户了解每种存储介质的性能的情况下,自动为应用程序的数据分配适合的可用资源,提高了应用程序的性能,并提高了用户体验。进一步的,在UAS包含有磁盘存储 介质时,可以为应用程序直接分配磁盘资源,并直接建立可用虚拟资源与磁盘资源间的映射关系,无需经过文件系统,从而简化了应用程序申请磁盘资源的系统开销。并且,通过UAS直接为应用程序分配可用物理存储资源,处理装置只是为应用程序分配可用虚拟资源,从而减少了处理装置的工作量,提供了系统性能。The embodiment of the present invention provides a data processing method, which is configured to receive physical storage resource allocation request information sent by an application by acquiring an interface, where the physical storage resource allocation request information includes size information of applying for a physical storage resource, and applying for a physical storage resource. The operation authority information and the medium information of the application physical storage resource; determining whether the physical storage resource allocation request information includes the information of the media type of the applied physical storage resource. When the information of the media type of the applied physical storage resource is not included in the fixed physical storage resource allocation request information, the storage medium type matching the media information is searched for in the previously obtained spatial feature table. The physical storage resource allocation request information including the determined media type information of the applied physical storage resource and the process number of the application are sent to the UAS. The UAS receives the physical storage resource allocation request information sent by the processing device and the process ID of the application, and can determine whether the applicable physical storage resource that matches the physical storage resource allocation request information can be allocated to the application, and if it is determined to be an application allocation. The available physical storage resource that matches the physical storage resource allocation request information returns, to the processing device, the address information of the available virtual resource that satisfies the allocation message and is transmitted by the receiving processing device. When receiving the memory access request message carrying the process number of the application sent by the processing device, the application includes the physical storage resource allocation request information corresponding to the process number, and the application includes the location included in the physical storage resource allocation request information. The size information of the physical storage resource is applied, the operation permission information of the physical storage resource is applied, and the available physical storage resource that matches the information of the media type of the physical storage resource, and the address mapping table is updated according to the address information of the available physical storage resource. In this way, the physical storage resource allocation request information received by the processing device can automatically determine the application according to the media information of the physical storage resource that is applied to the physical storage resource when the information of the media type of the physical storage resource is not included. The required media type of the physical storage resource is requested, and the physical storage resource allocation request information including the determined information of the media type of the physical storage resource is sent to the UAS, so that the UAS allocates the application suitable for storing the application. The physical storage resources of the program's data, thereby automatically allocating suitable available resources to the application's data without requiring the user to understand the performance of each storage medium, improving the performance of the application and improving the user experience. Further, the UAS contains disk storage In the case of media, you can directly allocate disk resources to the application and directly establish the mapping relationship between available virtual resources and disk resources without going through the file system, thus simplifying the system overhead of the application to apply for disk resources. Moreover, the UAS directly allocates available physical storage resources to the application, and the processing device simply allocates available virtual resources to the application, thereby reducing the workload of the processing device and providing system performance.
本发明实施例提供了一种资源分配的方法,应用程序于处理装置,所述处理装置通过内存总线连接至少一个存储设备,所述存储设备中包含有至少两种存储介质。在所述至少一个存储设备包括混合内存,且应用程序需要混合内存为其分配可用物理存储资源时,所述方法,如图4所示,包括:An embodiment of the present invention provides a method for resource allocation, where the application is in a processing device, and the processing device is connected to at least one storage device through a memory bus, where the storage device includes at least two storage media. When the at least one storage device includes a hybrid memory, and the application needs to mix the memory for the available physical storage resources, the method, as shown in FIG. 4, includes:
401、处理装置通过获取接口接收应用程序发送的物理存储资源分配请求信息。401. The processing device receives the physical storage resource allocation request information sent by the application by acquiring the interface.
其中,所述物理存储资源分配请信息包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息。所述介质信息中包括与需要存储的数据匹配的物理存储资源的性能信息。The physical storage resource allocation information includes information about the size of the physical storage resource, the operation authority information of the physical storage resource, and the medium information of the physical storage resource. The media information includes performance information of physical storage resources that match data that needs to be stored.
具体的,可参考步骤101,在此不再赘述。For details, refer to step 101, and details are not described herein again.
402、处理装置确定所述物理存储资源分配请求信息是否包含有所申请物理存储资源的介质类型的信息。402. The processing apparatus determines whether the physical storage resource allocation request information includes information about a media type of the applied physical storage resource.
具体的,可参考步骤102,在此不再赘述。For details, refer to step 102, and details are not described herein again.
需要说明的是,根据处理装置确定的结果不同,则执行的步骤不同,在处理装置确定物理存储资源分配请求信息包含有所申请物理存储资源的介质类型的信息时,则直接执行步骤404,无需执行步骤403。在处理装置确定物理存储资源分配请求信息没有包含有所申请物理存储资源的介质类型的信息时,则执行步骤403。It should be noted that, according to different results determined by the processing device, the steps performed are different. When the processing device determines that the physical storage resource allocation request information includes information about the media type of the physical storage resource, step 404 is directly performed. Go to step 403. When the processing device determines that the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource, step 403 is performed.
403、若确定出所述物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息,则处理装置在预先获取的空间特征表中查找与所述介质信息匹配的存储介质类型。403. If it is determined that the physical storage resource allocation request information does not include information about the media type of the applied physical storage resource, the processing device searches for the storage medium type that matches the media information in the pre-acquired spatial feature table.
其中,所述空间特征表中记录有所述存储设备中所包含的所有存储介质类型和对应的性能信息。All the storage medium types and corresponding performance information included in the storage device are recorded in the spatial feature table.
具体的,可参考步骤103,在此不再赘述。 For details, refer to step 103, and details are not described herein again.
404、处理装置根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源。404. The processing device allocates an available virtual resource to the application according to the size information of the application physical storage resource.
具体的,可参考步骤104,在此不再赘述。For details, refer to step 104, and details are not described herein again.
405、所述处理装置根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源。405. The processing device allocates, according to the physical storage resource allocation request information and the media type of the application physical storage resource, an available physical storage resource corresponding to the available virtual resource.
具体的,处理装置根据所述可用虚拟资源的地址信息及所述申请物理存储资源的介质类型,所述申请物理存储资源的大小信息,所述申请物理存储资源的操作权限信息,更新VMA(Virtual Memory Area,虚拟管理区域)。Specifically, the processing device updates the VMA (Virtual) according to the address information of the available virtual resource and the media type of the physical storage resource, the size information of the physical storage resource, and the operation authority information of the physical storage resource. Memory Area, virtual management area).
其中,所述VMA用于记录虚拟资源的地址信息及其对应的存储相关信息。The VMA is configured to record address information of the virtual resource and corresponding storage related information.
具体的,处理装置在为应用程序分配了可用虚拟资源后,在VMA中记录此可用虚拟资源的地址信息及应用程序要求的为其分配可用资源的相关信息。即为将可用虚拟资源的地址信息及所述申请物理存储资源的介质类型,所述申请物理存储资源的大小信息,所述申请物理存储资源的操作权限信息记录至VMA中。Specifically, after the processing device allocates the available virtual resources to the application, the address information of the available virtual resources and the related information required by the application for allocating the available resources are recorded in the VMA. That is, the address information of the available virtual resource and the media type of the application physical storage resource, the size information of the applied physical storage resource, and the operation authority information of the applied physical storage resource are recorded in the VMA.
进一步的,在所述资源分配请消息中还包括缓存信息时,处理装置还需将此缓存信息记录至VMA中的相应位置。即为,处理装置根据所述可用虚拟资源的地址信息及所述申请物理存储资源的介质类型,所述申请物理存储资源的大小信息,所述申请物理存储资源的操作权限信息及所述缓存信息,更新所述VMA。Further, when the resource allocation request message further includes the cache information, the processing device further records the cache information to a corresponding location in the VMA. That is, the processing device, according to the address information of the available virtual resource and the media type of the application physical storage resource, the size information of the application physical storage resource, the operation authority information of the application physical storage resource, and the cache information , update the VMA.
进一步的,在所述应用程序访问所述可用虚拟资源发生中断时,处理装置根据所述可用虚拟资源的地址信息及所述VMA为所述应用程序分配可用物理存储资源,并更新第二映射表。Further, when the application accesses the available virtual resource, the processing device allocates available physical storage resources to the application according to the address information of the available virtual resource and the VMA, and updates the second mapping table. .
其中,所述第二映射表用于记录为应用程序分配的可用虚拟资源得地址信息与可用物理存储资源的地址信息间的映射关系。The second mapping table is configured to record a mapping relationship between address information of available virtual resources allocated by the application and address information of available physical storage resources.
具体的,在应用程序需要访问其申请的物理存储资源时,通过其获取的可用虚拟资源的地址信息,访问此可用虚拟资源,由于处理装置未为其分配可用物理存储资源,此时会产生缺页中断。处理装置在发生中断时,根据可用虚拟资源的地址信息查找VMA,从而在此VMA中 获取到应用程序申请资源时的存储相关信息,从而根据此存储相关信息为应用程序分配其对应的可用物理存储资源。在分配完可用物理存储资源后,根据此可用物理存储资源的地址信息及为应用程序分配的可用虚拟资源的地址信息,更新第二映射表。即为将可用物理存储资源的地址信息及为应用程序分配的可用虚拟资源的地址信息间的映射关系记录至第二映射表中。Specifically, when the application needs to access the physical storage resource of the application, the available virtual resource is accessed through the address information of the available virtual resource obtained by the application, and the processing device does not allocate the available physical storage resource for the processing device. The page is broken. When the processing device is interrupted, the VMA is searched according to the address information of the available virtual resources, thereby being in the VMA. Obtaining storage-related information when the application applies for a resource, thereby allocating the corresponding available physical storage resource to the application according to the storage related information. After the available physical storage resources are allocated, the second mapping table is updated according to the address information of the available physical storage resources and the address information of the available virtual resources allocated for the application. That is, the mapping relationship between the address information of the available physical storage resources and the address information of the available virtual resources allocated for the application is recorded in the second mapping table.
也就是说,处理装置根据所述可用虚拟资源的地址信息对应的所述VMA中记录的所述申请物理存储资源的大小信息,所述申请物理存储资源的操作权限信息,及所述申请物理存储资源的介质类型为所述应用程序分配可用物理存储资源。That is, the processing device uses the size information of the application physical storage resource recorded in the VMA corresponding to the address information of the available virtual resource, the operation authority information of the application physical storage resource, and the application physical storage. The media type of the resource allocates available physical storage resources to the application.
进一步的,在VMA中记录有缓存信息时,处理装置可以在所述应用程序访问所述可用虚拟资源发生中断时,根据所述可用虚拟资源的地址信息对应的所述VMA中记录的缓存信息为所述应用程序分配可用缓存。Further, when the cache information is recorded in the VMA, the processing device may: when the application accesses the available virtual resource, the cache information recorded in the VMA corresponding to the address information of the available virtual resource is The application allocates an available cache.
此时,处理装置根据为所述应用程序分配的可用虚拟资源的地址信息,为所述应用程序分配的可用缓存的地址信息及所述为应用程序分配的可用物理存储资源的地址信息,更新所述第二映射表。At this time, the processing device updates the location information of the available cache allocated to the application according to the address information of the available virtual resources allocated for the application, and the address information of the available physical storage resources allocated for the application. The second mapping table is described.
也就是说,在应用程序需要处理装置为其分配缓存时,处理装置可以根据可用虚拟资源的地址信息查找VMA,找到相应的表项,可以在表项中获取到应用程序发送的缓存信息,处理装置根据此缓存信息为应用程序分配可用缓存。That is, when the application requires the processing device to allocate a cache for the processing device, the processing device may search for the VMA according to the address information of the available virtual resources, find the corresponding entry, and obtain the cache information sent by the application in the entry, and process The device allocates an available cache to the application based on this cached information.
在为应用程序分配完可用缓存及可用物理存储资源时,可以将可用虚拟资源的地址信息及可用缓存的地址信息间的映射关系,可用缓存的地址信息与可用物理存储资源的地址信息间的映射关系记录至第二映射表中。When the available cache and available physical storage resources are allocated for the application, the mapping between the address information of the available virtual resources and the address information of the available cache, and the mapping between the cached address information and the address information of the available physical storage resources may be used. The relationship is recorded in the second mapping table.
本发明实施例提供了一种数据处理的方法,通过获取接口接收应用程序发送的物理存储资源分配请求信息,其中,物理存储资源分配请求信息中携带有申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息;确定物理存储资源分配请求信息中是否包含有所申请物理存储资源的介质类型的信息。在定物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息时,则可以在预先获取的空间特征表中查找与所述介质 信息匹配的存储介质类型,从而为此应用程序分配可用虚拟资源。并根据可用虚拟资源的地址信息,申请物理存储资源的介质类型,申请物理存储资源的大小信息及申请物理存储资源的操作权限信息更新VMA。在应用程序访问所述可用虚拟资源发生中断时,根据VMA记录的内容,为应用程序分配相应的可用物理存储资源。这样,处理装置接收的物理存储资源分配请求信息中,在没有携带申请物理存储资源的介质类型的信息时,可以根据其携带的申请物理存储资源的介质信息查找空间特征表,自动确定出应用程序所需的申请物理存储资源的介质类型,并在应用程序访问所述可用虚拟资源发生中断时,为应用程序分配物理存储资源,从而为此应用程序分配适合的资源,提高系统的运行效率。并且无需用户预先了解每种存储介质的特性,提高了用户体验。The embodiment of the present invention provides a data processing method, which is configured to receive physical storage resource allocation request information sent by an application by acquiring an interface, where the physical storage resource allocation request information carries size information of the applied physical storage resource, and applies for physical storage. The operation authority information of the resource and the medium information of the application physical storage resource; determining whether the physical storage resource allocation request information includes the information of the media type of the applied physical storage resource. When the information about the media type of the applied physical storage resource is not included in the fixed physical storage resource allocation request information, the medium may be searched for in the pre-acquired spatial feature table. The type of storage media that the information matches to allocate available virtual resources for this application. And updating the VMA according to the address information of the available virtual resources, the medium type of the physical storage resource, the size information of the physical storage resource, and the operation authority information of the physical storage resource. When an application accesses the available virtual resources, an appropriate physical storage resource is allocated to the application according to the content recorded by the VMA. In this way, the physical storage resource allocation request information received by the processing device can be used to search for the spatial feature table according to the media information of the physical storage resource that is carried by the device, and automatically determine the application program when the information of the media type of the physical storage resource is not carried. The required media type of the physical storage resource is requested, and when the application accesses the available virtual resource, the physical storage resource is allocated to the application, thereby allocating suitable resources for the application and improving the operating efficiency of the system. And the user does not need to know the characteristics of each storage medium in advance, which improves the user experience.
本发明实施例提供了一种处理装置,所述处理装置通过内存总线连接至少一个存储设备,所述存储设备中包含有至少两种不同类型的存储介质,所述处理装置,如图5所示,包括:An embodiment of the present invention provides a processing device, where the processing device is connected to at least one storage device through a memory bus, where the storage device includes at least two different types of storage media, and the processing device is as shown in FIG. ,include:
接收单元501,用于通过获取接口接收应用程序发送的物理存储资源分配请求信息。The receiving unit 501 is configured to receive physical storage resource allocation request information sent by the application by using the acquiring interface.
其中,所述物理存储资源分配请信息包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息。所述介质信息中包括与需要存储的数据匹配的物理存储资源的性能信息。The physical storage resource allocation information includes information about the size of the physical storage resource, the operation authority information of the physical storage resource, and the medium information of the physical storage resource. The media information includes performance information of physical storage resources that match data that needs to be stored.
进一步的,所述物理存储资源分配请求信息中还包括缓存信息。Further, the physical storage resource allocation request information further includes cache information.
进一步的,所述物理存储资源分配请求信息中还包括预分配的元数据类型信息、和/或预分配的缓存数据的优先级信息、和/或预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息。Further, the physical storage resource allocation request information further includes pre-allocated metadata type information, and/or pre-allocated cache data priority information, and/or pre-allocated physical storage resource priority information, and/or Or size information of pre-allocated physical storage resources, and/or media type information of pre-allocated physical storage resources.
确定单元502,用于确定所述物理存储资源分配请求信息是否包含有申请物理存储资源的介质类型的信息。The determining unit 502 is configured to determine whether the physical storage resource allocation request information includes information about a media type of the physical storage resource.
所述确定单元502,还用于在确定出所述物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息时,在预先获取的空间特征表中查找与所述介质信息匹配的存储介质类型。 The determining unit 502 is further configured to: when it is determined that the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource, search for the media information in the pre-acquired spatial feature table. The type of storage media.
其中,所述空间特征表中记录有所述存储设备中所包含的所有存储介质类型和对应的性能信息。All the storage medium types and corresponding performance information included in the storage device are recorded in the spatial feature table.
需要说明的是,空间特征表在连接存储设备时获取。空间特征表中记录的存储设备中的各个存储介质类型对应的性能信息可以是延迟性信息,能耗信息,存储的数据特征信息,持久化信息等信息。当然,还可以记录有其他性能信息,本发明对此不做限制。It should be noted that the spatial feature table is acquired when the storage device is connected. The performance information corresponding to each storage medium type in the storage device recorded in the spatial feature table may be information such as delay information, energy consumption information, stored data feature information, and persistent information. Of course, other performance information may also be recorded, which is not limited by the present invention.
具体的,确定单元502在确定出物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息时,说明申请物理存储资源的介质信息没有包括申请物理存储资源的介质类型,这时,可以根据物理存储资源分配请求信息包含的申请物理存储资源的介质信息查找空间特征表,从而可以在空间特征表中查找出与申请物理存储资源的介质信息相匹配的存储介质类型,进而将此相匹配的存储介质类型确定为应用程序的物理存储资源的介质类型。Specifically, when determining that the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource, the determining unit 502 indicates that the media information of the applied physical storage resource does not include the medium type of the physical storage resource. The space feature table may be searched according to the media information of the physical storage resource that is included in the physical storage resource allocation request information, so that the type of the storage medium matching the media information of the applied physical storage resource may be found in the spatial feature table, and then the The matching storage media type is determined as the media type of the application's physical storage resource.
需要说明的是,在申请物理存储资源的介质信息没有包括申请物理存储资源的介质类型信息时,所述介质信息中只包括了与需要存储的数据匹配的物理存储资源的性能信息。这些性能信息可以是数据的持久化性能信息,和/或延迟特征信息,和/或能耗特征信息,和/或需存储的数据的特征信息等。此时,处理装置可以根据此申请物理存储资源的介质信息,通过查找空间特征表,确定出满足申请物理存储资源的介质信息的存储介质,即为确定出申请物理存储资源的介质类型。It should be noted that, when the media information of the physical storage resource does not include the media type information of the physical storage resource, the media information includes only the performance information of the physical storage resource that matches the data that needs to be stored. The performance information may be data persistence performance information, and/or delay feature information, and/or power consumption feature information, and/or feature information of the data to be stored, and the like. At this time, the processing device may determine, according to the media information of the physical storage resource, the storage medium that satisfies the media information of the applied physical storage resource by searching the spatial feature table, that is, determining the media type for applying the physical storage resource.
需要说明的是,物理存储资源的性能信息还可是性能参数,本发明对此不做限制。It should be noted that the performance information of the physical storage resource may also be a performance parameter, which is not limited by the present invention.
进一步的,确定单元502在确定出信息后,若物理存储资源分配请求信息中没有包含此申请物理存储资源的介质类型的信息,则将确定出的申请物理存储资源的介质类型的信息添加至所述物理存储资源分配请求信息中。Further, after determining the information, if the physical storage resource allocation request information does not include the information of the media type of the physical storage resource, the determining unit 502 adds the determined media type information of the applied physical storage resource to the In the physical storage resource allocation request information.
分配单元503,用于根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源。The allocating unit 503 is configured to allocate an available virtual resource to the application according to the size information of the application physical storage resource.
所述分配单元503,还用于根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源。The allocating unit 503 is further configured to allocate, according to the physical storage resource allocation request information and the media type of the application physical storage resource, an available physical storage resource corresponding to the available virtual resource.
具体的,处理装置根据与其连接的存储设备不同,分配单元503 根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源的方法不同。Specifically, the processing device is different from the storage device connected thereto, and the allocating unit 503 The method for allocating the available physical storage resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the medium type of the application physical storage resource is different.
在其连接的存储设备可以根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型自行为所述应用程序分配与所述可用虚拟资源对应的可用物理资时,分配单元503只需将物理存储资源分配请求信息及所述申请物理存储资源的介质类型发至存储设备,由存储设备为应用程序分配与所述可用虚拟资源对应的可用物理存储资源。即为,分配单元503通过存储设备为应用程序分配与所述可用虚拟资源对应的可用物理存储资源。When the connected storage device can allocate the available physical resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, the allocation unit 503 only The physical storage resource allocation request information and the media type of the application physical storage resource are sent to the storage device, and the storage device allocates an available physical storage resource corresponding to the available virtual resource to the application. That is, the allocating unit 503 allocates an available physical storage resource corresponding to the available virtual resource to the application through the storage device.
在其连接的存储设备可以根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型不能为所述应用程序分配与所述可用虚拟资源对应的可用物理资时,分配单元503自身根据物理存储资源分配请求信息及所述申请物理存储资源的介质类型为应用程序分配与所述可用虚拟资源对应的可用物理存储资源。When the connected storage device can allocate the available physical resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, the allocating unit 503 itself Allocating an available physical storage resource corresponding to the available virtual resource to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource.
进一步的,所述分配单元503,还用于在所述确定单元502确定出所述物理存储资源分配请求信息中包含有申请物理存储资源的介质类型的信息,则直接根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源。根据所述物理存储资源分配请求信息为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源。Further, the allocating unit 503 is further configured to: when the determining unit 502 determines that the physical storage resource allocation request information includes information about a media type of applying for a physical storage resource, directly requesting the physical storage resource according to the application The size information allocates available virtual resources to the application. Allocating an available physical storage resource corresponding to the available virtual resource to the application according to the physical storage resource allocation request information.
其中,所述申请物理存储资源的介质信息包括:所述申请物理存储资源的介质类型的信息。The media information of the application physical storage resource includes: information about a media type of the physical storage resource.
进一步的,在所述存储设备包括:一体化存储设备UAS时,此时所述分配单元,用于根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源具体包括:Further, when the storage device includes the integrated storage device UAS, the allocating unit, configured to allocate the available virtual resources to the application according to the size information of the application physical storage resource, specifically includes:
所述分配单元503,具体用于将所述物理存储资源分配请求信息及所述应用程序的进程号发送至所述UAS,以使得所述UAS确定能否为所述应用程序分配可用物理存储资源。在接收到所述UAS发送的满足分配消息时,根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源。The allocating unit 503 is specifically configured to send the physical storage resource allocation request information and the process ID of the application to the UAS, so that the UAS determines whether the applicable physical storage resource can be allocated to the application. . Upon receiving the satisfaction of the distribution message sent by the UAS, the application allocates an available virtual resource according to the size information of the application physical storage resource.
其中,所述物理存储资源分配请求信息中还包括确定的所述申请物理存储资源的介质类型的信息。 The physical storage resource allocation request information further includes information about the determined medium type of the physical storage resource.
可选的,分配单元503可以将物理存储资源分配请求信息及应用程序的进程号封装至一个消息中,发送至UAS。Optionally, the allocating unit 503 may encapsulate the physical storage resource allocation request information and the process ID of the application into a message and send the message to the UAS.
需要说明的是,分配单元503也可将物理存储资源分配请求信息及应用程序的进程号分别发送指UAS,本发明对此不作限制。It should be noted that the allocation unit 503 may also send the physical storage resource allocation request information and the process number of the application to the UAS, which is not limited in the present invention.
所述分配单元503,还用于根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源具体包括:The allocating unit 503 is further configured to: allocate the available physical storage resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, and specifically include:
所述分配单元503,具体用于将所述可用虚拟资源的地址信息发送至所述UAS。向所述UAS发送访存请求消息,以便通过所述UAS根据所述物理存储资源分配请求信息为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源。The allocating unit 503 is specifically configured to send address information of the available virtual resource to the UAS. And sending, by the UAS, a memory access request message, to allocate, by the UAS, the available physical storage resource corresponding to the available virtual resource according to the physical storage resource allocation request information.
其中,所述访存请求消息中携带有所述应用程序的进程号。The access request message carries the process ID of the application.
进一步的,在存储设备中包含有多个UAS时,所述处理装置,如图6所示,还包括:Further, when the storage device includes multiple UASs, the processing device, as shown in FIG. 6, further includes:
第一更新单元504,用于根据为所述应用程序分配的可用虚拟资源的地址信息及所述UAS,更新第一映射表。The first update unit 504 is configured to update the first mapping table according to the address information of the available virtual resources allocated for the application and the UAS.
其中,所述第一映射表用于记录虚拟资源的地址信息与UAS间的映射关系。The first mapping table is used to record a mapping relationship between address information of the virtual resource and the UAS.
进一步的,所述处理装置,参考图6所示,还包括:Further, the processing device, as shown in FIG. 6, further includes:
处理单元505,用于在接收到所述UAS发送的不满足分配消息时,根据不满足分配消息,确定失败原因信息。并将所述失败原因信息发送至所述应用程序。或者,将所述物理存储资源分配请求信息及所述应用程序的进程号重新发送至所述UAS,以使得所述UAS重新确定能否为所述应用程序分配物理存储资源。The processing unit 505 is configured to determine, according to the unsatisfied allocation message, the failure reason information when receiving the dissatisfaction message sent by the UAS. And sending the failure reason information to the application. Alternatively, the physical storage resource allocation request information and the process ID of the application are resent to the UAS, so that the UAS re-determines whether the physical storage resource can be allocated to the application.
或者,在所述存储设备包括:混合内存时,如图7所示,所述处理装置,还包括:第二更新单元506。Alternatively, when the storage device includes: a hybrid memory, as shown in FIG. 7, the processing device further includes: a second update unit 506.
所述分配单元503,还用于根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源具体包括:The allocating unit 503 is further configured to: allocate the available physical storage resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, and specifically include:
所述分配单元503,具体用于触发所述第二更新单元506根据所述 可用虚拟资源的地址信息及所述申请物理存储资源的介质类型,所述申请物理存储资源的大小信息,所述申请物理存储资源的操作权限信息,更新虚拟管理区域VMA。The allocating unit 503 is specifically configured to trigger the second updating unit 506 according to the The address information of the available virtual resource and the media type of the physical storage resource, the size information of the application physical storage resource, the operation authority information of the application physical storage resource, and the virtual management area VMA are updated.
在所述应用程序访问所述可用虚拟资源发生中断时,根据所述可用虚拟资源的地址信息及所述第二更新单元506更新的所述VMA为所述应用程序分配可用物理存储资源。When the application accesses the available virtual resource, the available physical storage resource is allocated to the application according to the address information of the available virtual resource and the VMA updated by the second update unit 506.
其中,所述VMA用于记录虚拟资源的地址信息及其对应的存储相关信息。The VMA is configured to record address information of the virtual resource and corresponding storage related information.
所述第二更新单元506,用于根据所述可用虚拟资源的地址信息及所述申请物理存储资源的介质类型,所述申请物理存储资源的大小信息,所述申请物理存储资源的操作权限信息,更新虚拟管理区域VMA。The second update unit 506 is configured to: according to the address information of the available virtual resource and the media type of the application physical storage resource, the size information of the application physical storage resource, and the operation permission information of the application physical storage resource , update the virtual management area VMA.
所述第二更新单元506,还用于根据所述可用虚拟资源的地址信息及所述分配单元503分配的所述可用物理存储资源的地址信息更新第二映射表。The second update unit 506 is further configured to update the second mapping table according to the address information of the available virtual resource and the address information of the available physical storage resource allocated by the allocating unit 503.
其中,所述第二映射表用于记录为应用程序分配的可用虚拟资源得地址信息与可用物理存储资源的地址信息间的映射关系。The second mapping table is configured to record a mapping relationship between address information of available virtual resources allocated by the application and address information of available physical storage resources.
进一步的,在所述物理存储资源分配请求信息中还包括缓存信息时,所述第二更新单元506,具体用于根据所述可用虚拟资源的地址信息及所述申请物理存储资源的介质类型,所述申请物理存储资源的大小信息,所述申请物理存储资源的操作权限信息及所述缓存信息,更新所述VMA。Further, when the physical storage resource allocation request information further includes the cache information, the second update unit 506 is specifically configured to: according to the address information of the available virtual resource and the media type of the application physical storage resource, And the size information of the application physical storage resource, the operation authority information of the application physical storage resource, and the cache information, and the VMA is updated.
此时,所述分配单元503,具体用于在所述应用程序访问所述可用虚拟资源发生中断时,根据所述可用虚拟资源的地址信息对应的所述VMA的表项记录的缓存信息为所述应用程序分配可用缓存。根据所述可用虚拟资源的地址信息对应的所述VMA的表项记录的所述申请物理存储资源的大小信息,所述申请物理存储资源的操作权限信息,及所述申请物理存储资源的介质类型为所述应用程序分配可用物理存储资源。At this time, the allocating unit 503 is specifically configured to: when the application accesses the available virtual resource, the cache information recorded by the entry of the VMA corresponding to the address information of the available virtual resource is The application allocates an available cache. The size information of the application physical storage resource recorded by the entry of the VMA corresponding to the address information of the available virtual resource, the operation authority information of the application physical storage resource, and the media type of the physical storage resource Allocate available physical storage resources for the application.
所述第二更新单元506,具体用于根据为所述应用程序分配的可用虚拟资源的地址信息,为所述应用程序分配的可用缓存的地址信息及所述为应用程序分配的可用物理存储资源的地址信息,更新所述第二 映射表。The second updating unit 506 is specifically configured to: according to the address information of the available virtual resources allocated for the application, the address information of the available cache allocated to the application, and the available physical storage resources allocated for the application. Address information, update the second Mapping table.
本发明实施例提供了一种处理装置,通过获取接口接收应用程序发送的物理存储资源分配请求信息,其中,物理存储资源分配请求信息中包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息;确定物理存储资源分配请求信息中是否包含有所申请物理存储资源的介质类型的信息。在定物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息时,则在预先获取的空间特征表中查找与所述介质信息匹配的存储介质类型,从而为此应用程序分配可用虚拟资源及其对应的可用物理存储资源。这样,处理装置接收的物理存储资源分配请求信息中,在没有包含申请物理存储资源的介质类型的信息时,可以根据其携带的申请物理存储资源的介质信息查找空间特征表,自动确定出应用程序所需的申请物理存储资源的介质类型,进而可以根据此介质类型为此应用程序的数据分配适合的物理存储资源,从而实现了在无需用户了解每种存储介质的性能的情况下,自动为应用程序的数据分配适合的可用资源,提高了应用程序的性能,并提高了用户体验。The embodiment of the present invention provides a processing device, which receives the physical storage resource allocation request information sent by the application by the acquiring interface, where the physical storage resource allocation request information includes the size information of the applied physical storage resource, and the operation of applying for the physical storage resource. The permission information and the medium information of the application physical storage resource; determining whether the physical storage resource allocation request information includes the information of the medium type of the applied physical storage resource. When the information of the media type of the applied physical storage resource is not included in the fixed physical storage resource allocation request information, the storage medium type matching the media information is searched in the pre-acquired spatial feature table, thereby allocating the application for the application. Available virtual resources and their corresponding available physical storage resources. In this way, the physical storage resource allocation request information received by the processing device can automatically determine the application according to the media information of the physical storage resource that is applied to the physical storage resource when the information of the media type of the physical storage resource is not included. The type of media required to apply for a physical storage resource, which in turn can allocate appropriate physical storage resources for the data of the application according to the media type, thereby automatically applying the application without requiring the user to understand the performance of each storage medium. The program's data is allocated to the available resources, which improves the performance of the application and improves the user experience.
本发明实施例提供了一种一体化存储设备UAS,如图8所示,包括:An embodiment of the present invention provides an integrated storage device UAS, as shown in FIG.
接收单元801,用于接收处理装置发送的物理存储资源分配请求信息及应用程序的进程号。The receiving unit 801 is configured to receive physical storage resource allocation request information sent by the processing device and a process ID of the application.
其中,所述物理存储资源分配请求信息中包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息。The physical storage resource allocation request information includes information about the size of the physical storage resource, the operation authority information of the physical storage resource, and the medium type of the physical storage resource.
进一步的,所述物理存储资源分配请求信息中还携带有缓存信息。Further, the physical storage resource allocation request information further carries cache information.
进一步的,所述物理存储资源分配请求信息中还包括预分配的元数据类型信息、和/或预分配的缓存数据的优先级信息、和/或预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息。Further, the physical storage resource allocation request information further includes pre-allocated metadata type information, and/or pre-allocated cache data priority information, and/or pre-allocated physical storage resource priority information, and/or Or size information of pre-allocated physical storage resources, and/or media type information of pre-allocated physical storage resources.
确定单元802,用于确定能否为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源。The determining unit 802 is configured to determine whether the applicable physical storage resource that matches the physical storage resource allocation request information is allocated to the application.
具体的,确定单元802在接收单元801接收到物理存储资源分配请求信息后,根据其携带的申请物理存储资源的介质类型,确定其需要分配的物理存储资源的类型,并根据申请物理存储资源的大小信息, 确定单元802确定此类型的空闲物理存储资源是否能够满足此应用程序所需的物理存储资源。若满足,则确定可以为应用程序分配此类型的物理存储资源,即为可以为应用程序分配与物理存储资源分配请求信息匹配的可用物理存储资源。若不满足,则确定不能为应用程序分配此类型的物理存储资源,即为不能为应用程序分配与物理存储资源分配请求信息匹配的可用物理存储资源。Specifically, after receiving the physical storage resource allocation request information, the determining unit 802 determines the type of the physical storage resource that needs to be allocated according to the media type of the physical storage resource that is carried by the receiving unit 801, and determines the physical storage resource according to the application. Size information, Determination unit 802 determines if this type of free physical storage resource is capable of meeting the physical storage resources required by this application. If so, it is determined that the application can be assigned this type of physical storage resource, that is, the application can be allocated an available physical storage resource that matches the physical storage resource allocation request information. If not, it is determined that the application cannot be assigned this type of physical storage resource, that is, the application cannot be allocated an available physical storage resource that matches the physical storage resource allocation request information.
发送单元803,用于在所述确定单元802确定为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源时,向所述处理装置发送满足分配消息。The sending unit 803 is configured to send, when the determining unit 802 determines, that the application allocates available physical storage resources that match the physical storage resource allocation request information, to the processing device.
所述接收单元801,还用于接收所述处理装置发送的可用虚拟资源的地址信息。The receiving unit 801 is further configured to receive address information of available virtual resources sent by the processing device.
所述接收单元801,还用于接收所述处理装置发送的访存请求消息。The receiving unit 801 is further configured to receive a memory access request message sent by the processing device.
其中,所述访存请求消息中携带有应用程序的进程号。The access request message carries the process ID of the application.
分配单元804,用于根据所述应用程序的进程号对应的所述申请物理存储资源分配请求信息,为所述应用程序分配与所述物理存储资源分配请求信息所包括的所述申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息匹配的可用物理存储资源。The allocating unit 804 is configured to allocate the application physical storage resource included in the physical storage resource allocation request information to the application according to the application physical storage resource allocation request information corresponding to the process ID of the application. The size information, the operation permission information of the application physical storage resource, and the available physical storage resource matching the information of the medium type of the physical storage resource.
更新单元805,用于根据所述分配单元804为所述应用程序分配的所述可用物理存储资源的地址信息更新地址映射表。The updating unit 805 is configured to update the address mapping table according to the address information of the available physical storage resource allocated by the allocating unit 804 for the application.
其中,所述地址映射表用于记录所述可用虚拟资源的地址信息与为应用程序分配的可用物理存储资源的地址信息间的映射关系。The address mapping table is configured to record a mapping relationship between the address information of the available virtual resource and the address information of the available physical storage resource allocated for the application.
进一步的,在所述物理存储资源分配请求信息中还携带有缓存信息时,所述分配单元804,还用于根据所述缓存信息,为所述应用程序分配可用缓存。Further, when the physical storage resource allocation request information further carries the cache information, the allocating unit 804 is further configured to allocate an available cache to the application according to the cache information.
所述更新单元805,还用于根据所述可用缓存的地址信息更新地址映射表。The updating unit 805 is further configured to update the address mapping table according to the address information of the available cache.
其中,所述地址映射表用于通过可用缓存的地址信息记录所述可用虚拟资源的地址信息与所述可用物理存储资源的地址信息间的映射关系。 The address mapping table is configured to record, by using the cached address information, a mapping relationship between the address information of the available virtual resource and the address information of the available physical storage resource.
进一步的,所述分配单元804,还用于根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配元数据。Further, the allocating unit 804 is further configured to allocate metadata to the application according to the physical storage resource allocation request information and the process ID of the application.
所述分配单元804,还用于根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源。The allocating unit 804 is further configured to pre-allocate the available physical storage resources for the application according to the physical storage resource allocation request information and the process ID of the application.
此时,所述更新单元805,还用于根据所述分配单元804预先为所述应用程序分配的所述可用物理存储资源的地址信息更新所述地址映射表。At this time, the updating unit 805 is further configured to update the address mapping table according to the address information of the available physical storage resource allocated by the allocation unit 804 in advance for the application.
或者,所述分配单元,还用于根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配元数据。Alternatively, the allocating unit is further configured to allocate metadata to the application according to the physical storage resource allocation request information and the process ID of the application.
所述分配单元804,还用于根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用缓存。The allocating unit 804 is further configured to allocate an available cache to the application according to the physical storage resource allocation request information and the process ID of the application.
此时,所述更新单元805,还用于根据所述分配单元804预先为所述应用程序分配的所述可用缓存的地址信息,更新所述地址映射表。At this time, the updating unit 805 is further configured to update the address mapping table according to the address information of the available cache allocated by the allocation unit 804 in advance for the application.
具体的,所述分配单元804,具体用于在所述物理存储资源分配请求信息包含有所述预分配的元数据类型信息时,根据所述预分配的元数据类型信息及所述应用程序的进程号预先为所述应用程序分配元数据。Specifically, the allocating unit 804 is specifically configured to: when the physical storage resource allocation request information includes the pre-allocated metadata type information, according to the pre-allocated metadata type information and the application The process number pre-allocates metadata for the application.
在所述物理存储资源分配请求信息包含有所述预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息时,根据所述预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源。When the physical storage resource allocation request information includes the pre-allocated physical storage resource priority information, and/or size information of a pre-allocated physical storage resource, and/or media type information of a pre-allocated physical storage resource Determining, according to the pre-allocated physical storage resource priority information, and/or pre-allocated physical storage resource size information, and/or pre-allocated physical storage resource media type information and the process number of the application The application allocates available physical storage resources.
在所述物理存储资源分配请求信息包含有所述预分配的缓存数据的优先级信息时,根据所述预分配的缓存数据的优先级信息及所述应用程序的进程号预先为所述应用程序分配可用缓存。When the physical storage resource allocation request information includes the priority information of the pre-allocated cache data, according to the priority information of the pre-allocated cache data and the process number of the application, the application is previously Allocate an available cache.
进一步的,所述发送单元803,还用于在所述确定单元802确定不能为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源物理存储资源时,向所述处理装置发送不满足分配消息。Further, the sending unit 803 is further configured to: when the determining unit 802 determines that the applicable physical storage resource physical storage resource that cannot match the physical storage resource allocation request information is not allocated to the application, The device sends a message that does not satisfy the assignment.
本发明实施例提供了一种UAS,通过处理装置接收发送的物理存储资源分配请求信息及应用程序的进程号,确定能否为所述应用程序可 用与物理存储资源分配请求信息相匹配的分配物理存储资源,若确定为应用程序分配与物理存储资源分配请求信息相匹配的分配物理存储资源,则将处理装置返回满足分配消息。接收处理装置发送的可用虚拟资源的地址信息。在接收处理装置发送的携带了进程号的访存请求消息时,根据此进程号对应的物理存储资源分配请求信息,为应用程序分配与所述物理存储资源分配请求信息所包括的所述申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型相匹配的可用物理存储资源,并根据所述可用物理存储资源的地址信息更新地址映射表。这样,UAS可以根据应用程序的需要为应用程序分配最适合的可用物理存储资源,从而实现了在无需用户了解每种存储介质的性能的情况下,自动为应用程序的数据分配适合的可用资源,提高了应用程序的性能,并提高了用户体验。An embodiment of the present invention provides a UAS, which receives, by using a processing device, a physical storage resource allocation request message and a process ID of an application, to determine whether the application can be The allocated physical storage resource is matched with the physical storage resource allocation request information, and if it is determined that the application allocates the allocated physical storage resource that matches the physical storage resource allocation request information, the processing device returns to satisfy the allocation message. Receiving address information of available virtual resources sent by the processing device. When receiving the access request message carrying the process number sent by the processing device, assigning, to the application, the application physics included in the physical storage resource allocation request information according to the physical storage resource allocation request information corresponding to the process number The size information of the storage resource, the operation authority information of the application physical storage resource, and the available physical storage resource matching the media type of the physical storage resource, and the address mapping table is updated according to the address information of the available physical storage resource. In this way, the UAS can allocate the most suitable available physical storage resources to the application according to the needs of the application, thereby automatically allocating suitable resources for the application data without requiring the user to understand the performance of each storage medium. Improves application performance and improves user experience.
本发明实施例提供了一种处理装置,如图9所示,包括:处理器901,存储器902,通信接口903,和总线904,发射器905,其中,所述处理器901、所述存储器902、所述通信接口903和发射器905通过所述总线904通信。The embodiment of the present invention provides a processing device, as shown in FIG. 9, including: a processor 901, a memory 902, a communication interface 903, and a bus 904, a transmitter 905, wherein the processor 901 and the memory 902 The communication interface 903 and the transmitter 905 communicate via the bus 904.
所述存储器902,用于存放程序。The memory 902 is configured to store a program.
所述处理器901,用于执行所述存储器存储的执行指令。The processor 901 is configured to execute an execution instruction of the memory storage.
所述通信接口903,接收应用程序发送的物理存储资源分配请求信息。The communication interface 903 receives physical storage resource allocation request information sent by an application.
其中,所述物理存储资源分配请求信息包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息。所述介质信息中包括与需要存储的数据匹配的物理存储资源的性能信息。The physical storage resource allocation request information includes size information of the applied physical storage resource, operation permission information for applying the physical storage resource, and medium information for applying the physical storage resource. The media information includes performance information of physical storage resources that match data that needs to be stored.
进一步的,所述物理存储资源分配请求信息中还包括缓存信息。Further, the physical storage resource allocation request information further includes cache information.
进一步的,所述物理存储资源分配请求信息中还包括预分配的元数据类型信息、和/或预分配的缓存数据的优先级信息、和/或预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息。Further, the physical storage resource allocation request information further includes pre-allocated metadata type information, and/or pre-allocated cache data priority information, and/or pre-allocated physical storage resource priority information, and/or Or size information of pre-allocated physical storage resources, and/or media type information of pre-allocated physical storage resources.
当所述处理装置运行时,处理器901运行程序,以执行以下指令:When the processing device is running, the processor 901 runs a program to execute the following instructions:
处理器901,用于确定所述物理存储资源分配请求信息是否包含有申请物理存储资源的介质类型的信息。 The processor 901 is configured to determine whether the physical storage resource allocation request information includes information about a media type of the physical storage resource.
处理器901,还用于在确定出所述物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息时,在预先获取的空间特征表中查找与所述介质信息匹配的存储介质类型。The processor 901 is further configured to: when determining that the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource, searching for the storage that matches the media information in the pre-acquired spatial feature table. Media type.
其中,所述空间特征表中记录有所述存储设备中所包含的所有存储介质类型和对应的性能信息。All the storage medium types and corresponding performance information included in the storage device are recorded in the spatial feature table.
需要说明的是,空间特征表在连接存储设备时获取。空间特征表中记录的存储设备中的各个存储介质类型对应的性能信息可以是延迟性信息,能耗信息,存储的数据特征信息,持久化信息等信息。当然,还可以记录有其他性能信息,本发明对此不做限制。It should be noted that the spatial feature table is acquired when the storage device is connected. The performance information corresponding to each storage medium type in the storage device recorded in the spatial feature table may be information such as delay information, energy consumption information, stored data feature information, and persistent information. Of course, other performance information may also be recorded, which is not limited by the present invention.
具体的,处理器901在确定出物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息时,说明申请物理存储资源的介质信息没有包括申请物理存储资源的介质类型,这时,可以根据物理存储资源分配请求信息包含的申请物理存储资源的介质信息查找空间特征表,从而可以在空间特征表中查找出与申请物理存储资源的介质信息相匹配的存储介质类型,进而将此相匹配的存储介质类型确定为应用程序的物理存储资源的介质类型。Specifically, the processor 901 determines that the media information of the applied physical storage resource does not include the medium type of the physical storage resource when the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource. The space feature table may be searched according to the media information of the physical storage resource that is included in the physical storage resource allocation request information, so that the type of the storage medium matching the media information of the applied physical storage resource may be found in the spatial feature table, and then the The matching storage media type is determined as the media type of the application's physical storage resource.
需要说明的是,在申请物理存储资源的介质信息没有包括申请物理存储资源的介质类型信息时,所述介质信息中只包括了与需要存储的数据匹配的物理存储资源的性能信息。这些性能信息可以是数据的持久化性能信息,和/或延迟特征信息,和/或能耗特征信息,和/或需存储的数据的特征信息等。此时,处理装置可以根据此申请物理存储资源的介质信息,通过查找空间特征表,确定出满足申请物理存储资源的介质信息的存储介质,即为确定出申请物理存储资源的介质类型。It should be noted that, when the media information of the physical storage resource does not include the media type information of the physical storage resource, the media information includes only the performance information of the physical storage resource that matches the data that needs to be stored. The performance information may be data persistence performance information, and/or delay feature information, and/or power consumption feature information, and/or feature information of the data to be stored, and the like. At this time, the processing device may determine, according to the media information of the physical storage resource, the storage medium that satisfies the media information of the applied physical storage resource by searching the spatial feature table, that is, determining the media type for applying the physical storage resource.
需要说明的是,物理存储资源的性能信息还可是性能参数,本发明对此不做限制。It should be noted that the performance information of the physical storage resource may also be a performance parameter, which is not limited by the present invention.
进一步的,处理器901在确定出信息后,若物理存储资源分配请求信息中没有包含此申请物理存储资源的介质类型的信息,则将此申请物理存储资源的介质类型的信息添加至所述物理存储资源分配请求信息中。Further, after the information is determined by the processor 901, if the physical storage resource allocation request information does not include the information of the media type of the physical storage resource, the information of the media type of the physical storage resource is added to the physical Storage resource allocation request information.
处理器901,还用于根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源。 The processor 901 is further configured to allocate the available virtual resources to the application according to the size information of the application physical storage resource.
处理器901,还用于根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源。The processor 901 is further configured to allocate, according to the physical storage resource allocation request information and the media type of the application physical storage resource, an available physical storage resource corresponding to the available virtual resource.
具体的,处理器901根据与其连接的存储设备不同,根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源的方法不同。Specifically, the processor 901 allocates the available physical storage corresponding to the available virtual resource to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, according to the storage device connected thereto. The method of resources is different.
在其连接的存储设备可以根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型自行为所述应用程序分配与所述可用虚拟资源对应的可用物理资时,处理器901只需将物理存储资源分配请求信息及所述申请物理存储资源的介质类型发至存储设备,由存储设备为应用程序分配与所述可用虚拟资源对应的可用物理存储资源。即为,处理器901通过存储设备为应用程序分配与所述可用虚拟资源对应的可用物理存储资源。When the connected storage device can allocate the available physical resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the physical storage resource, the processor 901 only The physical storage resource allocation request information and the media type of the application physical storage resource are sent to the storage device, and the storage device allocates an available physical storage resource corresponding to the available virtual resource to the application. That is, the processor 901 allocates an available physical storage resource corresponding to the available virtual resource to the application through the storage device.
在其连接的存储设备可以根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型不能为所述应用程序分配与所述可用虚拟资源对应的可用物理资时,处理器901自身根据物理存储资源分配请求信息及所述申请物理存储资源的介质类型为应用程序分配与所述可用虚拟资源对应的可用物理存储资源。When the connected storage device can allocate the available physical resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, the processor 901 itself Allocating an available physical storage resource corresponding to the available virtual resource to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource.
进一步的,处理器901,还用于确定出所述物理存储资源分配请求信息中包含有申请物理存储资源的介质类型的信息,则直接根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源。根据所述物理存储资源分配请求信息为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源。Further, the processor 901 is further configured to determine that the physical storage resource allocation request information includes information about a media type of the physical storage resource, and directly, according to the size information of the applied physical storage resource, the application Allocate available virtual resources. Allocating an available physical storage resource corresponding to the available virtual resource to the application according to the physical storage resource allocation request information.
其中,所述申请物理存储资源的介质信息包括:所述申请物理存储资源的介质类型的信息。The media information of the application physical storage resource includes: information about a media type of the physical storage resource.
需要说明的是,处理装置901通过总线904与至少一个存储设备连接,所述存储设备中包含有至少两种不同类型的存储介质。It should be noted that the processing device 901 is connected to at least one storage device through a bus 904, and the storage device includes at least two different types of storage media.
在所述存储设备中包括:一体化存储设备UAS时,所述处理器901,还用于触发发射器905将所述物理存储资源分配请求信息及所述应用程序的进程号发送至所述UAS,以使得所述UAS确定能否为所述应用程序分配可用物理存储资源。 When the storage device includes: an integrated storage device UAS, the processor 901 is further configured to trigger the transmitter 905 to send the physical storage resource allocation request information and a process ID of the application to the UAS. So that the UAS determines whether the application can be allocated available physical storage resources.
发射器905,用于将所述物理存储资源分配请求信息及所述应用程序的进程号发送至所述UAS。The transmitter 905 is configured to send the physical storage resource allocation request information and a process ID of the application to the UAS.
其中,所述物理存储资源分配请求信息中还包括确定的申请物理存储资源的介质类型的信息。The physical storage resource allocation request information further includes information about the determined media type of the physical storage resource.
可选的,发射器905可以将物理存储资源分配请求信息及应用程序的进程号封装指一个消息中,发送至UAS。Optionally, the transmitter 905 may encapsulate the physical storage resource allocation request information and the process number of the application into a message and send the message to the UAS.
需要说明的是,发射器905也可将物理存储资源分配请求信息及应用程序的进程号分别发送指UAS,本发明对此不作限制。It should be noted that the transmitter 905 may also send the physical storage resource allocation request information and the process number of the application to the UAS, which is not limited in the present invention.
所述处理器901,具体用于在接收到所述UAS发送的满足分配消息时,根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源。The processor 901 is specifically configured to allocate an available virtual resource to the application according to the size information of the application physical storage resource when receiving the satisfaction of the distribution message sent by the UAS.
进一步的,处理器901,还用于根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源具体包括:Further, the processor 901 is further configured to allocate, according to the physical storage resource allocation request information and the media type of the application physical storage resource, an available physical storage resource corresponding to the available virtual resource for the application, including :
所述处理器901,具体用于触发发射器905将所述可用虚拟资源的地址信息发送至所述UAS。向所述UAS发送访存请求消息,以便通过所述UAS根据所述物理存储资源分配请求信息为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源。The processor 901 is specifically configured to trigger the transmitter 905 to send address information of the available virtual resource to the UAS. And sending, by the UAS, a memory access request message, to allocate, by the UAS, the available physical storage resource corresponding to the available virtual resource according to the physical storage resource allocation request information.
此时,所述发射器905,还用于将所述可用虚拟资源的地址信息发送至所述UAS。At this time, the transmitter 905 is further configured to send address information of the available virtual resource to the UAS.
所述发射器905,还用于向所述UAS发送访存请求消息。The transmitter 905 is further configured to send a memory access request message to the UAS.
进一步的,在存储设备中包含有多个UAS时,所述处理器901,还用于根据为所述应用程序分配的可用虚拟资源的地址信息及所述UAS,更新第一映射表。Further, when the storage device includes multiple UASs, the processor 901 is further configured to update the first mapping table according to the address information of the available virtual resources allocated to the application and the UAS.
其中,所述第一映射表用于记录虚拟资源的地址信息与UAS间的映射关系。The first mapping table is used to record a mapping relationship between address information of the virtual resource and the UAS.
进一步的,所述处理器901,还用于在接收到所述UAS发送的不满足分配消息时,根据不满足分配消息,确定失败原因信息。触发发射器905将所述失败原因信息发送至所述应用程序。或者,触发发射器905将所述物理存储资源分配请求信息及所述应用程序的进程号重新发送至所述UAS,以使得所述UAS重新确定能否为所述应用程序分配物 理存储资源。Further, the processor 901 is further configured to: when receiving the unsatisfied allocation message sent by the UAS, determine the failure reason information according to the unsatisfied allocation message. The trigger transmitter 905 transmits the failure cause information to the application. Alternatively, the trigger transmitter 905 resends the physical storage resource allocation request information and the process number of the application to the UAS, so that the UAS re-determines whether the application can be allocated Manage storage resources.
此时,发射器905,还用于将所述失败原因信息发送至所述应用程序。或者,触发发射器905将所述物理存储资源分配请求信息及所述应用程序的进程号重新发送至所述UAS。At this time, the transmitter 905 is further configured to send the failure reason information to the application. Alternatively, the trigger transmitter 905 resends the physical storage resource allocation request information and the process number of the application to the UAS.
或者,在所述存储设备包括:混合内存时,所述处理器901,具体用于根据所述可用虚拟资源的地址信息及所述申请物理存储资源的介质类型,所述申请物理存储资源的大小信息,所述申请物理存储资源的操作权限信息,更新虚拟管理区域VMA。在所述应用程序访问所述可用虚拟资源发生中断时,根据所述可用虚拟资源的地址信息及所述VMA为所述应用程序分配可用物理存储资源,并更新第二映射表。Or the processor 901 is configured to: according to the address information of the available virtual resource and the media type of the application physical storage resource, the size of the applied physical storage resource, when the storage device includes: The information, the operation authority information of the application physical storage resource, updates the virtual management area VMA. When the application accesses the available virtual resource to be interrupted, the available physical storage resource is allocated to the application according to the address information of the available virtual resource and the VMA, and the second mapping table is updated.
其中,所述VMA用于记录虚拟资源的地址信息及其对应的存储相关信息。所述第二映射表用于记录为应用程序分配的可用虚拟资源得地址信息与可用物理存储资源的地址信息间的映射关系。The VMA is configured to record address information of the virtual resource and corresponding storage related information. The second mapping table is configured to record a mapping relationship between address information of available virtual resources allocated to an application and address information of available physical storage resources.
进一步的,在所述物理存储资源分配请求信息中还包括缓存信息时,所述处理器901,具体用于根据所述可用虚拟资源的地址信息及所述申请物理存储资源的介质类型,所述申请物理存储资源的大小信息,所述申请物理存储资源的操作权限信息及所述缓存信息,更新所述VMA。Further, when the physical storage resource allocation request information further includes the cache information, the processor 901 is specifically configured to: according to the address information of the available virtual resource and the media type of the application physical storage resource, And applying the size information of the physical storage resource, the operation authority information of the application physical storage resource, and the cache information, and updating the VMA.
所述处理器901,具体用于在所述应用程序访问所述可用虚拟资源发生中断时,根据所述可用虚拟资源的地址信息对应的所述VMA的表项记录的缓存信息为所述应用程序分配可用缓存。根据所述可用虚拟资源的地址信息对应的所述VMA的表项记录的所述申请物理存储资源的大小信息,所述申请物理存储资源的操作权限信息,及所述申请物理存储资源的介质类型为所述应用程序分配可用物理存储资源。The processor 901 is specifically configured to: when the application accesses the available virtual resource, the cache information recorded by the entry of the VMA corresponding to the address information of the available virtual resource is the application Allocate an available cache. The size information of the application physical storage resource recorded by the entry of the VMA corresponding to the address information of the available virtual resource, the operation authority information of the application physical storage resource, and the media type of the physical storage resource Allocate available physical storage resources for the application.
所述处理器901,具体用于根据为所述应用程序分配的可用虚拟资源的地址信息,为所述应用程序分配的可用缓存的地址信息及所述为应用程序分配的可用物理存储资源的地址信息,更新所述第二映射表。The processor 901 is specifically configured to: according to address information of an available virtual resource allocated for the application, address information of an available cache allocated to the application, and an address of the available physical storage resource allocated for the application Information, updating the second mapping table.
本发明实施例提供了一种处理装置,通过获取接口接收应用程序发送的物理存储资源分配请求信息,其中,物理存储资源分配请求信息中包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息;确定物理存储资源分配请求 信息中是否包含有所申请物理存储资源的介质类型的信息。在定物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息时,则在预先获取的空间特征表中查找与所述介质信息匹配的存储介质类型,从而为此应用程序分配可用虚拟资源及其对应的可用物理存储资源。这样,处理装置接收的物理存储资源分配请求信息中,在没有包含申请物理存储资源的介质类型的信息时,可以根据其携带的申请物理存储资源的介质信息查找空间特征表,自动确定出应用程序所需的申请物理存储资源的介质类型,进而可以根据此介质类型为此应用程序的数据分配适合的物理存储资源,从而实现了在无需用户了解每种存储介质的性能的情况下,自动为应用程序的数据分配适合的可用资源,提高了应用程序的性能,并提高了用户体验。The embodiment of the present invention provides a processing device, which receives the physical storage resource allocation request information sent by the application by the acquiring interface, where the physical storage resource allocation request information includes the size information of the applied physical storage resource, and the operation of applying for the physical storage resource. Permission information and media information for applying physical storage resources; determining physical storage resource allocation request Whether the information contains information about the type of media on which the physical storage resource is applied. When the information of the media type of the applied physical storage resource is not included in the fixed physical storage resource allocation request information, the storage medium type matching the media information is searched in the pre-acquired spatial feature table, thereby allocating the application for the application. Available virtual resources and their corresponding available physical storage resources. In this way, the physical storage resource allocation request information received by the processing device can automatically determine the application according to the media information of the physical storage resource that is applied to the physical storage resource when the information of the media type of the physical storage resource is not included. The type of media required to apply for a physical storage resource, which in turn can allocate appropriate physical storage resources for the data of the application according to the media type, thereby automatically applying the application without requiring the user to understand the performance of each storage medium. The program's data is allocated to the available resources, which improves the performance of the application and improves the user experience.
本发明实施例提供了一种一体化存储设备UAS,如图10所示,包括:处理器1001,存储器1002,通信接口1003,总线1004和发射器1005,其中,所述处理器1001、所述存储器1002、所述通信接口1003和发射器1005通过所述总线1004通信。An embodiment of the present invention provides an integrated storage device UAS, as shown in FIG. 10, including: a processor 1001, a memory 1002, a communication interface 1003, a bus 1004, and a transmitter 1005, wherein the processor 1001, The memory 1002, the communication interface 1003, and the transmitter 1005 communicate via the bus 1004.
所述存储器1002,用于存储程序及数据。The memory 1002 is configured to store programs and data.
其中,所述存储器包含至少两种不同类型的存储介质。Wherein the memory comprises at least two different types of storage media.
所述通信接口1003,用于接收处理装置发送的物理存储资源分配请求信息及应用程序的进程号。The communication interface 1003 is configured to receive physical storage resource allocation request information sent by the processing device and a process ID of the application.
其中,所述物理存储资源分配请求信息中包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息。The physical storage resource allocation request information includes information about the size of the physical storage resource, the operation authority information of the physical storage resource, and the medium type of the physical storage resource.
进一步的,所述物理存储资源分配请求信息中还携带有缓存信息。Further, the physical storage resource allocation request information further carries cache information.
进一步的,所述物理存储资源分配请求信息中还包括预分配的元数据类型信息、和/或预分配的缓存数据的优先级信息、和/或预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息。Further, the physical storage resource allocation request information further includes pre-allocated metadata type information, and/or pre-allocated cache data priority information, and/or pre-allocated physical storage resource priority information, and/or Or size information of pre-allocated physical storage resources, and/or media type information of pre-allocated physical storage resources.
所述处理器1001,用于确定能否为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源。The processor 1001 is configured to determine whether an available physical storage resource that matches the physical storage resource allocation request information is allocated to the application.
具体的,所述处理器1001,还用于在通信接口1003接收到物理存储资源分配请求信息后,根据其携带的申请物理存储资源的介质类型,确定其需要分配的物理存储资源的类型,并根据申请物理存储资源的 大小信息,处理器1001确定此类型的空闲的物理存储资源是否能够满足需要为应用程序所需的物理存储资源。若满足,则确定可以为应用程序分配此类型的物理存储资源,即为可以为应用程序分配与物理存储资源分配请求信息匹配的可用物理存储资源。若不满足,则确定不能为应用程序分配此类型的物理存储资源,即为不能为应用程序分配与物理存储资源分配请求信息匹配的可用物理存储资源。Specifically, the processor 1001 is further configured to: after receiving the physical storage resource allocation request information, the communication interface 1003 determines the type of the physical storage resource that needs to be allocated according to the media type of the physical storage resource that is carried by the communication interface 1003, and According to the application for physical storage resources Based on the size information, the processor 1001 determines whether this type of free physical storage resource can satisfy the physical storage resources needed for the application. If so, it is determined that the application can be assigned this type of physical storage resource, that is, the application can be allocated an available physical storage resource that matches the physical storage resource allocation request information. If not, it is determined that the application cannot be assigned this type of physical storage resource, that is, the application cannot be allocated an available physical storage resource that matches the physical storage resource allocation request information.
所述处理器1001,还用于在确定为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源时,触发所述发射器1005向所述处理装置发送满足分配消息。The processor 1001 is further configured to: when determining to allocate, to the application, an available physical storage resource that matches the physical storage resource allocation request information, trigger the transmitter 1005 to send an satisfaction fulfillment message to the processing device.
发射器1005,用于在所述处理器1001确定为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源时,向所述处理装置发送满足分配消息。The transmitter 1005 is configured to send, when the processor 1001 determines that the application allocates available physical storage resources that match the physical storage resource allocation request information, to the processing device.
所述通信接口1003,还用于接收所述处理装置发送的可用虚拟资源的地址信息。The communication interface 1003 is further configured to receive address information of available virtual resources sent by the processing device.
所述通信接口1003,还用于接收所述处理装置发送的访存请求消息。The communication interface 1003 is further configured to receive a memory access request message sent by the processing device.
其中,所述访存请求消息中携带有应用程序的进程号。The access request message carries the process ID of the application.
所述处理器1001,还用于根据所述应用程序的进程号对应的所述申请物理存储资源分配请求信息,为所述应用程序分配与所述物理存储资源分配请求信息所包括的所述申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息匹配的可用物理存储资源。The processor 1001 is further configured to allocate the application included in the physical storage resource allocation request information to the application according to the application physical storage resource allocation request information corresponding to the process ID of the application. The size information of the physical storage resource, the operation authority information of the application physical storage resource, and the available physical storage resource matching the information of the medium type of the physical storage resource.
所述处理器1001,还用于根据所述可用物理存储资源的地址信息更新地址映射表。The processor 1001 is further configured to update an address mapping table according to address information of the available physical storage resource.
其中,所述地址映射表用于记录所述可用虚拟资源的地址信息与为应用程序分配的可用物理存储资源的地址信息间的映射关系。The address mapping table is configured to record a mapping relationship between the address information of the available virtual resource and the address information of the available physical storage resource allocated for the application.
进一步的,在所述物理存储资源分配请求信息中还携带有缓存信息时,所述处理器1001,还用于根据所述缓存信息,为所述应用程序分配可用缓存。Further, when the physical storage resource allocation request information further includes the cache information, the processor 1001 is further configured to allocate an available cache to the application according to the cache information.
所述处理器1001,还用于根据所述可用缓存的地址信息更新地址映射表。 The processor 1001 is further configured to update an address mapping table according to the address information of the available cache.
其中,所述地址映射表用于通过可用缓存的地址信息记录所述可用虚拟资源的地址信息与所述可用物理存储资源的地址信息间的映射关系。The address mapping table is configured to record, by using the cached address information, a mapping relationship between the address information of the available virtual resource and the address information of the available physical storage resource.
进一步的,所述处理器1001,还用于根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配元数据。Further, the processor 1001 is further configured to pre-allocate metadata for the application according to the physical storage resource allocation request information and the process ID of the application.
所述处理器1001,还用于根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源,并根据所述可用物理存储资源的地址信息更新所述地址映射表。The processor 1001 is further configured to allocate an available physical storage resource to the application according to the physical storage resource allocation request information and a process ID of the application, and update according to the address information of the available physical storage resource. The address mapping table.
所述处理器1001,还用于根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用缓存,并根据预先为所述应用程序分配的所述可用缓存的地址信息,更新所述地址映射表。The processor 1001 is further configured to pre-allocate an available cache for the application according to the physical storage resource allocation request information and a process number of the application, and according to the available cache allocated in advance for the application. The address information is updated by the address mapping table.
具体的,所述处理器1001,具体用于在所述物理存储资源分配请求信息包含有所述预分配的元数据类型信息时,根据所述预分配的元数据类型信息及所述应用程序的进程号预先为所述应用程序分配元数据。Specifically, the processor 1001 is specifically configured to: when the physical storage resource allocation request information includes the pre-allocated metadata type information, according to the pre-allocated metadata type information and the application The process number pre-allocates metadata for the application.
在所述物理存储资源分配请求信息包含有所述预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息时,根据所述预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源。When the physical storage resource allocation request information includes the pre-allocated physical storage resource priority information, and/or size information of a pre-allocated physical storage resource, and/or media type information of a pre-allocated physical storage resource Determining, according to the pre-allocated physical storage resource priority information, and/or pre-allocated physical storage resource size information, and/or pre-allocated physical storage resource media type information and the process number of the application The application allocates available physical storage resources.
在所述物理存储资源分配请求信息包含有所述预分配的缓存数据的优先级信息时,根据所述预分配的缓存数据的优先级信息及所述应用程序的进程号预先为所述应用程序分配可用缓存。When the physical storage resource allocation request information includes the priority information of the pre-allocated cache data, according to the priority information of the pre-allocated cache data and the process number of the application, the application is previously Allocate an available cache.
进一步的,所述发射器1005,还用于在所述处理器1001确定不能为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源物理存储资源时,向所述处理装置发送不满足分配消息。Further, the transmitter 1005 is further configured to: when the processor 1001 determines that the application cannot allocate an available physical storage resource physical storage resource that matches the physical storage resource allocation request information, to the processing The device sends a message that does not satisfy the assignment.
本发明实施例提供了一种UAS,通过处理装置接收发送的物理存储资源分配请求信息及应用程序的进程号,确定能否为所述应用程序可用与物理存储资源分配请求信息相匹配的分配物理存储资源,若确定为应用程序分配与物理存储资源分配请求信息相匹配的分配物理存储 资源,则将处理装置返回满足分配消息。接收处理装置发送的可用虚拟资源的地址信息。在接收处理装置发送的携带了进程号的访存请求消息时,根据此进程号对应的物理存储资源分配请求信息,为应用程序分配与所述物理存储资源分配请求信息所包括的所述申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型相匹配的可用物理存储资源,并根据所述可用物理存储资源的地址信息更新地址映射表。这样,UAS可以根据应用程序的需要为应用程序分配最适合的可用物理存储资源,从而实现了在无需用户了解每种存储介质的性能的情况下,自动为应用程序的数据分配适合的可用资源,提高了应用程序的性能,并提高了用户体验。The embodiment of the present invention provides a UAS, which receives, by the processing device, the transmitted physical storage resource allocation request information and the process ID of the application, and determines whether the allocated physical medium that matches the physical storage resource allocation request information can be obtained for the application. a storage resource, if it is determined to allocate an allocated physical storage that matches the physical storage resource allocation request information for the application The resource returns the processing device to satisfy the allocation message. Receiving address information of available virtual resources sent by the processing device. When receiving the access request message carrying the process number sent by the processing device, assigning, to the application, the application physics included in the physical storage resource allocation request information according to the physical storage resource allocation request information corresponding to the process number The size information of the storage resource, the operation authority information of the application physical storage resource, and the available physical storage resource matching the media type of the physical storage resource, and the address mapping table is updated according to the address information of the available physical storage resource. In this way, the UAS can allocate the most suitable available physical storage resources to the application according to the needs of the application, thereby automatically allocating suitable resources for the application data without requiring the user to understand the performance of each storage medium. Improves application performance and improves user experience.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理包括,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、 磁碟或者光盘等各种可以存储程序代码的介质。The above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium. The software functional units described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform portions of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), and a random access memory (RAM). A variety of media that can store program code, such as a disk or an optical disk.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。 It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not limited thereto; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that The technical solutions described in the foregoing embodiments are modified, or the equivalents of the technical features are replaced. The modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (24)

  1. 一种资源分配的方法,其特征在于,应用于处理装置,所述处理装置通过内存总线连接至少一个存储设备,所述存储设备中包含有至少两种不同类型的存储介质,所述方法包括:A method for resource allocation, which is characterized in that it is applied to a processing device, and the processing device is connected to at least one storage device through a memory bus, where the storage device includes at least two different types of storage media, and the method includes:
    所述处理装置通过获取接口接收应用程序发送的物理存储资源分配请求信息;所述物理存储资源分配请信息包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息;其中,所述介质信息中包括与需要存储的数据匹配的物理存储资源的性能信息;The processing device receives the physical storage resource allocation request information sent by the application by the acquiring interface, where the physical storage resource allocation request information includes the size information of the applied physical storage resource, the operation authority information for applying for the physical storage resource, and the application for the physical storage resource. Media information; wherein the media information includes performance information of a physical storage resource that matches data that needs to be stored;
    所述处理装置确定所述物理存储资源分配请求信息是否包含有所申请物理存储资源的介质类型的信息;Determining, by the processing device, whether the physical storage resource allocation request information includes information of a media type of the applied physical storage resource;
    若确定出所述物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息,则所述处理装置在预先获取的空间特征表中查找与所述介质信息匹配的存储介质类型;所述空间特征表中记录有所述存储设备中所包含的所有存储介质类型和对应的性能信息;If it is determined that the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource, the processing device searches for the storage medium type that matches the media information in the pre-acquired spatial feature table; All the storage medium types and corresponding performance information included in the storage device are recorded in the spatial feature table;
    所述处理装置根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源;The processing device allocates available virtual resources to the application according to the size information of the application physical storage resource;
    所述处理装置根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源。And the processing device allocates the available physical storage resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource.
  2. 根据权利要求1所述的方法,其特征在于,所述存储设备中包括:一体化存储设备UAS;The method of claim 1, wherein the storage device comprises: an integrated storage device UAS;
    所述处理装置根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源包括:The processing device allocates available virtual resources to the application according to the size information of the application physical storage resource, including:
    所述处理装置将所述物理存储资源分配请求信息及所述应用程序的进程号发送至所述UAS,以使得所述UAS确定能否为所述应用程序分配可用物理存储资源;所述物理存储资源分配请求信息中还包括确定的所述申请物理存储资源的介质类型的信息;Transmitting, by the processing device, the physical storage resource allocation request information and a process number of the application to the UAS, so that the UAS determines whether an available physical storage resource can be allocated to the application; the physical storage The resource allocation request information further includes the determined information about the media type of the applied physical storage resource;
    所述处理装置在接收到所述UAS发送的满足分配消息时,根据所 述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源;When the processing device receives the satisfaction of the distribution message sent by the UAS, according to the Allocating the size information of the physical storage resource to allocate the available virtual resources to the application;
    所述处理装置根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源包括:The processing device allocates the available physical storage resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, including:
    所述处理装置将所述可用虚拟资源的地址信息发送至所述UAS;The processing device sends address information of the available virtual resource to the UAS;
    所述处理装置向所述UAS发送访存请求消息,以便通过所述UAS根据所述物理存储资源分配请求信息为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源;所述访存请求消息中携带有所述应用程序的进程号。The processing device sends a memory access request message to the UAS, so that the UAS allocates available physical storage resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information; The process request message carries the process number of the application.
  3. 根据权利要求2所述的方法,其特征在于,还包括:The method of claim 2, further comprising:
    所述处理装置在接收到所述UAS发送的不满足分配消息时,根据不满足分配消息,确定失败原因信息;When receiving the unsatisfied allocation message sent by the UAS, the processing device determines failure reason information according to the unsatisfied allocation message;
    所述处理装置将所述失败原因信息发送至所述应用程序;或者,The processing device sends the failure reason information to the application; or
    所述处理装置将所述物理存储资源分配请求信息及所述应用程序的进程号重新发送至所述UAS,以使得所述UAS重新确定能否为所述应用程序分配物理存储资源。The processing device resends the physical storage resource allocation request information and the process number of the application to the UAS, so that the UAS re-determines whether a physical storage resource can be allocated for the application.
  4. 根据权利要求2或3所述的方法,其特征在于,所述物理存储资源分配请求信息中还包括预分配的元数据类型信息、和/或预分配的缓存数据的优先级信息、和/或预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息。The method according to claim 2 or 3, wherein the physical storage resource allocation request information further includes pre-allocated metadata type information, and/or priority information of pre-allocated cache data, and/or Pre-allocated physical storage resource priority information, and/or size information of pre-allocated physical storage resources, and/or media type information of pre-allocated physical storage resources.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述物理存储资源分配请求信息中还包括缓存信息。The method according to any one of claims 1-4, wherein the physical storage resource allocation request information further includes cache information.
  6. 一种资源分配的方法,其特征在于,应用于一体化存储设备UAS,所述UAS通过内存总线连接处理装置,所述UAS中包含有至少两种不同类型的存储介质,所述方法包括:A method for resource allocation, which is characterized in that it is applied to an integrated storage device UAS, and the UAS is connected to a processing device through a memory bus. The UAS includes at least two different types of storage media, and the method includes:
    所述UAS接收处理装置发送的物理存储资源分配请求信息及应用程序的进程号;所述物理存储资源分配请求信息中包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息; The UAS receives the physical storage resource allocation request information and the process number of the application program, and the physical storage resource allocation request information includes the size information of the applied physical storage resource, the operation authority information for applying for the physical storage resource, and the application physics. Information about the media type of the storage resource;
    所述UAS确定能否为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源;Determining, by the UAS, whether the application is allocated an available physical storage resource that matches the physical storage resource allocation request information;
    若确定为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源,则所述UAS向所述处理装置发送满足分配消息;If it is determined that the application allocates an available physical storage resource that matches the physical storage resource allocation request information, the UAS sends a satisfaction fulfillment message to the processing device;
    所述UAS接收所述处理装置发送的可用虚拟资源的地址信息;Receiving, by the UAS, address information of available virtual resources sent by the processing device;
    所述UAS接收所述处理装置发送的访存请求消息;所述访存请求消息中携带有应用程序的进程号;Receiving, by the UAS, a memory access request message sent by the processing device; the memory access request message carries a process ID of the application;
    所述UAS根据所述应用程序的进程号对应的所述物理存储资源分配请求信息,为所述应用程序分配与所述物理存储资源分配请求信息所包括的所述申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息匹配的可用物理存储资源,根据所述可用物理存储资源的地址信息更新地址映射表;所述地址映射表用于记录所述可用虚拟资源的地址信息与为应用程序分配的可用物理存储资源的地址信息间的映射关系。And the UAS allocates size information of the application physical storage resource included in the physical storage resource allocation request information to the application according to the physical storage resource allocation request information corresponding to the process ID of the application, And the available physical storage resource that matches the information of the media type of the physical storage resource, and the address mapping table is updated according to the address information of the available physical storage resource; the address mapping table is used to record the A mapping relationship between address information of available virtual resources and address information of available physical storage resources allocated for an application.
  7. 根据权利要求6所述的方法,其特征在于,所述物理存储资源分配请求信息中还携带有缓存信息,在所述UAS接收所述处理装置发送的访存请求消息之后,还包括:The method according to claim 6, wherein the physical storage resource allocation request information further includes cache information, and after the UAS receives the memory access request message sent by the processing device, the method further includes:
    所述UAS根据所述缓存信息,为所述应用程序分配可用缓存,并根据所述可用缓存的地址信息更新所述地址映射表;所述地址映射表用于通过可用缓存的地址信息记录所述可用虚拟资源的地址信息与所述可用物理存储资源的地址信息间的映射关系。And the UAS allocates an available cache to the application according to the cache information, and updates the address mapping table according to the address information of the available cache; the address mapping table is configured to record the address information by using the cache A mapping relationship between address information of the available virtual resources and address information of the available physical storage resources.
  8. 根据权利要求6或7所述的方法,其特征在于,在所述UAS接收所述处理装置发送的访存请求消息之前,还包括:The method according to claim 6 or 7, wherein before the UAS receives the memory access request message sent by the processing device, the method further includes:
    所述UAS根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配元数据;The UAS allocates metadata to the application in advance according to the physical storage resource allocation request information and the process ID of the application;
    在所述UAS预先为所述应用程序分配元数据之后,还包括:After the UAS pre-allocates the metadata for the application, the method further includes:
    根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源,并根据所述可用物理存储资源的地址信息更新所述地址映射表。 And assigning the available physical storage resources to the application according to the physical storage resource allocation request information and the process ID of the application, and updating the address mapping table according to the address information of the available physical storage resources.
  9. 根据权利要求6或7所述的方法,其特征在于,Method according to claim 6 or 7, characterized in that
    在所述UAS接收所述处理装置发送的访存请求消息之前,还包括:Before the UAS receives the memory access request message sent by the processing device, the method further includes:
    所述UAS根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配元数据;The UAS allocates metadata to the application in advance according to the physical storage resource allocation request information and the process ID of the application;
    在所述UAS预先为所述应用程序分配元数据之后,还包括:After the UAS pre-allocates the metadata for the application, the method further includes:
    所述UAS根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用缓存,并根据预先为所述应用程序分配的所述可用缓存的地址信息,更新所述地址映射表。And the UAS allocates an available cache to the application according to the physical storage resource allocation request information and the process ID of the application, and updates the location according to the address information of the available cache allocated in advance for the application. The address mapping table is described.
  10. 根据权利要求8或9所述的方法,其特征在于,所述物理存储资源分配请求信息中还包括预分配的元数据类型信息、和/或预分配的缓存数据的优先级信息、和/或预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息;The method according to claim 8 or 9, wherein the physical storage resource allocation request information further includes pre-allocated metadata type information, and/or priority information of pre-allocated cache data, and/or Pre-allocated physical storage resource priority information, and/or size information of pre-allocated physical storage resources, and/or media type information of pre-allocated physical storage resources;
    在所述物理存储资源分配请求信息包含有所述预分配的元数据类型信息时,所述根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配元数据包括:When the physical storage resource allocation request information includes the pre-allocated metadata type information, the foregoing allocates metadata to the application according to the physical storage resource allocation request information and a process number of the application. include:
    根据所述预分配的元数据类型信息及所述应用程序的进程号预先为所述应用程序分配元数据;Metadata is allocated to the application in advance according to the pre-allocated metadata type information and the process number of the application;
    在所述物理存储资源分配请求信息包含有所述预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息时,所述根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源包括:When the physical storage resource allocation request information includes the pre-allocated physical storage resource priority information, and/or size information of a pre-allocated physical storage resource, and/or media type information of a pre-allocated physical storage resource The pre-allocating the available physical storage resources for the application according to the physical storage resource allocation request information and the process number of the application includes:
    根据所述预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源;Determining according to the pre-allocated physical storage resource priority information, and/or pre-allocated physical storage resource size information, and/or pre-allocated physical storage resource media type information and the process number of the application The application allocates available physical storage resources;
    在所述物理存储资源分配请求信息包含有所述预分配的缓存数据的优先级信息时,所述根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用缓存包括:When the physical storage resource allocation request information includes the priority information of the pre-allocated cache data, the physical storage resource allocation request information and the process number of the application are allocated in advance to the application. Available caches include:
    根据所述预分配的缓存数据的优先级信息及所述应用程序的进程 号预先为所述应用程序分配可用缓存。According to the priority information of the pre-allocated cache data and the process of the application The number is pre-assigned an available cache for the application.
  11. 根据权利要求6-10任一项所述的方法,其特征在于,还包括:The method of any of claims 6-10, further comprising:
    若确定不能为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源,则所述UAS向所述处理装置发送不满足分配消息。If it is determined that the application cannot be allocated an available physical storage resource that matches the physical storage resource allocation request information, the UAS sends an unsatisfied allocation message to the processing device.
  12. 一种处理装置,其特征在于,包括:A processing device, comprising:
    接收单元,用于通过获取接口接收应用程序发送的物理存储资源分配请求信息;所述物理存储资源分配请信息包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息;其中,所述介质信息中包括与需要存储的数据匹配的物理存储资源的性能信息;The receiving unit is configured to receive, by using the acquiring interface, physical storage resource allocation request information sent by the application, where the physical storage resource allocation request information includes size information of the applied physical storage resource, operation permission information for applying the physical storage resource, and applying for the physical storage resource. Media information; wherein the media information includes performance information of a physical storage resource that matches data that needs to be stored;
    确定单元,用于确定所述物理存储资源分配请求信息是否包含有所申请物理存储资源的介质类型的信息;a determining unit, configured to determine whether the physical storage resource allocation request information includes information about a media type of the applied physical storage resource;
    所述确定单元,还用于在确定出所述物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息时,在预先获取的空间特征表中查找与所述介质信息匹配的存储介质类型;所述空间特征表中记录有所述存储设备中所包含的所有存储介质类型和对应的性能信息;The determining unit is further configured to: when determining that the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource, searching, in the pre-acquired spatial feature table, the matching with the media information. a storage medium type; all the storage medium types and corresponding performance information included in the storage device are recorded in the spatial feature table;
    分配单元,用于根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源;An allocating unit, configured to allocate an available virtual resource to the application according to the size information of the application physical storage resource;
    所述分配单元,还用于根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源。The allocating unit is further configured to allocate, according to the physical storage resource allocation request information and the media type of the application physical storage resource, an available physical storage resource corresponding to the available virtual resource.
  13. 根据权利要求12所述的装置,其特征在于,The device according to claim 12, characterized in that
    所述分配单元,用于根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源具体包括:The allocating unit, configured to allocate the available virtual resources to the application according to the size information of the physical storage resource, specifically includes:
    所述分配单元,具体用于将所述物理存储资源分配请求信息及所述应用程序的进程号发送至所述UAS,以使得所述UAS确定能否为所述应用程序分配可用物理存储资源;所述物理存储资源分配请求信息中还包括确定的所述申请物理存储资源的介质类型的信息; The allocating unit is configured to send the physical storage resource allocation request information and the process ID of the application to the UAS, so that the UAS determines whether the applicable physical storage resource can be allocated to the application; The physical storage resource allocation request information further includes the determined media type information of the applied physical storage resource;
    在接收到所述UAS发送的满足分配消息时,根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源;When receiving the satisfaction of the distribution message sent by the UAS, allocating available virtual resources to the application according to the size information of the application physical storage resource;
    所述分配单元,还用于根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源具体包括:The allocating unit is further configured to allocate the available physical storage resources corresponding to the available virtual resources to the application according to the physical storage resource allocation request information and the media type of the application physical storage resource, including:
    所述分配单元,具体用于将所述可用虚拟资源的地址信息发送至所述UAS;The allocating unit is specifically configured to send address information of the available virtual resource to the UAS;
    向所述UAS发送访存请求消息,以便通过所述UAS根据所述物理存储资源分配请求信息为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源;所述访存请求消息中携带有所述应用程序的进程号。Sending a memory access request message to the UAS, so that the application allocates an available physical storage resource corresponding to the available virtual resource according to the physical storage resource allocation request information by the UAS; in the memory access request message The process number carrying the application.
  14. 根据权利要求13所述的装置,其特征在于,还包括:The device according to claim 13, further comprising:
    处理单元,用于在接收到所述UAS发送的不满足分配消息时,根据不满足分配消息,确定失败原因信息;a processing unit, configured to determine, according to the unsatisfied allocation message, the failure reason information when receiving the dissatisfaction message sent by the UAS;
    将所述失败原因信息发送至所述应用程序;或者,Sending the failure reason information to the application; or,
    将所述物理存储资源分配请求信息及所述应用程序的进程号重新发送至所述UAS,以使得所述UAS重新确定能否为所述应用程序分配物理存储资源。And resending the physical storage resource allocation request information and the process number of the application to the UAS, so that the UAS re-determines whether the physical storage resource can be allocated to the application.
  15. 根据权利要求13或14所述的装置,其特征在于,所述物理存储资源分配请求信息中还包括预分配的元数据类型信息、和/或预分配的缓存数据的优先级信息、和/或预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息。The apparatus according to claim 13 or 14, wherein the physical storage resource allocation request information further includes pre-allocated metadata type information, and/or priority information of pre-allocated cache data, and/or Pre-allocated physical storage resource priority information, and/or size information of pre-allocated physical storage resources, and/or media type information of pre-allocated physical storage resources.
  16. 根据权利要求12-15任一项所述的装置,其特征在于,Apparatus according to any of claims 12-15, wherein
    所述物理存储资源分配请求信息中还包括缓存信息。The physical storage resource allocation request information further includes cache information.
  17. 一种一体化存储设备UAS,其特征在于,包括:An integrated storage device UAS, comprising:
    接收单元,用于接收处理装置发送的物理存储资源分配请求信息及应用程序的进程号;所述物理存储资源分配请求信息中包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物 理存储资源的介质类型的信息;a receiving unit, configured to receive physical storage resource allocation request information and a process number of the application program, where the physical storage resource allocation request information includes size information of the applied physical storage resource, and operation permission information of the physical storage resource and Application Information about the media type of the storage resource;
    确定单元,用于确定能否为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源;a determining unit, configured to determine whether the applicable physical storage resource that matches the physical storage resource allocation request information is allocated to the application;
    发送单元,用于在所述确定单元确定为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源时,向所述处理装置发送满足分配消息;a sending unit, configured to send, when the determining unit determines, that the application, an available physical storage resource that matches the physical storage resource allocation request information, to the processing device;
    所述接收单元,还用于接收所述处理装置发送的可用虚拟资源的地址信息;The receiving unit is further configured to receive address information of available virtual resources sent by the processing device;
    所述接收单元,还用于接收所述处理装置发送的访存请求消息;所述访存请求消息中携带有应用程序的进程号;The receiving unit is further configured to receive a memory access request message sent by the processing device, where the memory access request message carries a process ID of the application;
    分配单元,用于根据所述应用程序的进程号对应的所述申请物理存储资源分配请求信息,为所述应用程序分配与所述物理存储资源分配请求信息所包括的所述申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息匹配的可用物理存储资源;An allocating unit, configured to allocate, according to the application physical storage resource allocation request information corresponding to the process ID of the application, the application to the application physical storage resource included in the physical storage resource allocation request information The size information, the operation authority information of the application physical storage resource, and the available physical storage resource matching the information of the medium type of the physical storage resource;
    更新单元,用于根据所述分配单元为所述应用程序分配的所述可用物理存储资源的地址信息更新地址映射表;所述地址映射表用于记录所述可用虚拟资源的地址信息与为应用程序分配的可用物理存储资源的地址信息间的映射关系。An update unit, configured to update an address mapping table according to address information of the available physical storage resource allocated by the allocation unit for the application; the address mapping table is configured to record address information of the available virtual resource and serve as an application The mapping relationship between the address information of available physical storage resources allocated by the program.
  18. 根据权利要求17所述的UAS,其特征在于,所述物理存储资源分配请求信息中还携带有缓存信息;The UAS according to claim 17, wherein the physical storage resource allocation request information further carries cache information;
    所述分配单元,还用于根据所述缓存信息,为所述应用程序分配可用缓存;The allocating unit is further configured to allocate an available cache to the application according to the cache information;
    所述更新单元,还用于根据所述可用缓存的地址信息更新地址映射表;所述地址映射表用于通过可用缓存的地址信息记录所述可用虚拟资源的地址信息与所述可用物理存储资源的地址信息间的映射关系。The update unit is further configured to: update an address mapping table according to the address information of the available cache; the address mapping table is configured to record address information of the available virtual resource and the available physical storage resource by using the cached address information The mapping relationship between the address information.
  19. 根据权利要求17或18所述的UAS,其特征在于,The UAS according to claim 17 or 18, characterized in that
    所述分配单元,还用于根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配元数据; The allocating unit is further configured to allocate metadata to the application according to the physical storage resource allocation request information and the process ID of the application;
    所述分配单元,还用于根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源;The allocating unit is further configured to allocate an available physical storage resource to the application in advance according to the physical storage resource allocation request information and a process number of the application;
    所述更新单元,还用于根据所述分配单元预先为所述应用程序分配的所述可用物理存储资源的地址信息更新所述地址映射表。The updating unit is further configured to update the address mapping table according to the address information of the available physical storage resource allocated by the allocation unit for the application in advance.
  20. 根据权利要求17或18所述的UAS,其特征在于,The UAS according to claim 17 or 18, characterized in that
    所述分配单元,还用于根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配元数据;The allocating unit is further configured to allocate metadata to the application according to the physical storage resource allocation request information and the process ID of the application;
    所述分配单元,还用于根据所述物理存储资源分配请求信息及所述应用程序的进程号预先为所述应用程序分配可用缓存;The allocating unit is further configured to allocate an available cache to the application according to the physical storage resource allocation request information and the process ID of the application;
    所述更新单元,还用于根据所述分配单元预先为所述应用程序分配的所述可用缓存的地址信息,更新所述地址映射表。The updating unit is further configured to update the address mapping table according to the address information of the available cache allocated by the allocation unit for the application in advance.
  21. 根据权利要求19或20所述的UAS,其特征在于,所述物理存储资源分配请求信息中还包括预分配的元数据类型信息、和/或预分配的缓存数据的优先级信息、和/或预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息;The UAS according to claim 19 or 20, wherein the physical storage resource allocation request information further includes pre-allocated metadata type information, and/or priority information of pre-allocated cache data, and/or Pre-allocated physical storage resource priority information, and/or size information of pre-allocated physical storage resources, and/or media type information of pre-allocated physical storage resources;
    所述分配单元,具体用于在所述物理存储资源分配请求信息包含有所述预分配的元数据类型信息时,根据所述预分配的元数据类型信息及所述应用程序的进程号预先为所述应用程序分配元数据;The allocating unit is configured to: when the physical storage resource allocation request information includes the pre-allocated metadata type information, according to the pre-allocated metadata type information and a process number of the application The application allocates metadata;
    在所述物理存储资源分配请求信息包含有所述预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息时,根据所述预分配的物理存储资源优先级信息、和/或预分配的物理存储资源的大小信息、和/或预分配的物理存储资源的介质类型信息及所述应用程序的进程号预先为所述应用程序分配可用物理存储资源;When the physical storage resource allocation request information includes the pre-allocated physical storage resource priority information, and/or size information of a pre-allocated physical storage resource, and/or media type information of a pre-allocated physical storage resource Determining, according to the pre-allocated physical storage resource priority information, and/or pre-allocated physical storage resource size information, and/or pre-allocated physical storage resource media type information and the process number of the application The application allocates available physical storage resources;
    在所述物理存储资源分配请求信息包含有所述预分配的缓存数据的优先级信息时,根据所述预分配的缓存数据的优先级信息及所述应用程序的进程号预先为所述应用程序分配可用缓存。When the physical storage resource allocation request information includes the priority information of the pre-allocated cache data, according to the priority information of the pre-allocated cache data and the process number of the application, the application is previously Allocate an available cache.
  22. 根据权利要求17-21任一项所述的UAS,其特征在于,The UAS according to any one of claims 17 to 21, characterized in that
    发送单元,还用于在所述确定单元确定不能为所述应用程序分配 与所述物理存储资源分配请求信息匹配的可用物理存储资源时,向所述处理装置发送不满足分配消息。a sending unit, configured to determine, at the determining unit, that the application cannot be allocated When the physical storage resource that matches the physical storage resource allocation request information is used, the dissatisfaction message is sent to the processing device.
  23. 一种处理装置,其特征在于,包括:处理器,存储器,通信接口,和总线,其中,所述处理器、所述存储器和所述通信接口通过所述总线通信;A processing device, comprising: a processor, a memory, a communication interface, and a bus, wherein the processor, the memory, and the communication interface communicate via the bus;
    所述存储器,用于存放程序;The memory is configured to store a program;
    所述处理器,用于执行所述存储器存储的执行指令;The processor is configured to execute an execution instruction of the memory storage;
    所述通信接口,接收应用程序发送的物理存储资源分配请求信息;所述物理存储资源分配请求信息包括申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质信息;其中,所述介质信息中包括与需要存储的数据匹配的物理存储资源的性能信息;The communication interface receives the physical storage resource allocation request information sent by the application; the physical storage resource allocation request information includes size information of the applied physical storage resource, operation permission information for applying the physical storage resource, and medium information for applying the physical storage resource. Wherein the media information includes performance information of a physical storage resource that matches data that needs to be stored;
    当所述处理装置运行时,处理器运行程序,以执行以下指令:When the processing device is running, the processor runs a program to execute the following instructions:
    确定所述物理存储资源分配请求信息是否包含有所申请物理存储资源的介质类型的信息;Determining whether the physical storage resource allocation request information includes information about a media type of the applied physical storage resource;
    若确定出所述物理存储资源分配请求信息中没有包含所申请物理存储资源的介质类型的信息,则在预先获取的空间特征表中查找与所述介质信息匹配的存储介质类型;所述空间特征表中记录有所述存储设备中所包含的所有存储介质类型和对应的性能信息;If it is determined that the physical storage resource allocation request information does not include the information of the media type of the applied physical storage resource, searching for the storage medium type that matches the media information in the pre-acquired spatial feature table; All storage medium types and corresponding performance information included in the storage device are recorded in the table;
    根据所述申请物理存储资源的大小信息为所述应用程序分配可用虚拟资源;Allocating available virtual resources to the application according to the size information of the application physical storage resource;
    根据所述物理存储资源分配请求信息及所述申请物理存储资源的介质类型,为所述应用程序分配与所述可用虚拟资源对应的可用物理存储资源。And assigning, to the application, an available physical storage resource corresponding to the available virtual resource, according to the physical storage resource allocation request information and the media type of the application physical storage resource.
  24. 一种一体化存储设备UAS,其特征在于,包括:处理器,存储器,通信接口,总线,和发射器,其中,所述处理器、所述存储器和所述通信接口通过所述总线通信;An integrated storage device UAS, comprising: a processor, a memory, a communication interface, a bus, and a transmitter, wherein the processor, the memory, and the communication interface communicate through the bus;
    所述存储器,用于存储程序及数据,其中,所述存储器包含至少两种不同类型的存储介质;The memory is configured to store programs and data, wherein the memory includes at least two different types of storage media;
    所述通信接口,用于接收处理装置发送的物理存储资源分配请求信息及应用程序的进程号;所述物理存储资源分配请求信息中包括申请 物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息;The communication interface is configured to receive physical storage resource allocation request information sent by the processing device and a process number of the application; the physical storage resource allocation request information includes an application The size information of the physical storage resource, the operation authority information of the application for the physical storage resource, and the information of the medium type of the physical storage resource;
    所述处理器,用于确定能否为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源;The processor, configured to determine whether an available physical storage resource that matches the physical storage resource allocation request information is allocated to the application;
    所述处理器,还用于在确定为所述应用程序分配与所述物理存储资源分配请求信息匹配的可用物理存储资源时,触发所述发射器向所述处理装置发送满足分配消息;The processor is further configured to: when determining to allocate, to the application, an available physical storage resource that matches the physical storage resource allocation request information, trigger the transmitter to send a satisfaction fulfillment message to the processing device;
    所述发射器,用于向所述处理装置发送满足分配消息;The transmitter is configured to send a meeting satisfaction message to the processing device;
    所述通信接口,还用于接收所述处理装置发送的可用虚拟资源的地址信息;The communication interface is further configured to receive address information of available virtual resources sent by the processing device;
    所述通信接口,还用于接收所述处理装置发送的访存请求消息;所述访存请求消息中携带有应用程序的进程号;The communication interface is further configured to receive a memory access request message sent by the processing device, where the memory access request message carries a process ID of the application;
    所述处理器,还用于根据所述应用程序的进程号对应的所述物理存储资源分配请求信息,为所述应用程序分配与所述物理存储资源分配请求信息所包括的所述申请物理存储资源的大小信息,申请物理存储资源的操作权限信息及申请物理存储资源的介质类型的信息匹配的可用物理存储资源,根据所述可用物理存储资源的地址信息更新地址映射表;所述地址映射表用于记录所述可用虚拟资源的地址信息与为应用程序分配的可用物理存储资源的地址信息间的映射关系。 The processor is further configured to allocate the application physical storage included in the physical storage resource allocation request information to the application according to the physical storage resource allocation request information corresponding to the process ID of the application. The size information of the resource, the operation authority information of the application physical storage resource, and the available physical storage resource that matches the information of the medium type of the physical storage resource, and the address mapping table is updated according to the address information of the available physical storage resource; the address mapping table A mapping relationship between address information of the available virtual resources and address information of available physical storage resources allocated for the application.
PCT/CN2015/079943 2014-05-30 2015-05-27 Resource allocation method and device WO2015180648A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410241898.1 2014-05-30
CN201410241898.1A CN105446813B (en) 2014-05-30 2014-05-30 A kind of method and device of resource allocation

Publications (1)

Publication Number Publication Date
WO2015180648A1 true WO2015180648A1 (en) 2015-12-03

Family

ID=54698114

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/079943 WO2015180648A1 (en) 2014-05-30 2015-05-27 Resource allocation method and device

Country Status (2)

Country Link
CN (1) CN105446813B (en)
WO (1) WO2015180648A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018130024A1 (en) * 2017-01-12 2018-07-19 中兴通讯股份有限公司 Data processing method, device, computer-readable storage medium and terminal
US10318888B2 (en) 2017-03-06 2019-06-11 International Business Machines Corporation Pre-backing virtual storage using historical learned data
CN109962963A (en) * 2017-12-26 2019-07-02 中国移动通信集团公司 Message treatment method and device
CN112506650A (en) * 2020-11-27 2021-03-16 中国建设银行股份有限公司 Resource allocation method, system, computer device and storage medium
CN114866547A (en) * 2022-04-20 2022-08-05 中国银联股份有限公司 Virtual resource allocation method, device, equipment and storage medium
WO2023051000A1 (en) * 2021-09-30 2023-04-06 华为技术有限公司 Memory management method and apparatus, processor and computing device

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10929290B2 (en) * 2016-12-31 2021-02-23 Intel Corporation Mechanism for providing reconfigurable data tiers in a rack scale environment
WO2019061072A1 (en) * 2017-09-27 2019-04-04 Intel Corporation Computer program product, system, and method to manage access to storage resources from multiple applications
CN107783734B (en) * 2017-11-17 2021-03-16 北京联想超融合科技有限公司 Resource allocation method, device and terminal based on super-fusion storage system
CN108513197A (en) * 2018-04-11 2018-09-07 四川斐讯信息技术有限公司 A kind of data-storage system and date storage method of intelligent earphone
CN108830101A (en) * 2018-06-04 2018-11-16 北京奇虎科技有限公司 Application permission configuration method and device based on tables of data
CN109582447B (en) * 2018-10-15 2020-09-29 中盈优创资讯科技有限公司 Computing resource allocation method, task processing method and device
CN111176823A (en) * 2018-11-09 2020-05-19 深圳市中兴微电子技术有限公司 Method and device for allocating storage resources and computer readable storage medium
CN109284274B (en) * 2018-11-29 2021-09-28 郑州云海信息技术有限公司 Configuration asynchronous pre-allocation implementation method based on distributed file system
CN113365116B (en) * 2020-03-04 2022-12-13 Vidaa(荷兰)国际控股有限公司 Audio and video resource management method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1694081A (en) * 2005-05-31 2005-11-09 清华大学 Implementing method of virtual intelligent controller in SAN system
CN101241476A (en) * 2008-01-30 2008-08-13 中国科学院计算技术研究所 Dummy storage system and method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510143B (en) * 2009-03-13 2011-01-05 杭州华三通信技术有限公司 Storage space dynamic assignment method, system and storage apparatus
CN101694081B (en) * 2009-10-10 2012-07-04 厦门市杏林通利彩印有限公司 Printed paperboard and production method thereof
CN102567072B (en) * 2010-12-20 2015-04-22 中国移动通信集团公司 Resource allocation method, resource allocation device and resource allocation system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1694081A (en) * 2005-05-31 2005-11-09 清华大学 Implementing method of virtual intelligent controller in SAN system
CN101241476A (en) * 2008-01-30 2008-08-13 中国科学院计算技术研究所 Dummy storage system and method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018130024A1 (en) * 2017-01-12 2018-07-19 中兴通讯股份有限公司 Data processing method, device, computer-readable storage medium and terminal
US10318888B2 (en) 2017-03-06 2019-06-11 International Business Machines Corporation Pre-backing virtual storage using historical learned data
CN109962963A (en) * 2017-12-26 2019-07-02 中国移动通信集团公司 Message treatment method and device
CN109962963B (en) * 2017-12-26 2020-08-18 中国移动通信集团公司 Message processing method and device
CN112506650A (en) * 2020-11-27 2021-03-16 中国建设银行股份有限公司 Resource allocation method, system, computer device and storage medium
WO2023051000A1 (en) * 2021-09-30 2023-04-06 华为技术有限公司 Memory management method and apparatus, processor and computing device
CN114866547A (en) * 2022-04-20 2022-08-05 中国银联股份有限公司 Virtual resource allocation method, device, equipment and storage medium
CN114866547B (en) * 2022-04-20 2023-09-29 中国银联股份有限公司 Virtual resource allocation method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN105446813A (en) 2016-03-30
CN105446813B (en) 2018-12-14

Similar Documents

Publication Publication Date Title
WO2015180648A1 (en) Resource allocation method and device
AU2014235793B2 (en) Automatic tuning of virtual data center resource utilization policies
US20170195282A1 (en) Address Processing Method, Related Device, and System
JP5837206B2 (en) Method and apparatus for providing isolated virtual space
US20200310859A1 (en) System and method for an object layer
US10241550B2 (en) Affinity aware parallel zeroing of memory in non-uniform memory access (NUMA) servers
US9229751B2 (en) Apparatus and method for managing virtual memory
US10715622B2 (en) Systems and methods for accelerating object stores with distributed caching
US10235047B2 (en) Memory management method, apparatus, and system
US9448901B1 (en) Remote direct memory access for high availability nodes using a coherent accelerator processor interface
WO2015067074A1 (en) Data reading method and apparatus
WO2016093895A1 (en) Generating and/or employing a descriptor associated with a memory translation table
US11336521B2 (en) Acceleration resource scheduling method and apparatus, and acceleration system
WO2015062228A1 (en) Method and device for accessing shared memory
US9215294B2 (en) Management of communications between a client equipment and a server equipment providing to the client equipment computer resources represented according to a file system
CN106598692A (en) Method for creating mirror image file in logical volume and starting virtual machine, and server
WO2018107945A1 (en) Method and device for implementing allocation of hardware resources, and storage medium
CN110795158A (en) Bare computer server management method, system, electronic equipment and storage medium
GB2584980A (en) Workload management with data access awareness in a computing cluster
WO2015055117A1 (en) Method, device, and system for accessing memory
US10474643B2 (en) Distributed file system and method of creating files effectively
JP6418419B2 (en) Method and apparatus for hard disk to execute application code
CN109739615B (en) Mapping method and device of virtual hard disk and cloud computing platform
WO2016065613A1 (en) File access method, distributed storage system and network device
KR20160132581A (en) Method and apparatus for generating unique identifier for distributed computing environment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15800308

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15800308

Country of ref document: EP

Kind code of ref document: A1