CN110659112A - Algorithm scheduling method and system - Google Patents

Algorithm scheduling method and system Download PDF

Info

Publication number
CN110659112A
CN110659112A CN201810699466.3A CN201810699466A CN110659112A CN 110659112 A CN110659112 A CN 110659112A CN 201810699466 A CN201810699466 A CN 201810699466A CN 110659112 A CN110659112 A CN 110659112A
Authority
CN
China
Prior art keywords
algorithm
sub
scheduling
algorithms
cpu
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.)
Granted
Application number
CN201810699466.3A
Other languages
Chinese (zh)
Other versions
CN110659112B (en
Inventor
梅文庆
李淼
杨胜
李程
邱岳烽
郭赞
杨烁
罗云飞
凡林斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CRRC Zhuzhou Institute Co Ltd
Original Assignee
CRRC Zhuzhou Institute Co Ltd
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 CRRC Zhuzhou Institute Co Ltd filed Critical CRRC Zhuzhou Institute Co Ltd
Priority to CN201810699466.3A priority Critical patent/CN110659112B/en
Publication of CN110659112A publication Critical patent/CN110659112A/en
Application granted granted Critical
Publication of CN110659112B publication Critical patent/CN110659112B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • 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]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5017Task decomposition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/508Monitor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to the technical field of multiprocessors, and discloses an algorithm scheduling method and system for reasonably integrating computing resources of a multiprocessor efficiently and orderly. The method comprises the following steps: splitting an application object algorithm into at least two associated sub-algorithms; counting the resource consumption and response speed of each sub-algorithm required by processing in the main processor; determining a scheduling criterion related to the real-time load of the main processor according to the resource consumption and the response speed; and distributing the related sub-algorithms to the master processor or the slave processor for calculation processing according to the scheduling criteria.

Description

Algorithm scheduling method and system
Technical Field
The invention relates to the technical field of multiprocessors, in particular to an algorithm scheduling method and system.
Background
An FPGA (Field-Programmable Gate Array), which is a product of further development based on Programmable devices such as PAL, GAL, CPLD, etc. The circuit is a semi-custom circuit in the field of Application Specific Integrated Circuits (ASIC), not only overcomes the defects of the custom circuit, but also overcomes the defect that the number of gate circuits of the original programmable device is limited.
The FPGA adopts a concept of a Logic Cell array lca (Logic Cell array), and includes three parts, namely, a configurable Logic module clb (configurable Logic block), an input Output module iob (input Output block), and an internal connection (Interconnect). FPGAs are programmable devices that have a different structure than traditional logic circuits and gate arrays (e.g., PAL, GAL, and CPLD devices). The FPGA utilizes small lookup tables (16 × 1RAM) to realize combinational logic, each lookup table is connected to the input end of a D flip-flop, and the flip-flops drive other logic circuits or drive I/O (input/output) circuits, so that basic logic unit modules capable of realizing both combinational logic functions and sequential logic functions are formed, and the modules are connected with each other or connected to an I/O (input/output) module by utilizing metal connecting wires. The logic of the FPGA is implemented by loading programming data into the internal static memory cells, the values stored in the memory cells determine the logic function of the logic cells and the way of the connections between the modules or between the modules and the I/O and finally the functions that can be implemented by the FPGA, which allows an unlimited number of programming.
FPGAs are generally applicable to hardware acceleration of algorithms, however, in a multiprocessor system, how to utilize resources of multiple processors for co-processing of the same application object has been a problem commonly faced by those skilled in the art.
Disclosure of Invention
The invention aims to disclose an algorithm scheduling method and system to reasonably and efficiently and orderly integrate computing resources of a multiprocessor.
In order to achieve the above object, the present invention discloses an algorithm scheduling method, which comprises:
splitting an application object algorithm into at least two associated sub-algorithms;
counting the resource consumption and response speed of each sub-algorithm required by processing in the main processor;
determining a scheduling criterion related to the real-time load of the main processor according to the resource consumption and the response speed;
and distributing the related sub-algorithms to the master processor or the slave processor for calculation processing according to the scheduling criteria.
Preferably, the application objects of the invention comprise a rectification control object and an inversion control object, and each application object adopts the same scheduling criterion; the split sub-algorithm is a sub-algorithm with strict requirements on resource consumption and response speed.
Preferably, the slave processor adopts an FPGA chip, the master processor adopts a CPU, and the scheduling criteria include:
establishing a coordinate system, wherein the coordinate system takes the response speed as an abscissa and takes the resource consumption as an ordinate;
carrying out normalization processing on the resource consumption and the response speed counted by each sub-algorithm of the same application object;
drawing a circle by taking a uniform classification threshold value of each application object as a radius, defaulting a sub-algorithm in the circle as a dynamic scheduling algorithm, defaulting an algorithm close to the horizontal coordinate outside the circle to be allocated to the FPGA for execution, and defaulting an algorithm close to the vertical coordinate outside the circle to be allocated to the CPU for execution;
when the real-time load of the CPU is smaller than a first load threshold value, distributing all dynamic scheduling algorithms in a circle to the CPU for execution;
when the real-time load of the CPU is greater than or equal to a first load threshold and smaller than a second load threshold, sequencing the response speed of the in-circle dynamic scheduling algorithm, and distributing partial sub-algorithms with high response speed requirements to the FPGA for execution;
when the real-time load of the CPU is greater than or equal to a second load threshold value and less than a third load threshold value, distributing all dynamic scheduling algorithms in a circle to the FPGA for execution;
and when the real-time load of the CPU is greater than or equal to a third load threshold value, transferring the sub-algorithm with the maximum resource consumption in the CPU to the FPGA for execution.
Corresponding to the method, the invention also discloses an algorithm scheduling system, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the steps of the method when executing the computer program.
The invention has the following beneficial effects:
the application object algorithm is divided into at least two associated sub-algorithms, and the sub-algorithms are reasonably, efficiently and orderly integrated in computing resources among the multiple processors by relying on a scheduling criterion, so that the overall performance of the system is improved.
The present invention will be described in further detail below with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a flowchart of an algorithm scheduling method of a preferred embodiment of the present invention;
fig. 2 is a diagram illustrating a matching scheduling criterion according to this embodiment.
Detailed Description
The embodiments of the invention will be described in detail below with reference to the drawings, but the invention can be implemented in many different ways as defined and covered by the claims.
Example 1
The embodiment discloses an algorithm scheduling method which is applied to a multiprocessor system. As an example, the multiprocessor system of the present embodiment includes a CPU main processor and an FPGA sub processor.
As shown in fig. 1, the method of the present embodiment includes:
and step S1, splitting the application object algorithm into at least two associated sub-algorithms.
In this step, the split sub-algorithm is a sub-algorithm with strict requirements on resource consumption and response speed. The application object refers to a control object for specific software and hardware products in the fields of locomotives, subways, industrial transmission and the like. For example: related application objects include, but are not limited to: the rectification control target may be an inverter control target or the like.
On the other hand, in the embodiment, different application objects have different algorithms, and algorithms related to some application objects are relatively low in complexity, and relatively few sub-algorithms can be stripped for performing algorithm scheduling. However, some sub-algorithms may be the same for different application objects.
And step S2, counting the resource consumption and response speed required by the processing of each sub algorithm in the main processor.
In this step, if the main processor is a CPU, the corresponding resource consumption is mainly the CPU occupancy rate.
And step S3, determining a scheduling criterion related to the real-time load of the main processor according to the resource consumption and the response speed.
In this step, to simplify system design and reduce management and maintenance costs, it is preferable that the same scheduling criteria be used for each application object. As shown in fig. 2, one specific scheduling criteria may be:
establishing a coordinate system, wherein the coordinate system takes the response speed as an abscissa and takes the resource consumption as an ordinate; carrying out normalization processing on the resource consumption and the response speed counted by each sub-algorithm of the same application object; drawing a circle by taking a uniform classification threshold of each application object as a radius, defaulting a sub-algorithm in the circle as a dynamic scheduling algorithm, defaulting an algorithm close to the horizontal coordinate outside the circle to be allocated to FPGA (field programmable gate array) execution, and defaulting an algorithm close to the vertical coordinate outside the circle to be allocated to CPU (central processing unit) execution; when the real-time load of the CPU is smaller than a first load threshold value, distributing all dynamic scheduling algorithms in the circle to the CPU for execution; when the real-time load of the CPU is greater than or equal to the first load threshold and less than the second load threshold, sequencing the response speed of the in-circle dynamic scheduling algorithm, and distributing part of sub-algorithms with high response speed requirements to the FPGA for execution; when the real-time load of the CPU is greater than or equal to the second load threshold value and less than a third load threshold value, distributing all dynamic scheduling algorithms in the circle to the FPGA for execution; and when the real-time load of the CPU is greater than or equal to a third load threshold value, transferring the sub-algorithm with the largest resource consumption in the CPU to the FPGA for execution.
In the invention, the classification threshold is used for dividing each sub-algorithm into three categories of a dynamic scheduling algorithm, a default CPU execution algorithm and a default FPGA execution algorithm; corresponding to fig. 2, the classification threshold is 0.7, and the discrete points in the upper right corner represent a corresponding sub-algorithm. The criterion for determining the proximity abscissa or ordinate may be y ═ x as a boundary, and taking the first quadrant as an example, the left side of the boundary is proximate to the ordinate, and the right side of the boundary is proximate to the abscissa.
Therefore, the scheduling criterion of the embodiment has ordered levels, high refinement degree and convenient implementation.
And step S4, distributing the related sub-algorithms to the master processor or the slave processor according to the scheduling criteria for calculation processing.
In this step, preferably, at least two sub-algorithms in series assigned to the FPGA execution can be executed by time-division multiplexing of the reconfiguration partitions for the same FPGA.
In summary, the method of the embodiment splits the application object algorithm into at least two associated sub-algorithms, and reasonably, efficiently and orderly integrates the computing resources of the sub-algorithms among the multiple processors by relying on the scheduling criteria, thereby improving the overall performance of the system.
Example 2
Corresponding to the above method, the present embodiment discloses an algorithm scheduling system, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
Similarly, the system of the embodiment splits the application object algorithm into at least two associated sub-algorithms, and reasonably, efficiently and orderly integrates the computing resources of the sub-algorithms among the multiple processors by relying on the scheduling criteria, thereby improving the overall performance of the system.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. An algorithm scheduling method, comprising:
splitting an application object algorithm into at least two associated sub-algorithms;
counting the resource consumption and response speed of each sub-algorithm required by processing in the main processor;
determining a scheduling criterion related to the real-time load of the main processor according to the resource consumption and the response speed;
and distributing the related sub-algorithms to the master processor or the slave processor for calculation processing according to the scheduling criteria.
2. The algorithmic scheduling method of claim 1, wherein the application objects comprise a rectification control object and an inversion control object, and each application object uses the same scheduling criteria.
3. The algorithm scheduling method according to claim 2, wherein the slave processor adopts an FPGA chip, the master processor adopts a CPU, and the scheduling criteria include:
establishing a coordinate system, wherein the coordinate system takes the response speed as an abscissa and takes the resource consumption as an ordinate;
carrying out normalization processing on the resource consumption and the response speed counted by each sub-algorithm of the same application object;
drawing a circle by taking a uniform classification threshold value of each application object as a radius, defaulting a sub-algorithm in the circle as a dynamic scheduling algorithm, defaulting an algorithm close to the horizontal coordinate outside the circle to be allocated to the FPGA for execution, and defaulting an algorithm close to the vertical coordinate outside the circle to be allocated to the CPU for execution;
when the real-time load of the CPU is smaller than a first load threshold value, distributing all dynamic scheduling algorithms in a circle to the CPU for execution;
when the real-time load of the CPU is greater than or equal to a first load threshold and smaller than a second load threshold, sequencing the response speed of the in-circle dynamic scheduling algorithm, and distributing partial sub-algorithms with high response speed requirements to the FPGA for execution;
when the real-time load of the CPU is greater than or equal to a second load threshold value and less than a third load threshold value, distributing all dynamic scheduling algorithms in a circle to the FPGA for execution;
and when the real-time load of the CPU is greater than or equal to a third load threshold value, transferring the sub-algorithm with the maximum resource consumption in the CPU to the FPGA for execution.
4. The algorithm scheduling method of any one of claims 1 to 3, further comprising:
and executing at least two serially connected sub-algorithms which are distributed to the FPGA through time division multiplexing of the reconfiguration partitions of the same FPGA.
5. The algorithm scheduling method of any one of claims 1 to 3 wherein the split sub-algorithms are sub-algorithms with strict requirements on resource consumption and response speed.
6. An algorithmic scheduling system comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 5 when executing the computer program.
CN201810699466.3A 2018-06-29 2018-06-29 Algorithm scheduling method and system Active CN110659112B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810699466.3A CN110659112B (en) 2018-06-29 2018-06-29 Algorithm scheduling method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810699466.3A CN110659112B (en) 2018-06-29 2018-06-29 Algorithm scheduling method and system

Publications (2)

Publication Number Publication Date
CN110659112A true CN110659112A (en) 2020-01-07
CN110659112B CN110659112B (en) 2023-07-18

Family

ID=69026878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810699466.3A Active CN110659112B (en) 2018-06-29 2018-06-29 Algorithm scheduling method and system

Country Status (1)

Country Link
CN (1) CN110659112B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080134185A1 (en) * 2006-11-30 2008-06-05 Alexandra Fedorova Methods and apparatus for scheduling applications on a chip multiprocessor
JP2009116813A (en) * 2007-11-09 2009-05-28 Japan Aerospace Exploration Agency Custom-made computer for large scale computing
US20120290725A1 (en) * 2011-05-09 2012-11-15 Oracle International Corporation Dynamic Cost Model Based Resource Scheduling In Distributed Compute Farms
CN104252383A (en) * 2014-09-16 2014-12-31 江苏科技大学 Reconfigurable-calculation hardware and software task partitioning method based on chaotic particle swarm optimization algorithm
US20160004567A1 (en) * 2014-07-02 2016-01-07 International Business Machines Corporation Scheduling applications in a clustered computer system
CN105808328A (en) * 2014-12-31 2016-07-27 杭州华为数字技术有限公司 Task scheduling method, device and system
CN106886690A (en) * 2017-01-25 2017-06-23 人和未来生物科技(长沙)有限公司 It is a kind of that the heterogeneous platform understood is calculated towards gene data
CN106980533A (en) * 2016-01-18 2017-07-25 杭州海康威视数字技术股份有限公司 Method for scheduling task, device and electronic equipment based on heterogeneous processor
US20170264486A1 (en) * 2016-03-10 2017-09-14 Velocity Technology Solutions, Inc. Systems and methods for management of cloud computing resources for information systems
CN107239341A (en) * 2017-05-27 2017-10-10 郑州云海信息技术有限公司 A kind of resource translation method, system and resources of virtual machine scheduling system
WO2018076238A1 (en) * 2016-10-27 2018-05-03 华为技术有限公司 Heterogeneous system, computation task assignment method and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080134185A1 (en) * 2006-11-30 2008-06-05 Alexandra Fedorova Methods and apparatus for scheduling applications on a chip multiprocessor
JP2009116813A (en) * 2007-11-09 2009-05-28 Japan Aerospace Exploration Agency Custom-made computer for large scale computing
US20120290725A1 (en) * 2011-05-09 2012-11-15 Oracle International Corporation Dynamic Cost Model Based Resource Scheduling In Distributed Compute Farms
US20160004567A1 (en) * 2014-07-02 2016-01-07 International Business Machines Corporation Scheduling applications in a clustered computer system
CN104252383A (en) * 2014-09-16 2014-12-31 江苏科技大学 Reconfigurable-calculation hardware and software task partitioning method based on chaotic particle swarm optimization algorithm
CN105808328A (en) * 2014-12-31 2016-07-27 杭州华为数字技术有限公司 Task scheduling method, device and system
CN106980533A (en) * 2016-01-18 2017-07-25 杭州海康威视数字技术股份有限公司 Method for scheduling task, device and electronic equipment based on heterogeneous processor
US20170264486A1 (en) * 2016-03-10 2017-09-14 Velocity Technology Solutions, Inc. Systems and methods for management of cloud computing resources for information systems
WO2018076238A1 (en) * 2016-10-27 2018-05-03 华为技术有限公司 Heterogeneous system, computation task assignment method and device
CN106886690A (en) * 2017-01-25 2017-06-23 人和未来生物科技(长沙)有限公司 It is a kind of that the heterogeneous platform understood is calculated towards gene data
CN107239341A (en) * 2017-05-27 2017-10-10 郑州云海信息技术有限公司 A kind of resource translation method, system and resources of virtual machine scheduling system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DANIEL M.MUNOZ等: "Distributed approach to group control of elevator systems using fuzzy logic and FPGA implementation of dispatching algorithms", 《ENGINEERING APPLICATIONS OF ARTIFICIAL INTELLIGENCE》 *
马凯强: "基于蚁群算法的云计算任务与资源调度方法研究", 《硕士电子期刊》 *

Also Published As

Publication number Publication date
CN110659112B (en) 2023-07-18

Similar Documents

Publication Publication Date Title
US11288221B2 (en) Graph processing optimization method based on multi-FPGA accelerator interconnection
CN107273331A (en) A kind of heterogeneous computing system and method based on CPU+GPU+FPGA frameworks
KR102380776B1 (en) Accelerator controller and loading method thereof
CN109508316A (en) The equipment and system of heterogeneous computing environment
CN105808328A (en) Task scheduling method, device and system
US10963460B2 (en) Integrated circuits and methods to accelerate data queries
US11048653B2 (en) Integrated circuit inputs and outputs
CN112686379B (en) Integrated circuit device, electronic apparatus, board and computing method
US11023825B2 (en) Platform as a service cloud server and machine learning data processing method thereof
US9753769B2 (en) Apparatus and method for sharing function logic between functional units, and reconfigurable processor thereof
CN111124995A (en) Method and apparatus for processing a one-dimensional complex array by an artificial intelligence processor
CN110659112B (en) Algorithm scheduling method and system
CN111381882B (en) Data processing device and related product
CN112805727A (en) Artificial neural network operation acceleration device for distributed processing, artificial neural network acceleration system using same, and method for accelerating artificial neural network
CN107678853B (en) Method and device for scheduling graphic processing task
US20230153157A1 (en) Inter-node communication method and device based on multiple processing nodes
CN111260043A (en) Data selector, data processing method, chip and electronic equipment
US20230169031A1 (en) Method and device for constructing communication topology structure on basis of multiple processing nodes
CN110837419B (en) Reasoning engine system and method based on elastic batch processing and electronic equipment
CN111384944B (en) Full adder, half adder, data processing method, chip and electronic equipment
EP3343843A1 (en) A control plane system and method for managing a data plane amongst a plurality of equipments
Lin et al. Hardware resource manager for reconfiguration system
Dimassi et al. Reducing power consumption for system on programmable chip by scheduling tasks
CN115794026A (en) Data shifting method and device and related products
CN111381804A (en) Data comparator, data processing method, chip and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant