IP Library Granted Patent US 12711065
Granted Patent B2
US 12711065 · App. 19/469,904 · Granted Aug 18, 2026

Resource allocation method and apparatus, electronic device, and storage medium

Inventor: Tao Zhang (Suzhou, CN)
Assignee: SUZHOU METABRAIN INTELLIGENT TECHNOLOGY CO., LTD.
G06F12/0653
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12711065
App. No.
19/469,904
Granted
Aug 18, 2026
Kind
B2
Abstract

The present disclosure provides a resource allocation method, performed by a memory management unit in a resource allocation system, including: in response to a memory obtaining request forwarded by a switch in the resource allocation system, obtaining a required memory capacity and a memory start address carried by the memory obtaining request; selecting a target memory module that matches the required memory capacity from at least two memory modules in the resource allocation system based on a memory allocation unit in the resource allocation system; and performing address translation on the target memory module based on a memory address router in the memory allocation unit and the memory start address, and allocating the target memory module after the address translation to the target host.

Claims (61)

1 . A resource allocation method, applied to a memory management unit in a resource allocation system, the method comprising:

receiving a memory obtaining request forwarded by a switch in the resource allocation system, wherein the memory obtaining request is sent by any target host of at least two hosts comprised in the resource allocation system to the switch, in response to the memory obtaining request, obtaining a required memory capacity and a memory start address carried by the memory obtaining request;

selecting a target memory module that matches the required memory capacity from at least two memory modules in the resource allocation system based on a memory allocation unit in the resource allocation system; and

performing address translation on the target memory module based on a memory address router in the memory allocation unit and the memory start address, and allocating the target memory module after the address translation to the target host;

wherein selecting the target memory module that matches the required memory capacity from the at least two memory modules in the resource allocation system based on the memory allocation unit in the resource allocation system comprises:

obtaining memory allocation status corresponding to respective memory modules in the resource allocation system based on the memory allocation unit in the resource allocation system;

determining one or more memory modules to be allocated and free memory sizes corresponding to the one or more memory modules to be allocated based on the memory allocation status corresponding to the respective memory modules; and

determining a free memory size of a first memory module in the one or more memory modules to be allocated being greater than or equal to the required memory capacity, in response to the free memory size being greater than or equal to the required memory capacity, determining the first memory module as the target memory module;

wherein selecting the target memory module that matches the required memory capacity from the at least two memory modules in the resource allocation system based on the memory allocation unit in the resource allocation system further comprises:

determining a memory size of any one of the one or more memory modules to be allocated beingless than the required memory capacity, in response to the memory size being less than the required memory capacity, determining designated memory modules as the target memory module, wherein the designated memory modules comprise at least two memory modules to be allocated;

wherein performing the address translation on the target memory module based on the memory address router in the memory allocation unit and the memory start address comprises:

obtaining an initial start address, an initial end address, and a target memory size corresponding to the target memory module;

determining a target end address based on the target memory size and the memory start address through the memory address router; and

translating the initial start address to the memory start address, and translating the initial end address to the target end address.

2 . The resource allocation method according to claim 1 , wherein the at least two hosts are respectively connected to at least two host memory interfaces in the memory allocation unit in one-to-one correspondence based on a compute express link (CXL) bus, and memory device interfaces in the memory allocation unit are connected to a memory storage unit in the resource allocation system based on the CXL bus.

3 . The resource allocation method according to claim 2 , wherein the memory storage unit comprises at least two memory modules and at least two memory expander controllers (MXCs), the at least two MXCs are connected to the at least two memory modules in one-to-one correspondence, and the at least two MXCs are configured to perform memory expansion on the at least two memory modules.

4 . The resource allocation method according to claim 1 , wherein the memory management unit is connected to a status obtaining interface in the memory allocation unit based on a universal asynchronous receiver/transmitter (UART), wherein the method further comprises:

obtaining temperature information corresponding to the memory allocation unit based on the status obtaining interface.

5 . The resource allocation method according to claim 4 , further comprising:

determining the temperature information satisfying a preset temperature condition, in response to the temperature information satisfying the preset temperature condition, sending a first target signal to a target fan in the resource allocation system based on a logic unit in the resource allocation system, wherein the first target signal is configured to obtain rotational speed information corresponding to the target fan; and

sending a second target signal to the target fan based on the rotational speed information and the temperature information, wherein the second target signal is configured to adjust a rotational speed of the target fan.

6 . The resource allocation method according to claim 1 , wherein the memory obtaining request carries a host identifier, wherein allocating the target memory module after the address translation to the target host comprises:

determining a target host memory interface connected to the target host from at least two host memory interfaces in the memory allocation unit based on the host identifier; and

determining the memory address router completing the address translation of the target memory module, in response to the memory address router completing the address translation of the target memory module, sending the memory start address and the target end address to the target host memory interface through the memory address router.

7 . The resource allocation method according to claim 1 , wherein each of the at least two hosts in the resource allocation system is respectively connected to a target processor through a two-wire serial bus, and the target processor stores a host identifier corresponding to the host connected to the target processor.

8 . The resource allocation method according to claim 1 , wherein the memory management unit is connected to a configuration interface in the memory allocation unit through a two-wire serial bus, wherein the method further comprises:

uniformly addressing the at least two memory modules based on the configuration interface.

9 . The resource allocation method according to claim 8 , further comprising:

controlling an initialization unit in the memory allocation unit to perform initialization configuration according to information in a storage processor based on the configuration interface.

10 . The resource allocation method according to claim 1 , wherein the memory management unit is connected to a memory resource interface in the memory allocation unit based on a high-speed serial computer expansion bus, wherein obtaining the memory allocation status corresponding to the respective memory modules in the resource allocation system based on the memory allocation unit in the resource allocation system comprises:

obtaining the memory allocation status corresponding to the respective memory modules in real time based on the memory resource interface.

11 . The resource allocation method according to claim 10 , wherein the memory allocation status comprises host information, bandwidth information, and device interface connection status corresponding to one or more allocated memory modules, and the free memory sizes corresponding to the one or more memory modules to be allocated.

12 . The resource allocation method according to claim 1 , further comprising determining that a storage module corresponding to the target host does not satisfy a preset storage condition and, in response to the storage module corresponding to the target host not satisfying the preset storage condition, sending the memory obtaining request to the switch using the target host.

13 . The resource allocation method according to claim 9 , wherein controlling the initialization unit in the memory allocation unit to perform initialization configuration according to the information in the storage processor based on the configuration interface comprises:

determining power-on of the memory allocation unit being completed, in response to power-on of the memory allocation unit being completed, controlling the initialization unit to obtain initialization information from the storage processor based on the configuration interface; and

based on the initialization information, enabling host memory interfaces and memory device interfaces in the memory allocation unit, and setting transmission bandwidth information and transmission rate information.

14 . The resource allocation method according to claim 1 , wherein the memory start address is determined based on a storage size of a storage module corresponding to the target host.

15 . An electronic device, comprising:

a processor, a memory, and a computer program stored on the memory and executable on the processor, wherein the computer program, when executed by the processor, causes the electronic device to perform the resource allocation method according to claim 1 .

16 . The electronic device according to claim 15 , wherein the at least two hosts are respectively connected to at least two host memory interfaces in the memory allocation unit in one-to-one correspondence based on a compute express link (CXL) bus, and memory device interfaces in the memory allocation unit are connected to a memory storage unit in the resource allocation system based on the CXL bus.

17 . The electronic device according to claim 16 , wherein the memory storage unit comprises at least two memory modules and at least two memory expander controllers (MXCs), the at least two MXCs are connected to the at least two memory modules in one-to-one correspondence, and the at least two MXCs are configured to perform memory expansion on the at least two memory modules.

18 . The electronic device according to claim 15 , wherein the memory management unit is connected to a status obtaining interface in the memory allocation unit based on a universal asynchronous receiver/transmitter (UART), wherein the processor is further configured to perform operations comprising:

obtaining temperature information corresponding to the memory allocation unit based on the status obtaining interface.

19 . A non-transitory readable storage medium, wherein instructions in the non-transitory readable storage medium, when executed by a processor of an electronic device, cause the electronic device to perform the resource allocation method according to claim 1 .

20 . A resource allocation system, comprising a memory management unit, a memory allocation unit, a memory storage unit, a switch, and at least two hosts;

wherein the at least two hosts are connected to the switch based on a network, and the at least two hosts are respectively connected to at least two host memory interfaces in the memory allocation unit in one-to-one correspondence based on a compute express link (CXL) bus;

memory device interfaces in the memory allocation unit are connected to the memory storage unit based on the CXL bus;

the memory management unit is connected to the switch based on the network; the memory management unit is connected to a status obtaining interface in the memory allocation unit based on a universal asynchronous receiver/transmitter (UART), the memory management unit is connected to a configuration interface in the memory allocation unit based on a two-wire serial bus, and the memory management unit is further connected to a memory resource interface in the memory allocation unit based on a high-speed serial computer expansion bus;

wherein the memory management unit is configured to: in response to a memory obtaining request forwarded by the switch in the resource allocation system, obtain a required memory capacity and a memory start address carried by the memory obtaining request, wherein the memory obtaining request is sent by any target host of the at least two hosts comprised in the resource allocation system to the switch;

the memory management unit is further configured to select a target memory module that matches the required memory capacity from at least two memory modules in the resource allocation system based on the memory allocation unit in the resource allocation system;

the memory management unit is further configured to perform address translation on the target memory module based on a memory address router in the memory allocation unit and the memory start address, and allocate the target memory module after the address translation to the target host;

the memory management unit is further configured to:

obtain memory allocation status corresponding to respective memory modules in the resource allocation system based on the memory allocation unit in the resource allocation system;

determine one or more memory modules to be allocated and free memory sizes corresponding to the one or more memory modules to be allocated based on the memory allocation status corresponding to the respective memory modules; and

in response to a free memory size of a first memory module in the one or more memory modules to be allocated being greater than or equal to the required memory capacity, determine the first memory module as the target memory module;

the memory management unit is further configured to:

in response to a memory size of any one of the one or more memory modules to be allocated being less than the required memory capacity, determine designated memory modules as the target memory module, wherein the designated memory modules comprise at least two memory modules to be allocated;

the memory management unit is further configured to:

obtain an initial start address, an initial end address, and a target memory size corresponding to the target memory module;

determine a target end address based on the target memory size and the memory start address through the memory address router; and

translate the initial start address to the memory start address, and translate the initial end address to the target end address.