WO2020125427A1 - 针对递归树建模程序的资源关键树算法及系统 - Google Patents
针对递归树建模程序的资源关键树算法及系统 Download PDFInfo
- Publication number
- WO2020125427A1 WO2020125427A1 PCT/CN2019/123333 CN2019123333W WO2020125427A1 WO 2020125427 A1 WO2020125427 A1 WO 2020125427A1 CN 2019123333 W CN2019123333 W CN 2019123333W WO 2020125427 A1 WO2020125427 A1 WO 2020125427A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- resource
- target node
- node
- tree
- resources
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
Definitions
- the invention belongs to the field of optoelectronic technology, and particularly relates to a resource key tree algorithm and system for a recursive tree modeling program.
- the resource request program is often modeled as a recursive tree, which can express its inherent parallelism.
- Each node in the recursive tree represents a computing task, and they request m types of resources.
- Resources refer to various resources such as CPU, GPU, memory, hard disk, etc. required when the program is running, but improper allocation of resources will cause a deadlock of the program.
- the execution of the recursive program is divided into two stages, the output tree and the input tree.
- the output tree represents the execution of the tree node and requests for resource allocation. It must first complete the execution and resource allocation of its ancestor nodes, which is the stage of execution from top to bottom.
- the input tree represents the completion of the release of computing tasks from bottom to top. The stage of returning in turn.
- the purpose of the present invention is to provide a resource key tree algorithm for a recursive tree modeling program based on banker's algorithm, which aims to solve the problem that the existing resource request is not specifically designed according to the particularity of the recursive tree structure when it is modeled as a recursive tree
- the technical problem of lock avoidance algorithm is to provide a resource key tree algorithm for a recursive tree modeling program based on banker's algorithm, which aims to solve the problem that the existing resource request is not specifically designed according to the particularity of the recursive tree structure when it is modeled as a recursive tree.
- the present invention provides a resource key tree algorithm for a recursive tree modeling program, including the following steps:
- the resource lower bound of the target node includes the minimum resource requirements of the target node and all its child nodes.
- step S3 can allocate resources to the target node, then use the resource lower bound of the target node's parent node as the target node's relaxation resource.
- the present invention also provides a resource key tree system for a recursive tree modeling program, including the following units:
- the modeling unit is used to model the resource request program as a recursive tree model
- a resource lower bound calculation unit connected to the modeling unit, is used to calculate the resource lower bound required by the target node to perform tasks and detect whether the resource request is safe;
- a resource allocation unit connected to the resource lower bound calculation unit, is used to calculate the difference between the available resources and the resource lower bound, if the difference is positive, the target node is assigned resources; if the difference is negative, the resource is recovered To avoid deadlock;
- the resource lower bound of the target node includes the minimum resource requirements of the target node and all its child nodes.
- it also includes;
- a relaxation resource calculation unit is connected to the resource allocation unit, and is configured to use the resource lower bound of the target node's parent node as the relaxation resource of the target node when the resource allocation unit allocates resources to the target node.
- the resource key tree algorithm and system for the recursive tree modeling program of the present invention introduces the concept of a security detection algorithm into this algorithm.
- the resource request of its branch structure is taken into consideration.
- the lower bound of task execution resources for each node is raised, which improves the application scope and resource allocation performance of the resource requester in practical applications.
- FIG. 1 is a basic algorithm structure diagram of a resource key tree algorithm for a recursive tree modeling program of the present invention
- FIG. 2 is a complete algorithm structure diagram of the resource key tree algorithm for the recursive tree modeling program of the present invention
- FIG. 3 is a functional unit block diagram of a resource key tree system for a recursive tree modeling program of the present invention
- FIG. 4 is a schematic diagram of the recursive tree modeling program of the present invention.
- 5 is a flowchart of the security detection algorithm of the present invention.
- the airborne light-weight resource-critical tree algorithm for a recursive tree modeling program of the present invention includes the following steps:
- the resource lower bound of the target node includes the minimum resource requirements of the target node and all its child nodes.
- the security detection in the above resource key tree algorithm is to perform deadlock judgment or resource allocation according to the minimum resource that can prevent the node from deadlocking during deadlock detection.
- step S3 can allocate resources to the target node, then use the resource lower bound of the target node's parent node as the target node's relaxation resource.
- the security detection algorithm in step S2 includes the following steps:
- u is the target node
- v and v' are the left and right children of u in the input tree stage, respectively;
- N(u) is the resource lower bound of the target node
- ru is the resource required by the target node itself.
- N'(u) is the relaxation resource of the target node
- root is the root node
- v is the parent node of the target node output tree stage
- N(v) is the lower bound of the resource of the parent node of the target node output tree stage
- rv is the target
- the parent node itself needs resources in the node's output tree stage.
- the present invention also provides a resource key tree system for a recursive tree modeling program, including the following units:
- the modeling unit is used to model the resource request program as a recursive tree model
- a resource lower bound calculation unit connected to the modeling unit, is used to calculate the resource lower bound required by the target node to perform tasks and detect whether the resource request is safe;
- a resource allocation unit connected to the resource lower bound calculation unit, is used to calculate the difference between the available resources and the resource lower bound, if the difference is positive, the target node is assigned resources; if the difference is negative, the resource is recovered To avoid deadlock;
- the resource lower bound of the target node includes the minimum resource requirements of the target node and all its child nodes.
- it also includes;
- a relaxation resource calculation unit is connected to the resource allocation unit, and is configured to use the resource lower bound of the target node's parent node as the relaxation resource of the target node when the resource allocation unit allocates resources to the target node.
- the second embodiment is to encapsulate the algorithm of the first embodiment into a module or unit and add it to the resource scheduling system of the computer kernel.
- the interface of the module allocates resources such as memory and hard disk to achieve the desired target effect.
- the execution of the program includes two stages, a tree output tree stage, start each task calculation in a top-down manner (southbound), first allocate its required resources, and then in the possible In the case of starting its subtask thread, this process is recursively repeated by all its subtasks until the leaf task is completed; then another input tree stage is started, and the recursive process is gradually completed from the bottom to the top (northward) until the root task is completed. Therefore, the resource request graph of the program can be obtained by combining the output tree and input tree stages into a recursive tree. Given this model, the parent and child nodes of each node can be defined from the perspective of the output tree and the input tree.
- the number of resources, the key tree for calculating resources, that is, the minimum resource N(u) that needs to be allocated for each node, is calculated as follows:
- v and v' are the left and right children of u in the input tree stage, respectively, so that the minimum resource (resource lower bound) required for each node is calculated instead of the simple addition of the resources required by all child nodes.
- node C (11,3) represents the resource ru requested by the node
- ⁇ 36,10> represents the lower bound N(u) of the resource to be allocated by the node
- node C left child N (u) is ⁇ 7,7>
- the right child N(u) is ⁇ 25,2>
- the ready queue Qr is assigned to the running variable Q and the sleep state node that may be released after the running state node is run is enqueued;
- the node of queue Q cyclically dequeues, reclaims resources, determines whether the available resources can meet the resources required by the ready state node, and completes the security check;
- N(u) is the resource lower bound of the completed subtree, and whenever the allocation of node u is checked in the real operation, the father node of its output tree has been allocated Resources, which can be used to estimate the relaxation resources of its child nodes (ie, the target node u).
- N'(u) is the relaxation resource of the target node
- root is the root node
- v is the parent node of the target node output tree stage
- N(v) is the lower bound of the resource of the parent node of the target node output tree stage
- rv is the target
- the parent node itself needs resources in the node's output tree stage.
- the application program needs to perform resource scheduling when the system or the operating system needs to allocate resources for the recursive tree modeling program, call the module's interface to the memory, hard disk, etc. To allocate resources to achieve the desired target effect.
- the concept of resource key algorithm is introduced. After fully considering the demand for execution resources of the branch structure of the tree, the execution resource of each node task is obtained Lower bound and avoid deadlock, allocate resources according to resource lower bound, greatly improve the efficiency of program execution.
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)
- Debugging And Monitoring (AREA)
Abstract
Description
Claims (7)
- 一种针对递归树建模程序的资源关键树算法,其特征在于,包括以下步骤:S1.将资源请求程序建模为递归树模型;S2.初始化安全检测算法,并采用该算法计算目标节点的执行任务所需的资源下界;S3.计算可用资源与所述资源下界的差值,若差值为正则为所述目标节点分配资源;若所述差值为负则回收资源,避免死锁;所述目标节点的资源下界包括目标节点及其所有子节点的最小资源需求。
- 如权利要求1所述的资源关键树算法,其特征在于,还包括以下步骤;S4.若步骤S3可以为所述目标节点分配资源,则利用所述目标节点的父节点的资源下界为所述目标节点的放松资源。
- 如权利要求2所述的资源关键树算法,其特征在于,所述步骤S2中的安全检测算法包括以下步骤:D1.将就绪队列中的所述目标节点赋值给局部变量,D2.遍历局部变量中的目标节点的所有子节点,D3.将所有子节点调入运行队列;D4.遍历所述运行队列的每个结点,当运行队列中的所有节点都被执行时,统计所需资源作为目标节点的最小资源需求;当可用资源不足以满足运行队列中节点的运行需求时,返回不安全信号。
- 如权利要求3所述的平台,其特征在于,所述资源下界采用以下表达式计算:N(u)=ru+MAX{N(v),N(v')};其中,u为所述目标节点,v和v'分别是u在输入树阶段的左孩子和右孩子;N(u)为所述目标节点的资源下界,ru为所述目标节点自身所需资源。
- 如权利要求4所述的资源关键树算法,其特征在于,若所述目标节点为根节点,其放松资源采用以下表达式计算:N'(u)=N(root);若所述目标节点不为根节点,其放松资源采用以下表达式计算:N'(u)=N(v)-rv;其中,N'(u)为目标节点的放松资源,root为根节点;v是目标节点输出树阶段的父节点,N(v)为目标节点输出树阶段的父节点的资源下界,rv为目标节点的输出树阶段的父节点自身所需资源。
- 一种针对递归树建模程序的资源关键树系统,其特征在于,包括以下单元:建模单元,用于将资源请求程序建模为递归树模型;资源下界计算单元,与所述建模单元连接,用于计算目标节点的执行任务所需的资源下界以及检测资源请求是否安全;资源分配单元,与所述资源下界计算单元连接,用于计算可用资源与所述资源下界的差值,若差值为正则为所述目标节点分配资源;若所述差值为负则回收资源,避免死锁;所述目标节点的资源下界包括目标节点及其所有子节点的最小资源需求。
- 如权利要求6所述的资源关键树系统,其特征在于,还包括;放松资源计算单元,与所述资源分配单元连接,用于当所述资源分配单元为所述目标节点分配资源时利用所述目标节点的父节点的资源下界为所述目标节点的放松资源。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811546982.9 | 2018-12-18 | ||
| CN201811546982.9A CN109815021B (zh) | 2018-12-18 | 2018-12-18 | 针对递归树建模程序的资源关键树方法及系统 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020125427A1 true WO2020125427A1 (zh) | 2020-06-25 |
Family
ID=66602113
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/123333 Ceased WO2020125427A1 (zh) | 2018-12-18 | 2019-12-05 | 针对递归树建模程序的资源关键树算法及系统 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109815021B (zh) |
| WO (1) | WO2020125427A1 (zh) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109815021B (zh) * | 2018-12-18 | 2021-03-23 | 深圳先进技术研究院 | 针对递归树建模程序的资源关键树方法及系统 |
| CN110347516B (zh) * | 2019-06-27 | 2023-03-24 | 河北科技大学 | 一种面向细粒度读写锁的软件自动重构方法及装置 |
| CN113360290B (zh) * | 2020-03-04 | 2023-02-03 | 华为技术有限公司 | 死锁检测方法和装置 |
| CN112486598A (zh) * | 2020-10-28 | 2021-03-12 | 武汉中科通达高新技术股份有限公司 | 一种使用管道技术处理图片的方法、系统及电子装置 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7703102B1 (en) * | 1999-08-23 | 2010-04-20 | Oracle America, Inc. | Approach for allocating resources to an apparatus based on preemptable resource requirements |
| CN105072049A (zh) * | 2015-08-31 | 2015-11-18 | 北京理工大学 | 面向数据中心多层次弹性应用的资源分配方法及装置 |
| CN106528287A (zh) * | 2015-09-09 | 2017-03-22 | 阿里巴巴集团控股有限公司 | 计算机系统资源分配方法和装置 |
| CN109815021A (zh) * | 2018-12-18 | 2019-05-28 | 深圳先进技术研究院 | 针对递归树建模程序的资源关键树算法及系统 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6381742B2 (en) * | 1998-06-19 | 2002-04-30 | Microsoft Corporation | Software package management |
| US8091088B2 (en) * | 2005-02-22 | 2012-01-03 | Microsoft Corporation | Method and system for hierarchical resource management involving hard and soft resource limits |
| CN101394656B (zh) * | 2007-09-21 | 2013-10-09 | 电信科学技术研究院 | 一种共享信道的资源分配方法及装置 |
| CN103473137B (zh) * | 2013-09-16 | 2017-04-12 | 东软集团股份有限公司 | 避免死锁的资源分配方法及系统 |
| US9417918B2 (en) * | 2013-11-20 | 2016-08-16 | International Business Machines Corporation | Computing session workload scheduling and management of parent-child tasks |
-
2018
- 2018-12-18 CN CN201811546982.9A patent/CN109815021B/zh active Active
-
2019
- 2019-12-05 WO PCT/CN2019/123333 patent/WO2020125427A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7703102B1 (en) * | 1999-08-23 | 2010-04-20 | Oracle America, Inc. | Approach for allocating resources to an apparatus based on preemptable resource requirements |
| CN105072049A (zh) * | 2015-08-31 | 2015-11-18 | 北京理工大学 | 面向数据中心多层次弹性应用的资源分配方法及装置 |
| CN106528287A (zh) * | 2015-09-09 | 2017-03-22 | 阿里巴巴集团控股有限公司 | 计算机系统资源分配方法和装置 |
| CN109815021A (zh) * | 2018-12-18 | 2019-05-28 | 深圳先进技术研究院 | 针对递归树建模程序的资源关键树算法及系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109815021A (zh) | 2019-05-28 |
| CN109815021B (zh) | 2021-03-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020125427A1 (zh) | 针对递归树建模程序的资源关键树算法及系统 | |
| Kulkarni et al. | Survey on Hadoop and Introduction to YARN. | |
| US9367359B2 (en) | Optimized resource management for map/reduce computing | |
| CN113205417B (zh) | 一种面向联盟链的交易并行处理方法及系统 | |
| CN114741207A (zh) | 一种基于多维度组合并行的gpu资源调度方法和系统 | |
| CN112612613B (zh) | 用于在虚拟分布式异构环境下实现多gpu调度的方法和系统 | |
| CN107291550B (zh) | 一种针对迭代应用的Spark平台资源动态分配方法及系统 | |
| CN104536937A (zh) | 基于cpu-gpu异构集群的大数据一体机实现方法 | |
| CN111522640A (zh) | 计算图的并行执行方法和设备 | |
| CN107220111A (zh) | 一种基于任务窃取的任务调度方法及系统 | |
| CN112948066A (zh) | 一种基于异构资源的Spark任务调度方法 | |
| US10102098B2 (en) | Method and system for recommending application parameter setting and system specification setting in distributed computation | |
| CN120196421A (zh) | 一种gpu资源虚拟化算力调度的方法及装置 | |
| Zhao et al. | Minimizing stack memory for partitioned mixed-criticality scheduling on multiprocessor platforms | |
| CN113051049B (zh) | 任务调度系统、方法、电子设备及可读存储介质 | |
| CN118051331A (zh) | 资源分配方法及系统 | |
| CN107870813A (zh) | 一种分布式算法处理数据的方法及装置 | |
| CN105607955A (zh) | 一种计算任务分配的方法及装置 | |
| Das et al. | Data races and the discrete resource-time tradeoff problem with resource reuse over paths | |
| CN113934525A (zh) | 一种基于正负反馈负载调度算法的Hadoop集群任务调度方法 | |
| CN110245022B (zh) | 海量数据下并行Skyline处理方法及系统 | |
| CN119783340A (zh) | 基于负载均衡的并行仿真方法、介质及设备 | |
| CN112463397B (zh) | lock-free的分布式死锁避免方法及装置、计算机设备及可读存储介质 | |
| CN106775925A (zh) | 一种虚拟机cpu的限额处理方法和装置 | |
| Wang et al. | On optimal budget-driven scheduling algorithms for MapReduce jobs in the hetereogeneous cloud |
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: 19898914 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: 19898914 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 11.11.2021) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19898914 Country of ref document: EP Kind code of ref document: A1 |