US-20260127037-A1 - COMPUTING RESOURCE MANAGEMENT METHOD AND COMPUTING DEVICE
Abstract
A computing resource management method is suitable for managing a computing device including processing cores. Each of the processing cores respectively includes a plurality of processor threads. The processor threads are used to execute computational programs respectively. The computing resource management method includes following steps. A static computation demand is obtained. A thread demand quantity is set based on the static computation demand. An offlineable thread quantity is determined based on the thread demand quantity. A first portion of the processor threads is blocked from a computing resource pool, using each processing core as a smallest unit, according to the first offlineable thread quantity. The computational programs to be executed are allocated on the processor threads within the computation resource pool by a task scheduler.
Inventors
- Shih-Ming Huang
- Chien-Hung Lee
- Chun-Chieh Huang
- Ling-Kang WU
Assignees
- INDUSTRIAL TECHNOLOGY RESEARCH INSTITUTE
Dates
- Publication Date
- 20260507
- Application Date
- 20250425
- Priority Date
- 20241107
Claims (20)
- 1 . A computing resource management method, suitable for managing a computing device comprising a plurality of processing cores, wherein each of the plurality of processing cores comprises a plurality of processor threads, and the plurality of processor threads are respectively used to execute a plurality of computational programs, the computing resource management method comprising: obtaining a static computation demand; setting a first thread demand quantity based on the static computation demand; determining a first offlineable thread quantity based on the first thread demand quantity; blocking a first portion of the plurality of processor threads from a computing resource pool, using each processing core as a smallest unit, according to the first offlineable thread quantity; and allocating, by a task scheduler, the computational programs respectively to the plurality of processor threads within the computation resource pool.
- 2 . The computing resource management method as described in claim 1 , further comprising: detecting a real-time workload of the processor threads, and dynamically setting a second thread demand quantity; determining a second offlineable thread quantity based on the second thread demand quantity; and blocking a second portion of the processor threads from the computing resource pool, using each processing core as the smallest unit, according to the second offlineable thread quantity.
- 3 . The computing resource management method as described in claim 2 , wherein dynamically setting the second thread demand quantity is based on: comparing whether a sum of the real-time workload and a burst workload reaches the second thread demand quantity currently adopted, and increasing the second thread demand quantity in response to that the sum of the real-time workload and the burst workload is greater than the second thread demand quantity currently adopted; and comparing whether the second thread demand quantity currently adopted is greater than a sum of the real-time workload, the burst workload and a buffer reserve value, and decreasing the second thread demand quantity in response to that the second thread demand quantity currently adopted exceeds the sum of the real-time workload, the burst workload and the buffer reserve value.
- 4 . The computing resource management method as described in claim 1 , wherein the task scheduler comprises a Linux processor scheduler.
- 5 . The computing resource management method as described in claim 1 , comprising: receiving a first application expected load via a Representational State Transfer (RESTful) application interface; receiving a second application expected load via a third-party application interface; and calculating the static computation demand based on the first application expected load and the second application expected load.
- 6 . The computing resource management method as described in claim 1 , wherein the computing device comprises M processing cores, each of the M processing cores comprising N paired processor threads, such that the computing device comprises M*N processor threads in total, and wherein the computing resource management method is configured to block k*N processor threads from the computation resource pool, wherein M and N are positive integers, and k is a positive integer between 0 and M.
- 7 . The computing resource management method as described in claim 6 , wherein in response to the k*N processor threads being blocked from the computation resource pool, the task scheduler is configured not to allocate the computational programs to the k*N processor threads, and the computing resource management method is further configured to reduce an operating frequency, an operating voltage, or an operating current of at least one of the k processing cores.
- 8 . A computing device comprising: a plurality of processing cores, each of the processing cores respectively comprises a plurality of processor threads, the processor threads being used to execute a plurality of computational programs, each processing core having an adjustable operating frequency, the processing cores configured to run a task scheduler and a computational resource regulator, the computational resource regulator is configured to: calculate a static computation demand based on an application expected load; set a first thread demand quantity based on the static computation demand; determine a first offlineable thread quantity based on the first thread demand quantity; and block a first portion of the processor threads from a computing resource pool, using each processing core as a smallest unit, according to the first offlineable thread quantity, wherein the task scheduler is used to allocate the computational programs to be executed on the processor threads within the computation resource pool.
- 9 . The computing device as described in claim 8 , wherein the processing cores are further configured to run a dynamic utilization monitor, the dynamic utilization monitor is configured to detect a real-time workload of the processor threads, and the computational resource regulator is configured to: dynamically set a second thread demand quantity based on the real-time workload; determine a second offlineable thread quantity based on the second thread demand quantity; and block a second portion of the processor threads from the computing resource pool, using each processing core as a smallest unit, according to the second offlineable thread quantity.
- 10 . The computing device as described in claim 9 , wherein the computational resource regulator dynamically sets the second thread demand quantity based on: comparing whether a sum of the real-time workload and a burst workload reaches the second thread demand quantity currently adopted, and increasing the second thread demand quantity in response to that the sum of the real-time workload and a burst workload exceeds the second thread demand quantity currently adopted; and comparing whether the second thread demand quantity currently adopted exceeds a sum of the real-time workload, the burst workload and a buffer reserve value, and decreasing the second thread demand quantity in response to that the second thread demand quantity currently adopted exceeds the sum of the real-time workload, the burst workload and the buffer reserve value.
- 11 . The computing device as described in claim 8 , wherein the task scheduler comprises a Linux processor scheduler.
- 12 . The computing device as described in claim 8 , wherein the processing cores are further configured to run a computation demand monitor, the computation demand monitor is configured to: receive a first application expected load via a Representational State Transfer (RESTful) application interface; receive a second application expected load via a third-party application interface; and calculate the static computation demand based on the first application expected load and the second application expected load.
- 13 . The computing device as described in claim 8 , wherein the computing device comprises M processing cores, each processing core respectively comprises N paired processor threads, the computing device comprising M*N processor threads, and the computational resource regulator blocks k*N processor threads from the computation resource pool, M and N are positive integers, and k is a positive integer between 0 and M.
- 14 . The computing device as described in claim 13 , wherein in response to that the k*N processor threads are blocked outside the computation resource pool, the task scheduler does not allocate the computational programs to be executed on the k*N processor threads, and the computational resource regulator is configured to reduce an operating frequency, an operating voltage, or an operating current on one of the k processing cores.
- 15 . The computing device as described in claim 8 , wherein the computing device comprises a server, a personal computer, a laptop, a smartphone, a tablet computer, an embedded system or a high-performance computing cluster.
- 16 . A computing resource management method, suitable for managing a computing device comprising a plurality of processing cores, each of the processing cores respectively comprising a plurality of processor threads, the processor threads being used to execute a plurality of computational programs respectively, the computing resource management method comprising: dynamically detecting a real-time workload of the processor threads and setting a thread demand quantity; determining an offlineable thread quantity based on the thread demand; blocking a portion of the processor threads from a computing resource pool, using each processing core as a smallest unit, according to the offlineable thread quantity; and allocating the computational programs to be executed on the processor threads within the computation resource pool by a task scheduler.
- 17 . The computing resource management method as described in claim 16 , wherein dynamically setting the thread demand quantity is based on: comparing whether a sum of the real-time workload and a burst workload reaches the thread demand quantity currently adopted, and increasing the thread demand quantity in response to that the sum of the real-time workload and the burst workload exceeds the thread demand quantity currently adopted; and comparing whether the thread demand quantity currently adopted exceeds a sum of the real-time workload, the burst workload and a buffer reserve value, and decreasing the thread demand quantity in response to that the thread demand quantity currently adopted exceeds the sum of the real-time workload, the burst workload and the buffer reserve value.
- 18 . The computing resource management method as described in claim 16 , wherein the task scheduler comprises a Linux processor scheduler.
- 19 . The computing resource management method as described in claim 16 , wherein the computing device comprises M processing cores, each processing core respectively comprises N paired processor threads, the computing device comprising M*N processor threads, and the computing resource management method is configured to block k*N processor threads from the computation resource pool, M and N are positive integers, and k is a positive integer between 0 and M.
- 20 . The computing resource management method as described in claim 19 , wherein in response to that the k*N processor threads are blocked outside the computation resource pool, the task scheduler does not allocate the computational programs to be executed on the k*N processor threads, and the computing resource management method is configured to reduce an operating frequency, an operating voltage, or an operating current on one of the k processing cores.
Description
RELATED APPLICATIONS This application claims priority to Taiwan Application Serial Number 113142802, filed Nov. 7, 2024, which is herein incorporated by reference. BACKGROUND Field of Invention This disclosure relates to the field of computer computations, and relates to resource management and scheduling techniques in computational devices. Description of Related Art As the computational capabilities of modern devices continue to improve, effectively managing and scheduling the computational resources of these devices has become a critical issue. Traditional resource management methods often fail to dynamically adapt to changes in system load, leading to resource waste or insufficient performance. This disclosure provides an improved computational resource management method aimed at enhancing resource utilization efficiency and reducing energy consumption. SUMMARY The disclosure provides a computing resource management method suitable for managing a computing device including processing cores. Each of the processing cores respectively includes a plurality of processor threads. The processor threads are used to execute computational programs respectively. The computing resource management method includes obtaining a static computation demand; setting a first thread demand quantity based on the static computation demand; determining a first offlineable thread quantity based on the first thread demand quantity; blocking a first portion of the processor threads from a computing resource pool, using each processing core as a smallest unit, according to the first offlineable thread quantity; and allocating, by a task scheduler, the computational programs to be executed on the processor threads within the computation resource pool. The disclosure provides a computing device, which includes processing cores. The processing cores respectively include processor threads. The processor threads are used to execute computational programs. Each processing core has an adjustable operating frequency. The processing cores are configured to run a task scheduler and a computational resource regulator. The computational resource regulator is configured to: calculate a static computation demand based on an application expected load; set a first thread demand quantity based on the static computation demand; determine a first offlineable thread quantity based on the first thread demand quantity; and, block a first portion of the processor threads from a computing resource pool, using each processing core as a smallest unit, according to the first offlineable thread quantity. The task scheduler is used to allocate the computational programs to be executed on the processor threads within the computation resource pool. The disclosure provides a computing resource management method, which is suitable for managing a computing device including processing cores. Each of the processing cores respectively includes processor threads. The processor threads are used to execute computational programs respectively. The computing resource management method includes: dynamically detecting a real-time workload of the processor threads and setting a thread demand quantity; determining an offlineable thread quantity based on the thread demand; blocking a portion of the processor threads from a computing resource pool, using each processing core as a smallest unit, according to the offlineable thread quantity; and allocating the computational programs to be executed on the processor threads within the computation resource pool by a task scheduler. It is to be understood that both the foregoing general description and the following detailed description are by examples, and are intended to provide further explanation of the invention as claimed. BRIEF DESCRIPTION OF THE DRAWINGS The disclosure can be more fully understood by reading the following detailed description of the embodiment, with reference made to the accompanying drawings as follows: FIG. 1 is a schematic diagram illustrating a computing device according to some embodiments of the disclosure. FIG. 2 is a flowchart illustrating a computing resource management method according to some embodiments of this disclosure. FIG. 3 is a schematic diagram illustrating a first thread demand quantity according to some embodiments. FIG. 4A is a schematic diagram illustrating an allocation of multiple computational programs among the processor threads without employing the computing resource management method of this disclosure. FIG. 4B is a schematic diagram illustrating another allocation of multiple computational programs among the processor threads with employing the computing resource management method of this disclosure. FIG. 5 is a flowchart illustrating a computing resource management method in accordance with some embodiments of this disclosure. FIG. 6A, FIG. 6B, and FIG. 6C are schematic diagrams illustrating dynamic settings of the second thread demand volume under different real-time workloads