Resource key tree method and system for recursive tree modeling programs

A recursive tree and resource technology, applied in the field of resource key tree method and system for recursive tree modeling program, can solve design and other problems, and achieve the effect of improving the scope of application and resource allocation performance

Active Publication Date: 2021-03-23
SHENZHEN INST OF ADVANCED TECH
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The purpose of the present invention is to provide a resource key tree method for recursive tree modeling program based on banker's algorithm, aiming to solve the problem that the existing resource request is modeled as a recursive tree without designing a special dead key according to the particularity of the recursive tree structure. Technical Problems of Lock Avoidance Algorithms

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Resource key tree method and system for recursive tree modeling programs
  • Resource key tree method and system for recursive tree modeling programs
  • Resource key tree method and system for recursive tree modeling programs

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0027] as attached Figure 1-5 Shown, airborne light of the present invention is a kind of resource key tree method for recursive tree modeling program, comprises the following steps:

[0028] S1. Modeling the resource request program as a recursive tree model;

[0029] S2. Initialize the safety detection algorithm, and use the algorithm to calculate the lower bound of the resources required by the target node to perform tasks;

[0030] S3. Calculate the difference between the available resources and the lower bound of the resource, if the difference is positive, allocate resources to the target node; if the difference is negative, reclaim the resource, to avoid deadlock;

[0031] The resource lower bound of the target node includes the minimum resource requirements of the target node and all its child nodes.

[0032] The safety detection in the above resource key tree method is to perform deadlock judgment or resource allocation according to the minimum resource that can pr...

Embodiment 2

[0047] as attached image 3 As shown, in order to solve the above technical problems, the present invention also provides a resource key tree system for recursive tree modeling programs, including the following units:

[0048] a modeling unit for modeling the resource request program as a recursive tree model;

[0049] A resource lower bound calculation unit, connected to the modeling unit, used to calculate the resource lower bound required by the target node for performing tasks and detect whether the resource request is safe;

[0050] A resource allocation unit, connected to the resource lower bound calculation unit, for calculating the difference between available resources and the resource lower bound, if the difference is positive, allocate resources to the target node; if the difference is negative, recycle resources , to avoid deadlock;

[0051] The resource lower bound of the target node includes the minimum resource requirements of the target node and all its child...

Embodiment 3

[0056] In order to better illustrate the technical solution of the present invention, the following are detailed steps during specific implementation;

[0057] as attached Figure 4As shown, the execution of the program consists of two phases, a tree output tree phase, which starts each task computation in a top-down manner (southbound), first allocating the resources it needs, and then launching its A subtask thread, this process is repeated recursively by all its subtasks until the leaf task is complete; another input tree stage is then started, stepping through the recursive process from bottom to top (northbound) until the root task is complete. Thus, a program's resource request graph 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, for example Figure 4 , for node C, from the output tree stage, A i...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

Disclosed are a resource key tree algorithm and system for a recursive tree modeling program, wherein the algorithm and system are applicable to the technical field of photoelectricity. With the aim of solving the problem that, in the case where a resource request can be modeled into a recursive tree by means of an existing algorithm, no special deadlock algorithm is designed according to the particularity of a recursive tree structure, a resource request program is firstly modeled into a recursive tree model; secondly, a security detection algorithm is initialized, and a resource lower bound required by the execution task of a target node is calculated by means of the algorithm; and then, a difference value between an available resource and the resource lower bound is calculated, and if the difference value is positive, a resource is allocated to the target node, and if the difference value is negative, a resource is recovered to avoid a deadlock. Therefore, the resource utilization rate and calculation performance of the system are effectively improved.

Description

technical field [0001] The invention belongs to the field of optoelectronic technology, in particular to a resource key tree method and system for a recursive tree modeling program. Background technique [0002] In existing computer system resource allocation, the resource request program is often modeled as a recursive tree, which can represent its inherent parallelism. Each node in the recursive tree tree represents a computing task, and they request m types of resources. Resources refer to various resources such as cpu, gpu, memory, and hard disk that are needed when the program is running, but improper allocation of resources will cause program deadlock. The execution of a recursive program is divided into two phases, the output tree and the input tree. The output tree represents that if a tree node wants to execute and request resource allocation, it must first complete the execution and resource allocation of its ancestor nodes, which is the stage of execution from t...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & AuthorityPatents(China)
IPC IPC(8): G06F9/52G06F9/50
CPCG06F9/50G06F9/52
Inventor王洋李敏须成忠
OwnerSHENZHEN INST OF ADVANCED TECH