CN117032941B - Real-time task scheduling system based on many-core processor and control method thereof - Google Patents

Real-time task scheduling system based on many-core processor and control method thereof Download PDF

Info

Publication number
CN117032941B
CN117032941B CN202311296412.XA CN202311296412A CN117032941B CN 117032941 B CN117032941 B CN 117032941B CN 202311296412 A CN202311296412 A CN 202311296412A CN 117032941 B CN117032941 B CN 117032941B
Authority
CN
China
Prior art keywords
unit
real
time
architecture
information
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.)
Active
Application number
CN202311296412.XA
Other languages
Chinese (zh)
Other versions
CN117032941A (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.)
Nanjing Yihui Information Technology Co ltd
Original Assignee
Nanjing Yihui Information Technology 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 Nanjing Yihui Information Technology Co ltd filed Critical Nanjing Yihui Information Technology Co ltd
Priority to CN202311296412.XA priority Critical patent/CN117032941B/en
Publication of CN117032941A publication Critical patent/CN117032941A/en
Application granted granted Critical
Publication of CN117032941B publication Critical patent/CN117032941B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Abstract

The invention provides a real-time task scheduling system based on a many-core processor and a control method thereof, comprising the following steps: the architecture sensing unit is connected with the processor and the real-time preselection unit to acquire the architecture information of the processor in real time and send the architecture information to the real-time preselection unit; the trigger response unit is connected with the real-time preselection unit to acquire scheduling information in real time and send the scheduling information to the real-time preselection unit; the task management unit is connected with the real-time preselection unit to adjust the priority of the ready task while providing the ready task for the real-time preselection unit; the real-time preselection unit selects a task with the highest priority from ready tasks according to the architecture information, the scheduling information and the load condition of the processor, and sends a selection result to the scheduling switching unit; the scheduling switching unit completes the fast switching operation according to the selection result of the real-time preselection unit; the physical core pressure is shared, and meanwhile, the near-end access performance is maximized, so that the service requirements of high reliability and high stability are met.

Description

Real-time task scheduling system based on many-core processor and control method thereof
Technical Field
The invention relates to the technical field of task scheduling of a many-core processor in an operating system, in particular to a real-time task scheduling system based on the many-core processor and a control method thereof.
Background
In the prior art, the operating system with real-time performance is only suitable for a conventional single memory controller architecture processor, but a many-core processor widely used in the fields of servers and high performance cannot sense the architecture characteristics of multiple clusters and multiple memory controllers of the conventional real-time operating system, and sense optimization cannot be provided for the architecture characteristics.
The traditional real-time operating system is only suitable for the processor with the unified memory architecture, and cannot meet the optimization requirement of the non-unified memory architecture of the many-core processor. The traditional operating system thread scheduler cannot sense the architecture characteristics and cannot utilize the performance advantages of the near-end access memory, so that the access memory performance of the business logic in actual operation has larger fluctuation, and the application requirement on higher performance is not met.
Therefore, it is desirable to provide a real-time task scheduling system based on a many-core processor and a control method thereof to solve the above-mentioned drawbacks and disadvantages of the prior art.
Disclosure of Invention
In order to solve the defects and shortcomings in the prior art, the invention provides a real-time task scheduling system based on a many-core processor and a control method thereof.
The specific scheme provided by the invention is as follows:
a real-time task scheduling system based on a many-core processor is characterized in that: the system comprises:
the architecture sensing unit is connected with the processor and the real-time preselection unit to acquire the architecture information of the processor in real time and send the architecture information to the real-time preselection unit;
the trigger response unit is connected with the real-time preselection unit to acquire the scheduling information in real time and send the scheduling information to the real-time preselection unit;
the task management unit is connected with the real-time preselection unit to provide ready tasks for the real-time preselection unit and adjust the priority of the ready tasks;
the real-time preselection unit is respectively connected with the architecture sensing unit, the trigger response unit and the task management unit, so as to select a task with the highest priority from ready tasks according to architecture information, scheduling information and the load condition of the processor, and send a selection result to the scheduling switching unit;
and the scheduling switching unit is connected with the real-time preselection unit so as to finish the rapid switching operation according to the selection result of the real-time preselection unit.
As a further preferred embodiment of the present invention, the processor architecture information obtained in real time by the architecture awareness unit at least includes processor physical core allocation, memory unit allocation, and memory unit distance.
As a further preferable implementation manner of the invention, the scheduling information acquired in real time by the trigger response unit at least comprises scheduling scene information and operation behavior information.
As a further preferred embodiment of the invention, the task management unit provides ready tasks to the real-time preselection unit according to a preset priority and adjusts the priority of the ready tasks according to the real-time preselection unit.
As a further preferred embodiment of the present invention, the real-time preselection unit comprises
The system comprises an architecture perception calibration unit (ASU), a processor and a control unit, wherein the architecture perception calibration unit (ASU) is connected with the architecture perception unit to generate corresponding calibration information according to architecture information of the processor and adjust priority of a ready task according to the acquired architecture information of the processor;
a ready group preselection unit (RSU) connected with the architecture awareness calibration unit and the task management unit simultaneously to preselect ready tasks and provide the ready tasks to the task management unit;
an optimal thread preselection unit (BTU) connected with the architecture sensing calibration unit and the ready group preselection unit simultaneously, so as to receive calibration information of the architecture sensing calibration unit and preselection information of the ready group preselection unit, and select an optimal subsequent thread from ready tasks;
a Preemption Compensation Unit (PCU) that compensates for negative effects of a thread after it is preempted.
As a further preferred embodiment of the present invention, the architecture Aware Scaling Unit (ASU) sets the cluster binding thread to a higher priority according to the obtained architecture information of the processor.
As a further preferred embodiment of the invention, the ready-group preselection unit (RSU) preselects ready tasks according to calibration information of the architecturally perceived calibration unit and provides them to the task management unit.
As a further preferred embodiment of the present invention, the best thread pre-selection unit (BTU) is responsible for scheduling real-time processing while selecting the best subsequent thread from ready tasks.
As a further preferred embodiment of the invention, the Preemption Compensation Unit (PCU) compensates for the negative effects of a high priority thread being ready or running after it has been preempted.
Further, the invention also provides a control method of the real-time task scheduling system based on the many-core processor, which is characterized in that: the method comprises the following steps:
1) Acquiring architecture information of a processor in real time;
2) Acquiring scheduling information in real time;
3) Providing a ready task according to a preset priority;
4) According to the obtained architecture information of the processor, the cluster binding thread is set to be higher in priority;
5) Selecting a task with the highest priority from ready tasks according to the architecture information, the scheduling information and the load condition of the processor;
6) And finishing the fast switching operation according to the selection result.
Compared with the prior art, the invention has the following technical effects:
1) The invention provides a real-time task scheduling system based on a many-core processor and a control method thereof, which can realize real-time task scheduling by dynamically sensing the architecture characteristics of the many-core processor and utilizing the advantages of near-end access.
2) The invention provides a real-time task scheduling system based on a many-core processor and a control method thereof, wherein a cluster binding thread is set to be higher in priority according to acquired architecture information of the processor, a thermal cache is fully utilized, the possibility of task interruption is reduced to the greatest extent, physical core pressure is shared, and meanwhile, near-end access performance is maximized, so that service requirements of high reliability and high stability are met.
3) The invention provides a real-time task scheduling system based on a many-core processor and a control method thereof, which can bind a plurality of sub-threads to a plurality of physical clusters by the multi-thread service application, and can correspondingly allocate local physical memory according to the affinity characteristics of each physical cluster as the cluster binding threads have higher priority, and can realize the service requirements of high reliability and high stability while allocating physical core operation pressure.
Drawings
Fig. 1 is a logic structure diagram of the real-time task scheduling system according to the present invention.
Fig. 2 shows a logical structure diagram of the real-time preselection unit of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper", "lower", "inner", "outer", "front", "rear", "both ends", "one end", "the other end", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific direction, be configured and operated in the specific direction, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "provided," "connected," and the like are to be construed broadly, and may be fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.
First embodiment
Fig. 1 shows a first embodiment of the present invention, in which a real-time task scheduling system based on a many-core processor is provided, the system includes:
the architecture sensing unit is connected with the processor and the real-time preselection unit to acquire the architecture information of the processor in real time and send the architecture information to the real-time preselection unit; in this embodiment, the processor architecture information obtained in real time by the architecture sensing unit at least includes processor physical core allocation, storage unit distance, and the like, so that a basis is provided for binding a plurality of sub-threads of the multithread service to a plurality of physical clusters in the follow-up, correspondingly allocating local physical memory according to affinity characteristics of each physical cluster, allocating physical core operation pressure, adjusting priority of ready tasks, and the like.
The triggering response unit is connected with the real-time preselection unit to acquire scheduling information in real time and send the scheduling information to the real-time preselection unit; in this embodiment, the scheduling information obtained in real time by the trigger response unit at least includes scheduling scene information, operation behavior and other information, which not only can ensure stability, safety and effectiveness of the scheduling process, but also can provide necessary basis for optimizing and improving the subsequent system.
The task management unit is connected with the real-time preselection unit to adjust the priority of the ready task while providing the ready task for the real-time preselection unit; in this embodiment, the task management unit provides the ready task to the real-time preselection unit according to the preset priority, and adjusts the priority of the ready task according to the real-time preselection unit.
The real-time preselection unit is respectively connected with the architecture sensing unit, the trigger response unit and the task management unit, so as to select a task with the highest priority from ready tasks according to architecture information, scheduling information and the load condition of the processor, and send a selection result to the scheduling switching unit;
and the scheduling switching unit is connected with the real-time preselection unit so as to finish the rapid switching operation according to the selection result of the real-time preselection unit.
The architecture sensing unit is closely related to the many-core processor, the real-time preselection unit bears most data flow of the scheduling model, and after receiving an external trigger signal, the architecture sensing unit senses processing units such as a calibration unit ASU, a ready group preselection unit RSU, an optimal thread preselection unit BTU, a preemption compensation unit PCU and the like through an internal architecture, and task resources are efficiently allocated among the units in a combined mode so as to achieve the real-time purpose.
As shown in FIG. 2, in this embodiment, the real-time preselection unit includes
The architecture sensing calibration unit ASU is connected with the architecture sensing unit to generate corresponding calibration information according to the architecture information of the processor and adjust the priority of the ready task according to the acquired architecture information of the processor; the specific arrangement is as follows: the architecture perception calibration unit ASU sets the cluster binding threads to be higher priority according to the acquired architecture information of the processor so as to fully utilize the thermal cache, and maximize the near-end memory access performance while distributing the physical core pressure so as to achieve the service requirements of high reliability and high stability.
The ready group preselection unit is connected with the architecture perception calibration unit and the task management unit at the same time so as to preselect a ready task and provide the ready task to the task management unit; in this embodiment, the ready task is preselected by the ready group preselection unit RSU according to the calibration information of the architecture aware calibration unit and provided to the task management unit, and real-time task scheduling can be achieved by dynamically aware architecture features of the many-core processor and utilizing advantages of near-end access.
The optimal thread preselection unit BTU is connected with the architecture sensing calibration unit and the ready group preselection unit at the same time so as to receive calibration information of the architecture sensing calibration unit and preselection information of the ready group preselection unit, and selects an optimal follow-up thread from the ready task; meanwhile, the method is also responsible for scheduling real-time processing, and in the embodiment, the scheduling real-time processing mainly comprises maintaining ready list, updating time slices, realizing rapid scheduling according to architecture sensing condition and the like.
A preemption compensation unit PCU which compensates the negative effect of the preempted thread; in this embodiment, the preemption compensation unit compensates for the negative effect of the ready or running high priority thread after preemption, makes full use of the thermal cache while minimizing the possibility of task interruption, and maximizes the near-end memory access performance while distributing the physical core pressure to achieve the business requirements of high reliability and high stability.
Second embodiment
The second embodiment of the invention also provides a control method of the real-time task scheduling system based on the many-core processor, which comprises the following steps:
1) Acquiring architecture information of a processor in real time;
2) Acquiring scheduling information in real time;
3) Providing a ready task according to a preset priority;
4) According to the obtained architecture information of the processor, the cluster binding thread is set to be higher in priority; according to the obtained architecture information of the processor, the cluster binding thread is set to be higher in priority, the possibility of task interruption is reduced to the greatest extent while the thermal cache is fully utilized, and the near-end memory access performance is maximized while the physical core pressure is shared, so that the service requirements of high reliability and high stability are met;
5) Selecting a task with the highest priority from ready tasks according to the architecture information, the scheduling information and the load condition of the processor;
6) And finishing the fast switching operation according to the selection result.
The multithread service application can bind a plurality of sub-threads to a plurality of physical clusters through the method, and because the cluster binding threads have higher priority, local physical memory can be correspondingly allocated according to the affinity characteristics of each physical cluster, and the service requirements of high reliability and high stability are met while the physical core operation pressure is allocated.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.

Claims (9)

1. A real-time task scheduling system based on a many-core processor is characterized in that: the system comprises:
the architecture sensing unit is connected with the processor and the real-time preselection unit to acquire the architecture information of the processor in real time and send the architecture information to the real-time preselection unit;
the trigger response unit is connected with the real-time preselection unit to acquire the scheduling information in real time and send the scheduling information to the real-time preselection unit;
the task management unit is connected with the real-time preselection unit to provide ready tasks for the real-time preselection unit and adjust the priority of the ready tasks;
the real-time preselection unit is respectively connected with the architecture sensing unit, the trigger response unit and the task management unit, so as to select a task with the highest priority from ready tasks according to architecture information, scheduling information and the load condition of the processor, and send a selection result to the scheduling switching unit;
the scheduling switching unit is connected with the real-time preselection unit to finish the rapid switching operation according to the selection result of the real-time preselection unit;
the real-time preselection unit comprises
The architecture perception calibration unit is connected with the architecture perception unit to generate corresponding calibration information according to the architecture information of the processor, and adjust the priority of the ready task according to the acquired architecture information of the processor;
the ready group preselecting unit is connected with the architecture perception calibration unit and the task management unit at the same time so as to preselect a ready task and provide the ready task to the task management unit;
the optimal thread preselection unit is connected with the architecture sensing calibration unit and the ready group preselection unit at the same time so as to receive calibration information of the architecture sensing calibration unit and preselection information of the ready group preselection unit, and selects an optimal subsequent thread from ready tasks;
and the preemption compensation unit compensates the negative influence of the preempted thread.
2. The real-time task scheduling system based on a many-core processor of claim 1, wherein: the processor architecture information obtained by the architecture sensing unit in real time at least comprises processor physical core allocation, storage unit allocation and storage unit distance.
3. The real-time task scheduling system based on a many-core processor of claim 1, wherein: the scheduling information acquired in real time by the trigger response unit at least comprises scheduling scene information and operation behavior information.
4. The real-time task scheduling system based on a many-core processor of claim 1, wherein: the task management unit provides ready tasks for the real-time preselection unit according to the preset priority, and adjusts the priority of the ready tasks according to the real-time preselection unit.
5. The real-time task scheduling system based on a many-core processor of claim 1, wherein: the architecture perception calibration unit sets the cluster binding thread to be higher in priority according to the acquired architecture information of the processor.
6. The real-time task scheduling system based on a many-core processor of claim 1, wherein: and the ready group preselection unit preselects ready tasks according to the calibration information of the architecture sensing calibration unit and provides the ready tasks for the task management unit.
7. The real-time task scheduling system based on a many-core processor of claim 1, wherein: the optimal thread preselection unit selects an optimal subsequent thread from ready tasks and is also responsible for scheduling real-time processing.
8. The real-time task scheduling system based on a many-core processor of claim 1, wherein: the preemption compensation unit compensates for the negative effects of a high priority thread being ready or running after it is preempted.
9. A control method of a real-time task scheduling system based on a many-core processor according to any one of claims 1-8, characterized by: the method comprises the following steps:
1) Acquiring architecture information of a processor in real time;
2) Acquiring scheduling information in real time;
3) Providing a ready task according to a preset priority;
4) According to the obtained architecture information of the processor, the cluster binding thread is set to be higher in priority;
5) Selecting a task with the highest priority from ready tasks according to the architecture information, the scheduling information and the load condition of the processor;
6) And finishing the fast switching operation according to the selection result.
CN202311296412.XA 2023-10-09 2023-10-09 Real-time task scheduling system based on many-core processor and control method thereof Active CN117032941B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311296412.XA CN117032941B (en) 2023-10-09 2023-10-09 Real-time task scheduling system based on many-core processor and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311296412.XA CN117032941B (en) 2023-10-09 2023-10-09 Real-time task scheduling system based on many-core processor and control method thereof

Publications (2)

Publication Number Publication Date
CN117032941A CN117032941A (en) 2023-11-10
CN117032941B true CN117032941B (en) 2023-12-01

Family

ID=88641571

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311296412.XA Active CN117032941B (en) 2023-10-09 2023-10-09 Real-time task scheduling system based on many-core processor and control method thereof

Country Status (1)

Country Link
CN (1) CN117032941B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102262557A (en) * 2010-05-25 2011-11-30 运软网络科技(上海)有限公司 Method for constructing virtual machine monitor by bus architecture and performance service framework
CN103559045A (en) * 2013-11-21 2014-02-05 青岛大学 Hardware real-time operation system
CN111078363A (en) * 2019-12-18 2020-04-28 深信服科技股份有限公司 NUMA node scheduling method, device, equipment and medium for virtual machine
CN114579271A (en) * 2022-02-28 2022-06-03 阿里巴巴(中国)有限公司 Task scheduling method, distributed system and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2133793B1 (en) * 2008-06-10 2015-08-12 Barcelona Supercomputing Center-Centro Nacional de Supercomputación A multithreaded processor and a mechanism and a method for executing one hard real-time task in a multithreaded processor
EP3296867B1 (en) * 2016-09-18 2020-04-01 ESG Elektroniksystem- und Logistik-GmbH Method and apparatus for executing real-time tasks
US20230135951A1 (en) * 2021-10-29 2023-05-04 Blackberry Limited Scheduling of threads for clusters of processors

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102262557A (en) * 2010-05-25 2011-11-30 运软网络科技(上海)有限公司 Method for constructing virtual machine monitor by bus architecture and performance service framework
CN103559045A (en) * 2013-11-21 2014-02-05 青岛大学 Hardware real-time operation system
CN111078363A (en) * 2019-12-18 2020-04-28 深信服科技股份有限公司 NUMA node scheduling method, device, equipment and medium for virtual machine
CN114579271A (en) * 2022-02-28 2022-06-03 阿里巴巴(中国)有限公司 Task scheduling method, distributed system and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Implementation of Cache Fair Thread Scheduling for multi core processors using wait free data structures in cloud computing applications;A.S. Radhamani等;《2011 World Congress on Information and Communication Technologies》;第600-605页 *
可重构众核流处理器体系结构关键技术研究;许牧;《中国博士学位论文全文数据库 信息科技辑》;第I137-4页 *

Also Published As

Publication number Publication date
CN117032941A (en) 2023-11-10

Similar Documents

Publication Publication Date Title
CN106453125B (en) A kind of remote service calling SiteServer LBS based on real time load rate
US7117499B2 (en) Virtual computer systems and computer virtualization programs
EP2725862A1 (en) Resource allocation method and resource management platform
KR101684677B1 (en) Apparatus and method for optimizing system performance of multi-core system
US9104482B2 (en) Differentiated storage QoS
CN101770346A (en) Method for dispatching multi-controller disk array coordination
CN110166524B (en) Data center switching method, device, equipment and storage medium
US8356098B2 (en) Dynamic management of workloads in clusters
CN111176846B (en) Task allocation method and device
CN111078396A (en) Distributed data access method and system based on multitask instances
CN108874623A (en) Distributed type assemblies method for monitoring performance, device, equipment, system and storage medium
CN103077079A (en) Method and device for controlling migration of virtual machine
CN114968601B (en) Scheduling method and scheduling system for AI training jobs with resources reserved in proportion
US8555021B1 (en) Systems and methods for automating and tuning storage allocations
CN117032941B (en) Real-time task scheduling system based on many-core processor and control method thereof
CN116089009A (en) GPU resource management method, system, equipment and storage medium
CN111290833A (en) Cloud platform control method
US11632329B2 (en) Resource management system and resource management method
CN116248699B (en) Data reading method, device, equipment and storage medium in multi-copy scene
CN107846294A (en) A kind of active and standby service switch method and device
WO2022177455A1 (en) Method and system for optimizing resource and traffic management of a computer execution environment in a vran
CN114995975A (en) Scheduling method and device for Redis cluster
CN113271335A (en) System for managing and controlling operation of cloud computing terminal and cloud server
CN102811154A (en) Resource acquisition method and network server system
CN112328387A (en) Multi-tenant-oriented micro-service resource scheduling method

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