CN108804211A - Thread scheduling method, device, electronic equipment and storage medium - Google Patents
Thread scheduling method, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN108804211A CN108804211A CN201810395327.1A CN201810395327A CN108804211A CN 108804211 A CN108804211 A CN 108804211A CN 201810395327 A CN201810395327 A CN 201810395327A CN 108804211 A CN108804211 A CN 108804211A
- Authority
- CN
- China
- Prior art keywords
- thread
- processor
- virtual machine
- target
- scheduling
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5038—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/48—Indexing scheme relating to G06F9/48
- G06F2209/484—Precedence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5018—Thread allocation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5021—Priority
Abstract
The embodiment of the present application provides a kind of thread scheduling method, device, electronic equipment and storage medium, wherein this method includes:It obtains the pairing relationship in target virtual machine process in each thread and operating system between each local thread each thread is bundled in respectively on the alignment processing device in target processor set according to the pairing relationship, so that each thread is by corresponding processor scheduling.The technical solution avoids the phenomenon that fighting for same processor timeslice when multithreading executes, solve the problems, such as that multithreading task queue blocks caused by the service thread of same processor is excessive, real-time thread service time is long, the execution time delay for reducing other threads improves the real-time of thread execution.
Description
Technical field
This application involves field of computer technology more particularly to a kind of thread scheduling method, device, electronic equipment and storages
Medium.
Background technology
With the fast development of internet and mobile Internet, the performance that big concurrent, low delay becomes big data application refers to
Mark, correspondingly, to improve concurrency, multithreading has been widely used in various applications, multi-core processor with its high-performance,
Low-power consumption advantage has gradually become the mainstream of marketplace server.
Currently, in Java Virtual Machine (java virtual machine, JVM) multi-thread environment, thread mostly uses
Preemption scheduling uses the resource of central processing unit (central processing unit, CPU), i.e. operating system will be multiple
Thread distributes to multiple CPU, and corresponding service time is distributed respectively according to the priority of the multiple threads of correspondence by each CPU, this
Sample per thread may correspond to multiple CPU, and each CPU may also correspond to multiple threads, so, when the service time of some thread
Terminate, when corresponding CPU executes round-robin, which can temporarily interrupt the thread being currently running, and it is current to preserve it
State, while next thread is loaded, which then needs that the CPU or other CPU is waited for be rescheduled.
However, if the priority of certain real-time threads is high in JVM processes, the service time being assigned to is longer, thus accounts for
Time with corresponding CPU is longer, is then likely to occur the CPU in this way and corresponds to the problem of multithreading is lined up obstruction so that other threads
Execution time delay increase, affect thread execution real-time.
Invention content
A kind of thread scheduling method of the application offer, device, electronic equipment and storage medium, for solving in operating system
The real-time thread of a certain processor service is excessively and the time of certain real-time threads occupancy processor is longer, causes the processor
Corresponding multithreading is lined up the problem of obstruction.
In a first aspect, the embodiment of the present application provides a kind of thread scheduling method, including:
The pairing relationship in each thread and operating system between each local thread in target virtual machine process is obtained, it is described each
Local thread is corresponding with target processor set, and the target processor set includes the processing of at least one of operating system
Device, the number of threads in the target virtual machine process are less than or equal to the quantity of local thread in the operating system;
According to the pairing relationship between each thread and each local thread, each thread is bundled in institute respectively
It states on the alignment processing device in target processor set, so that each thread is by corresponding processor scheduling.
In the present embodiment, the correspondence by being tied to the thread in target virtual machine process in target processor set
On processor, the phenomenon that fighting for same processor timeslice when multithreading executes is avoided, solves the service of same processor
The problem of multithreading task queue caused by thread is excessive, real-time thread service time is long blocks, reduce other threads
Execution time delay, improve thread execution real-time so that the real-time of task execution obtains effective guarantee, can efficiently send out
Wave the advantage of server multi-core processor.
Optionally, in a possible design, each thread and operating system in the acquisition target virtual machine process
In before pairing relationship between each local thread, the method further includes:
The target virtual machine process and the target processor set are bound.
By binding target virtual machine process and target processor set, can and can be operated with target virtual machine process
Other virtual machine processes in system are kept apart, and target processor set can be isolated with the processor of other in operating system
Open, when thread in the processor scheduling target virtual machine process in such target processor set will not to other virtual machines into
Journey and other processors have an impact.
Optionally, in a possible design, described by the target virtual machine process and the target processor
After set is bound, the method further includes:
Obtain the thread information of each thread in the target virtual machine process;
According to the thread information of each thread, determines and store matching between each thread and each local thread
To relationship.
By binding target virtual machine process and target processor set, and obtain each in target virtual machine process
The thread information of thread and thread information according to each thread determine and simultaneously store the pass of the pairing between each thread and each local thread
System makes each thread by corresponding for subsequently each thread is bundled in respectively on the alignment processing device in target processor set
Processor scheduling provide realization may, be lined up resistance to solve the multithreading being likely to occur in existing preemptive type thread scheduling method
Plug problem is laid a good foundation.
Optionally, in a possible design, at least one of each thread and the target processor set
Processor is bound.
Thread in this way in target virtual machine process can only be by some processor in the target processor set or certain
Processor scheduling, the resource of a certain processor is only a certain threading service or is only certain several threading service in other words, is reduced
The context switching times of thread, reduce processor resource caused by multi-thread concurrent and seize probability, correspondingly, reducing
Delay variation when thread task execution.
Optionally, in a possible design, each thread and a processing in the target processor set
Device is bound.
It can ensure that real-time task thread is preferentially distributed service time in this way, and in the process of implementation not by other threads
Task is interfered, and the context switching problem of virtual machine thread is avoided, and processor resource disappears caused by reducing context switching
Consumption, ensures that the execution time of thread is steady, and processor resource is seized caused by solving multithreading task concurrently, leads to delay variation
The problem of.
Optionally, in a possible design, the method further includes:
According to the thread information of each thread, the scheduling strategy of each real-time thread in each thread is changed, so that institute
The scheduling strategy for stating each real-time thread is Real-Time Scheduling Police.The real-time thread quilt in target virtual machine process can be ensured in this way
Priority scheduling, and will not processor resource be seized by other threads, improve the execution stationarity of real-time thread.
Optionally, in a possible design, the thread information includes at least one of following:Thread name, thread number,
The priority of thread, the operating status of thread, the scheduling strategy of thread, affiliated processor sets.
Second aspect, the embodiment of the present application provide a kind of thread scheduling device, including:Acquisition module and processing module;
The acquisition module, for obtaining in target virtual machine process in each thread and operating system between each local thread
Pairing relationship, each local thread is corresponding with target processor set, the target processor set include operation be
At least one of system processor, the number of threads in the target virtual machine process are less than or equal to this in the operating system
The quantity of ground thread;
The processing module, each thread for being got according to the acquisition module and each local thread it
Between pairing relationship, each thread is bundled in respectively on the alignment processing device in the target processor set, so that institute
Each thread is stated by corresponding processor scheduling.
Optionally, in a possible design, the processing module is additionally operable to obtain target void in the acquisition module
Before pairing relationship in quasi- machine process in each thread and operating system between each local thread, by the target virtual machine process
It is bound with the target processor set.
Optionally, in a possible design, the acquisition module is additionally operable to the target in the processing module
After virtual machine process is bound with the target processor set, the line of each thread in the target virtual machine process is obtained
Journey information;
The processing module is additionally operable to the thread information of each thread got according to the acquisition module, determines
And store the pairing relationship between each thread and each local thread.
Optionally, in a possible design, at least one of each thread and the target processor set
Processor is bound.
Optionally, in a possible design, each thread and a processing in the target processor set
Device is bound.
Optionally, in a possible design, the processing module is additionally operable to be got according to the acquisition module
The thread information of each thread changes the scheduling strategy of each real-time thread in each thread, so that each real-time thread
Scheduling strategy be Real-Time Scheduling Police.
Optionally, in a possible design, the thread information includes at least one of following:Thread name, thread number,
The priority of thread, the operating status of thread, the scheduling strategy of thread, affiliated processor sets.
The there is provided thread scheduling device of each possible design of above-mentioned second aspect and second aspect, advantage can
Referring to advantageous effect caused by each possible design of above-mentioned first aspect and first aspect, to be not added with repeat herein.
The third aspect, the embodiment of the present application provide a kind of thread scheduling device, include for executing the above first aspect
At least one processing element (or chip) of method.
Fourth aspect, the embodiment of the present application provide a kind of electronic equipment, including processor, memory and are stored in described deposit
On reservoir and the computer program that can run on the processor, the processor realizes such as above-mentioned the when executing described program
Method in the various possible designs of one side and first aspect.
5th aspect, the embodiment of the present application provide a kind of chip, and the chip includes:For execute above-mentioned first aspect and
Each possible module or unit that provided thread scheduling device is provided of first aspect.
6th aspect, the embodiment of the present application provide it is a kind of comprising instruction computer program product, when its on computers
When operation so that computer executes the method in the various possible designs of above-mentioned first aspect and first aspect.
7th aspect, the embodiment of the present application provide a kind of storage medium, instruction are stored in the storage medium, when its
When being run on computer so that computer executes the method in the various possible designs of above-mentioned first aspect and first aspect.
Thread scheduling method, device, electronic equipment and storage medium provided by the embodiments of the present application, it is empty by obtaining target
Pairing relationship in quasi- machine process in each thread and operating system between each local thread, and according to the pairing relationship, Jiang Gexian
Journey is bundled in respectively on the alignment processing device in target processor set, so that each thread is avoided by corresponding processor scheduling
The phenomenon that multithreading fights for same processor timeslice when executing, the service thread that solves same processor is excessive, in real time
The problem of multithreading task queue blocks caused by service time of thread is long, the execution time delay of other threads is reduced, is carried
The real-time that high thread executes so that the real-time of task execution obtains effective guarantee, can efficiently play server multinuclear
The advantage of processor.
Description of the drawings
Fig. 1 is the execution status diagram of each thread in a certain JVM processes in existing preemptive type thread scheduling;
Fig. 2 is the flow diagram of thread scheduling method embodiment one provided by the embodiments of the present application;
Fig. 3 is the execution status diagram of each thread in target virtual machine process in the embodiment of the present application;
Fig. 4 is the flow diagram of thread scheduling method embodiment two provided by the embodiments of the present application;
Fig. 5 is the structural schematic diagram of thread scheduling device embodiment one provided by the embodiments of the present application;
Fig. 6 is the structural schematic diagram of thread scheduling device embodiment two provided by the embodiments of the present application.
Specific implementation mode
Hereinafter, the part term in the embodiment of the present application is explained, in order to those skilled in the art understand that:
JVM:
Java Virtual Machine (java virtual machine, JVM) is the abstract machine for running all java applets, is
The running environment of Java language.The hardware framework that Java Virtual Machine has oneself perfect, such as processor, storehouse, register, also have
There is corresponding instruction system.Java Virtual Machine shields and the relevant information of specific operating system platform so that java applet is only
The object code (bytecode) run on a java virtual machine need to be generated, can on several operation systems platform it is not necessary to modify
Ground normal operation.
CPU:
Central processing unit (central processing unit, CPU) is one piece of ultra-large integrated circuit, is one
The arithmetic core (core) and control core (control unit) of platform computer, function be mainly interpretive machine instruction with
And the data in processing computer software.
JNA:
Java directly accesses local dynamic base (java native access, JNA) and is built upon Java local interfaces
Java Open Frameworks on (java native interface, JNI), for calling C, C++ code, especially bottom library
File (is dll files, be so [shared object] file under linux) in windows, that is, JNA provides one group of Java
Tool-class is used in runtime dynamic access system local library (dll of such as window) without writing any Native/JNI
Code, as long as the function and structure of developer's target local library described in a java interface, JNA will realize java automatically
Mapping of the interface to local library function.
The applicable scene of the embodiment of the present application is directed to first below to be briefly described.
In software application development, the performance of application is to need the point of concern emphatically.Especially in today's society, with interconnection
Net and mobile Internet quickly develop so that explosive growth is presented in portfolio and data volume, to expedite the emergence of " big data "
Industry, and big concurrent, low delay becomes the performance indicator of most of big datas application.
In order to be adapted with the big concurrent and low delay feature that big data is applied, the concurrency of raising big data application is more
Threading has been widely used in various applications, and multi-core processor gradually becomes market with its high-performance, low-power consumption advantage
The mainstream of server.Currently, big data product of much increasing income, such as:hadoop,hbase,yarn,spark,flink,
VoltDB etc. is run in JVM environment, so JVM Performance tunings are also the problem of often concern in development process.
Existing operating system is multiple task operating system mostly, i.e. operating system can run multiple tasks simultaneously.One
Task generally corresponds to a process, it is also possible to include multiple processes.In general, as soon as when operation application program, start
One process (or multiple processes).When process initiation, operating system can be course allocation resource, wherein most important resource
It is memory headroom, this is because program is run in memory.Optionally, thread is the code flow of Out-of-order execution in process, when
It is that thread concurrently executes when multiple threads are run simultaneously.
In JVM multi-thread environments, since thread scheduling is to distribute CPU automatically by operating system, thus, it is possible to will appear
Multithreading is seized the time of the same CPU jointly, and since the operating status of each thread is uncontrollable, thus, thread is concurrent
The increase of amount can affect greatly the time delay index of thread, and can not efficiently play server has the advantage of multi-core CPU.It is existing
Stage, due to time delay in terms of existing scheme do not solve the problems, such as delay variation, also refer to calibration method without predictable time delay,
Especially in the scene of delay sensitive requirement of real-time harshness, in financial air control, micro- shake of time delay may all make antifraud
Detection time-out, so that fraudulent trading passes through, causes economic loss, and then it is urgently to be resolved hurrily for how accurately controlling thread scheduling
The problem of.
Thread scheduling refers to the process of that operating system is the thread allocation processing device right to use, and existing thread scheduling mainly divides
Two kinds, be cooperating type thread scheduling and preemptive type thread scheduling respectively.For cooperating type thread scheduling, execution time of thread by
Thread itself controls, thread oneself task execution it is complete after, proactive notification operating system to switch the processor into addition
On one thread, this method is realized simple, and handover operation is known to thread oneself, does not have a thread synchronization problem, but line
The execution time of journey is uncontrollable, if a thread is problematic, may always block there, influence holding for other threads
Row, thus, in multi-thread environment, thread mostly uses preemption scheduling to use the resource of processor.
For preemptive type thread scheduling, per thread will distribute CPU by operating system, be distributed and be executed by corresponding CPU
Time (optional, CPU is the service time of per thread distribution i.e. the execution time of thread), the switching of thread is by CPU
Determine that (wherein, for Java, thread can utilize automatic concede of Thread.yield () to execute the time, but can not obtain automatically
Execute the time), that is, the execution time system of thread is the processor control in operating system, thus, there is no have some line
The problem of Cheng Yongjiu execution leads to entire process blocking.
Currently, the scheduling mechanism of Java threads is all realized by JVM, if there is several threads, you want to allow certain threads
Possess the longer execution time or the few point of certain threads distribution executes the time, at this moment relates to " thread priority ".Optionally,
If some thread does not state priority clearly when being created, default priority is used, and then JVM is in follow-up operation process
In, the CPU of operating system executes the time by being distributed according to the priority of per thread.Optionally, in practical applications, Java
Thread priority include 10 ranks altogether, i.e. priority value (1) to priority value (10), thus, in Java, can define
Three constants:Thread.MIN_PRIORITY, Thread.NORM_PRIORITY, Thread.MAX_PRIORITY are used respectively
To indicate minimum priority value (1), default priority value (5), greatest priority value (10).
The scheduling strategy of thread determines that upper layer multithreading operating mechanism, the thread scheduler of JVM realize preemption scheduling,
The execution time of every thread is allocated management of by the thread scheduler, it by according to thread priority to execution time of thread into
Row distribution, priority is higher, and the service time for being likely to be obtained CPU is longer.In this way when multithreading fights for CPU time slice, preferentially
The high thread of grade first carries out task, thereby increases and it is possible to which the time of execution is very long, so then it is possible that thread task queue blocked
Problem makes other thread execution time delays increase, influences the real-time of task execution.
Under current linux system there are mainly three types of task scheduling strategies:
1,SCHED_OTHER:Timesharing scheduling strategy, acquiescence is SCHED_OTHER when operating system creates thread.
2,SCHED_FIFO:Real-time task scheduling strategy, First Come First Served.It is run always if occupying cpu resource, directly
It is reached to the thread task for having higher priority or the thread is abandoned oneself.
3,SCHED_RR:Real-time task scheduling strategy, round-robin.When a certain thread distribution timeslice be finished, grasp
CPU will be redistributed by making system, and the CPU redistributes timeslice, be placed in the thread queue tail portion of CPU execution, in this way
It ensure that all thread tasks with equal priority can be by equity dispatching.Optionally, each thread task is by shifting class
RR is instructed, i.e., is dispatched by CPU without the ring shift right of carry sequence.
It is worth noting that three of the above scheduling strategy can not modify in existing JVM.
In addition, in above-mentioned preemptive type thread scheduling mode, thread executes corresponding within the execution time that CPU is distributed
Business terminates when the execution time of some thread distribution, but the task of the thread has been not carried out, i.e., the round-robin of CPU when,
CPU then needs the current state the thread being currently running to preserve, while loading next thread, at this moment occurs as soon as up and down
Text switching phenomenon, the process can cause real-time task certain performance to be lost, thread task caused delay variation occur, influence
The real-time of task execution.
For example, Fig. 1 is the execution status diagram of each thread in a certain JVM processes in existing preemptive type thread scheduling.It can
Choosing, which includes four threads with the JVM processes, and there are server four core processors to illustrate.As shown in Figure 1, the JVM
Multiple threads in process, which operate on multiple CPU, to be executed, and when CPU time slice rotates, running thread can be temporary
When interrupt, need waiting for CPU to reschedule.
It is situated between in view of the above-mentioned problems, the embodiment of the present application provides a kind of thread scheduling method, device, electronic equipment and storage
Matter, by the thread in target virtual machine process being tied on the alignment processing device in target processor set, avoid by
The time that excessive in the real-time thread of a certain processor service and certain real-time threads occupy CPU is longer, and the CPU is caused to correspond to
Multithreading is lined up the problem of obstruction, reduces the execution time delay of other threads, improves the real-time of thread execution.In the following, logical
Specific embodiment is crossed the technical solution of the application is described in detail.
It should be noted that these specific embodiments can be combined with each other below, for same or analogous concept
Or process may repeat no more in certain embodiments.
Fig. 2 is the flow diagram of thread scheduling method embodiment one provided by the embodiments of the present application.As shown in Fig. 2, this
Apply for the thread scheduling method that embodiment provides, may include steps of:
Step 21:The pairing in target virtual machine process in each thread and operating system between each local thread is obtained to close
System.
Wherein, each local thread is corresponding with target processor set, which includes in operating system
At least one processor, the number of threads in the target virtual machine process is less than or equal to local thread in the operating system
Quantity.
In the embodiment of the present application, target virtual machine process refers to the application program run on target virtual machine, here,
Target virtual machine can be one kind in a variety of virtual machines such as Java Virtual Machine (JVM), Linux virtual machines, MICROSOFT VIRTUAL machine, this
Application embodiment is not defined the specific type of target virtual machine.Optionally, target virtual machine in the embodiment of the present application
It can be illustrated with JVM.
Optionally, since the realization of virtual machine needs based on host operating system, target virtual machine process
Each thread has certain pairing relationship with each local thread in operating system.In the present embodiment, if the target virtual machine into
Each thread of journey by the processor scheduling in the target processor set in operating system, then, in target virtual machine process
Before each thread is scheduled, need to obtain first in target virtual machine process in each thread and operating system between each local thread
Pairing relationship, here, each local thread of operating system is corresponding with target processor set, and thus, acquisition is target
Pairing relationship between each thread of virtual machine each local thread corresponding with target processor set in operating system.
It is worth noting that in the embodiment of the present application, if each thread in target virtual machine process can be adjusted respectively
Degree, independently executes, and the number of threads in the target virtual machine process can be less than or equal to local thread in the operating system
Quantity.
Step 22:According to the pairing relationship between each thread and each local thread, each thread is bundled at target respectively
It manages on the alignment processing device in device set, so that each thread is by corresponding processor scheduling.
In the present embodiment, when determining each thread of target virtual machine process by the processor tune in target processor set
Degree, and after getting the pairing relationship between each thread and each local thread, each thread can be bundled at target respectively
It manages on the alignment processing device in device set, so that each thread is by corresponding processor scheduling.By by each thread and alignment processing
The binding of device so that each thread in target virtual machine process is isolated with the thread in other processes, in this way regardless of destination virtual
In machine process the executive condition of each thread how (execute time length, the performance of dispatch processor) will not be in other processes
Thread have an impact.
Optionally, the per thread in the target virtual machine process in the embodiment of the present application can be by target processor set
One or more of processor scheduling, the embodiment of the present application this is not limited.
Optionally, in the embodiment of the present application, target processor set can be that idle shape is currently in operating system
One group of processor of state, or one group of processor that situation determines, the embodiment of the present application are actually used according to processor resource
This is not specifically limited.
Optionally, if the virtual machine in the application is JVM, then each thread is bundled in respectively in target processor set
Alignment processing device on can realize in the following way, specifically:This earthquake is directly accessed by Java in java codes
The pthread_setaffinity_np functions in the state library libraries (JNA) call operation system (OS) lib are realized each in target JVM processes
JVM thread is bound with the processor grouping in target processor set.
Wherein, pthread_setaffinity_np functions are the included thread affinity setting functions in the libraries pthread,
For thread and processor compatibility is arranged, i.e., a certain thread executes the time by which processor distribution, operates in which processing
On device.
In a kind of possible realization method of the embodiment of the present application, at each thread of target virtual machine process and above-mentioned target
Manage the processor binding of at least one of device set.
Optionally, it for the thread with a certain characteristic, for example, the priority in process is default priority, and needs
The virtual machine thread of long-play can bind itself and some or the certain processors in target processor set, in this way
Thread in target virtual machine process can only by the target processor set some processor or certain processor schedulings, or
Person says that the resource of a certain processor is only a certain threading service or is only certain several threading service, reduces the context of thread
Switching times reduce processor resource caused by multi-thread concurrent and seize probability, correspondingly, when reducing thread task execution
Delay variation.
In the alternatively possible realization method of the embodiment of the present application, each thread and the above-mentioned target of target virtual machine process
Processor binding in processor sets.
In this kind of possible realization method, for the higher thread of certain priority, the thread and target can be handled
Processor binding in device set, and the sufficiently long execution time is distributed, so that the corresponding processor of the thread is preferably
The threading service, and be again other threading services after the thread is finished, it can ensure that real-time task thread is excellent in this way
It first distributes service time, and is not interfered in the process of implementation by other thread tasks, avoid the context of virtual machine thread
Switching problem reduces processor resource consumption caused by context switching, ensures that the execution time of thread is steady, solve multithreading
Task concurrently caused by processor resource the problem of seizing, leading to delay variation.
For example, Fig. 3 is the execution status diagram of each thread in target virtual machine process in the embodiment of the present application.Such as Fig. 3
It is shown, after a processor in each thread of target virtual machine process and target processor set is bound, destination virtual
Each thread independently executes on the processor respectively distributed in machine process, is not in the context generated due to cross-thread switching
Switching problem and interact.
Thread scheduling method provided by the embodiments of the present application, by obtaining each thread and operation system in target virtual machine process
Pairing relationship in system between each local thread, and according to the pairing relationship, each thread is bundled in target processor collection respectively
On alignment processing device in conjunction, so that each thread is avoided when multithreading executes by corresponding processor scheduling and is fought for same place
The phenomenon that managing device timeslice, caused by the service thread that solves same processor is excessive, real-time thread service time is long
The problem of multithreading task queue blocks, the execution time delay of other threads is reduced, improves the real-time of thread execution so that
The real-time of task execution obtains effective guarantee, can efficiently play the advantage of server multi-core processor.
Optionally, on the basis of the above embodiments, Fig. 4 is thread scheduling method embodiment provided by the embodiments of the present application
Two flow diagram.As shown in figure 4, (being obtained in target virtual machine process in each thread and operating system in above-mentioned steps 21
Pairing relationship between each local thread) before, thread scheduling method provided by the embodiments of the present application can also include following step
Rapid 41:
Step 41:Target virtual machine process and target processor set are bound.
In the embodiment of the present application, since each thread of target virtual machine process needs and target processor in operating system
It is corresponding to gather corresponding local thread, thus each thread and each ground wire in operating system in obtaining target virtual machine process
Before pairing relationship between journey, it is necessary first to a processor sets are determined from all processors of operating system, and
And the target virtual machine process is bound with target processor set.Optionally, which can be by
It is formed at least one processor of idle state, after such target virtual machine process is bound with target processor set, the two
With in operating system other virtual machine processes and after other processors keep apart, will not be to other virtual machine processes and other
Processor has an impact.
Optionally, in the present embodiment, target virtual machine process can pass through such as lower section with the binding of target processor set
Formula is realized, specifically, for JVM, can pass through the sched_ in the libraries JNA call operation system lib in client java codes
Setaffinity functions realize that the grouping of target processor set in target virtual machine process and operating system is bound.Target
With after the binding of target processor set, the process number of target virtual machine process has just been mapped in processor sets virtual machine process
Face, to have established base on alignment processing device that each thread of target virtual machine process is tied to respectively in target processor set
Plinth.
Optionally, in the embodiment shown in fig. 4, as shown in figure 4, in step 41 (by target virtual machine process and target
Processor sets are bound) after, which can also include the following steps 42 and step 43:
Step 42:Obtain the thread information of each thread in target virtual machine process.
Optionally, which may include at least one of following:Thread name, thread number, the priority of thread, thread
Operating status, thread scheduling strategy, affiliated processor sets.
Wherein, it is the name of thread setting when thread name is thread creation, thread scheduler is facilitated to distinguish different lines
Journey, optionally, it is that name realization is arranged in per thread that thread scheduler can be associated with a thread name by thread identification, is led to
It crosses and facilitates management and debugger thread for thread setting name.
Thread number can be thread identification, and thread can be found by thread number.
Thread priority is used to show the significance level of per thread, and priority is higher, and thread is more important, corresponding processing
Device is longer for the execution time of its distribution, i.e. the CPU of operating system can be distributed according to the priority of per thread come when executing
Between.
The operating status of thread may include five kinds:Newly-built (NEW), can run (RUNNABLE), operation (RUNNING),
Block (BLOCKED) and dead (DEAD).Wherein, it creates (NEW) expression and newly creates a thread object;It can run
(RUNNABLE) after indicating that thread object creates, other threads (such as main threads) have invoked the sides start () of the object
Method;Operation (RUNNING) refer to can the thread of operating status (runnable) obtain the timeslice of processor, execute program generation
Code;Block (BLOCKED):Blocked state refers to the right to use that thread abandons processor because of certain reason, temporarily ceases fortune
Row;Dead (DEAD):Thread run (), the execution of main () method terminate, or have exited run () method because abnormal, then the line
The journey end lives period.
The scheduling strategy of thread includes three kinds:SCHED_OTHER (timesharing scheduling strategy), SCHED_FIFO (real-time tasks
Scheduling strategy, First Come First Served) and SCHED_RR (real-time task scheduling strategy, round-robin).
Affiliated processor sets are can be with the processor sets of scheduling thread.For example, target virtual machine process not with
When target processor set is bound, the processor sets in target virtual machine process belonging to each thread are all places of operating system
Device is managed, after target virtual machine process and the binding of target processor set, the processing in target virtual machine process belonging to each thread
Device set is the processor in target processor set in operating system.
In the embodiment of the present application, after target virtual machine process and target processor set are bound, target virtual machine into
The thread information of each thread is certain in journey may have occurred change, for example, affiliated processor sets etc..Thus, in order to follow-up
Each thread in target virtual machine process is tied on the alignment processing device in target processor set, it is necessary first to obtain target
The thread information of each thread in virtual machine process.
Optionally, the mode for obtaining the thread information of each thread may include at least one of following several modes:
1, the ThreadMXBean based on RMI JMX obtains the thread information of each thread in target virtual machine process.
JMX (java management extensions) is a frame that management function is implanted into for application program, RMI
(remote method invocation) is the object communication agreement between different JVM.ThreadMXBean interfaces provide
The functions such as thread time management, contention monitoring.Thus, the ThreadMXBean based on RMI JMX can obtain the line of each thread
Journey information.
2, JVMTI VMAgent are based on and realize agentlib code injections, by instruction modification obtain target virtual machine into
The thread information of each thread in journey.
JVMTI (JVM tool interface) is some set of interfaces extended for user that JVM is exposed, and is used for
Develop JVM monitoring, positioning problems and Performance tuning tool common programming interface (API).VMAgent is a Lightweight Process
Virtual machine can be configured, manages and accelerate, thus, in this kind of realization method, it can be incited somebody to action based on JVMTI VMAgent
In agentlib code injections to JVM, and then the line of each thread in target virtual machine process can be got by instruction modification
Journey information.
3, the thread of each thread in jstack analysis output realization acquisition target virtual machine processes is called based on external command
Information.
Since jstack is a kind of included stack trace tool of Java Virtual Machine, be used to print given Java into
Journey ID or core file or the Java stack information of remote debugging service.So based on external command by calling jstack points
The thread information for obtaining each thread in target virtual machine process is realized in analysis output.
4, be based on Java VirtualMachine Attach API and
HotSpotVirtualMachine.remoteDataDump () obtains the thread information of each thread in target virtual machine process.
Java VirtualMachine represent a JVM process, and Attach API are a set of off-gauge can connect
The subclass HotSpotVirtualMachine of API on to JVM, VirtualMachine indicate the virtual machine of hotspot,
RemoteDataDump () indicates teledata pump, thus, based on Java VirtualMachine Attach API and
HotSpotVirtualMachine.remoteDataDump () can get the thread of each thread in target virtual machine process
Information.
It is worth noting that any one of above-mentioned four kinds of modes can get the thread information of each thread, thus,
When specific implementation, most suitable mode can be selected according to actual conditions to obtain the thread information of each thread, the application is implemented
Example is defined not to this, in addition, the embodiment of the present application does not limit the side for the thread information that above-mentioned four kinds obtain each thread yet
Formula is also possible that other modes, and details are not described herein again.
Step 43:According to the thread information of each thread, determines and store the pass of the pairing between each thread and each local thread
System.
In the embodiment of the present application, it is bound in target virtual machine process and target processor set, and gets each thread
Thread information after, if each thread of target virtual machine process is want by normal consistency, then it needs to be determined that going out each thread and target
The pairing relationship that the corresponding each local thread of processor has in processor sets.Correspondingly, according to the above-mentioned each line got
The thread information of journey, it may be determined that go out the pairing relationship between each thread and each local thread, and is stored, this sample prescription
Continue after an action of the bowels and directly acquires.Optionally, according to the pairing between the thread information of each thread each thread determined and each local thread
Relationship can store in an operating system, can directly be inquired in an operating system when subsequently needing in this way, and then obtain this and match
To relationship.
Optionally, since the thread priority of each process in virtual machine and the local thread of various different operating systems are preferential
Grade certainly exists certain mapping relations, and the priority for being just enough to encapsulate all operating systems in this way provides unified priority language
Justice.Such as:1-10 thread priorities value in virtual machine may be reflected in linux operating systems with 0-99 priority values
It penetrates, and may then be mapped with 7 priority in windows operating systems, it is then desired to according to actual conditions, determined
Pairing relationship between each thread and each local thread.
Thread scheduling method provided by the embodiments of the present application passes through each thread in obtaining target virtual machine process and operation
Before pairing relationship in system between each local thread, target virtual machine process and target processor set are bound,
The thread information of each thread in target virtual machine process is obtained, and according to the thread information of each thread, determines and stores each thread
It is the corresponding position being subsequently bundled in each thread respectively in target processor set with the pairing relationship between each local thread
It manages on device, each thread is made to provide realization possibility by corresponding processor scheduling, to solve existing preemptive type thread scheduling method
In the multithreading that is likely to occur be lined up obstructing problem and lay a good foundation.
Optionally, in the embodiment of the application, which can also include the following steps:
According to the thread information of each thread, the scheduling strategy of each real-time thread in each thread is changed, so that each real-time thread
Scheduling strategy be Real-Time Scheduling Police.
Optionally, since operating system is when creating thread, the scheduling mode for giving tacit consent to thread is SCHED_OTHER (timesharing
Scheduling strategy), but each thread in target virtual machine process may be real-time thread a bit, thus, in order to ensure real-time thread
Can be by priority scheduling, and will not processor resource be seized by other threads, it can be changed each according to the thread information of each thread
The scheduling strategy of each real-time thread is changed to Real-Time Scheduling Police, to improve reality by the scheduling strategy of each real-time thread in thread
When thread execution stationarity.
Optionally, for JVM, then the scheduling strategy of each real-time thread in each thread can be changed in the following way,
Specifically, realizing JVM lines by the sched_setscheduler functions in the libraries JNA call operation system lib in java codes
Journey Real-Time Scheduling Police is changed.
Wherein, the sched_setscheduler () function is to the scheduling strategy and scheduling parameter of changing thread, i.e.,
Scheduling strategy for thread to be arranged.
Thread scheduling method provided by the embodiments of the present application can be applied to the pure libraries java first, be answered in upper-level virtual machine
It is directly called in, the deficiency for solving virtual machine application platform, for example, thread blockage problem, improves platform property;
Secondly, which can also be widely used in various real-time calculating and accelerate scene, solve fast datarams and calculate
The task caused by processor scheduling cannot execute in time, cause the fluctuation of task execution time delay big, when task execution is completed
Between unpredictable problem, reduce the fluctuation of task execution time delay so that the task execution deadline is predictable;Again, the line
Journey dispatching method can solve the insufficient limitation of virtual machine function itself, realize at target virtual machine process thread and target
The independent assortment arrangement for managing device set, changes the Real-Time Scheduling Police of virtual machine thread so that real-time thread operates in always
It on fixed processor, is not influenced by other threads, reduces processor resource consumption caused by context switching, ensure thread
Task execution time is steady.
Fig. 5 is the structural schematic diagram of thread scheduling device embodiment one provided by the embodiments of the present application.The thread scheduling fills
Setting being implemented in combination with by software, hardware or both, or integrated chip in a computer.As shown in figure 5,
The thread scheduling device may include:Acquisition module 51 and processing module 52.
Wherein, acquisition module 51, for obtaining each thread and each ground wire in operating system in target virtual machine process
Pairing relationship between journey.
In the present embodiment, each local thread is corresponding with target processor set, the target processor set
Including at least one of operating system processor, the number of threads in the target virtual machine process is less than or equal to the behaviour
Make the quantity of local thread in system.
The processing module 52, each thread for being got according to above-mentioned acquisition module 51 and each local thread
Between pairing relationship, each thread is bundled in respectively on the alignment processing device in the target processor set so that
Each thread is by corresponding processor scheduling.
Thread scheduling device provided by the embodiments of the present application, implementing principle and technical effect and aforementioned side shown in Fig. 2
Method embodiment is similar, and details are not described herein.
Optionally, in the embodiment of the application, above-mentioned processing module 52 is additionally operable to obtain in above-mentioned acquisition module 51
Before pairing relationship in target virtual machine process in each thread and operating system between each local thread, by the destination virtual
Machine process is bound with the target processor set.
Optionally, in above-described embodiment of the application, above-mentioned acquisition module 51, being additionally operable to will in above-mentioned processing module 52
After the target virtual machine process is bound with the target processor set, obtain each in the target virtual machine process
The thread information of thread.
Correspondingly, above-mentioned processing module 52, is additionally operable to the line of each thread got according to above-mentioned acquisition module 51
Journey information determines and stores the pairing relationship between each thread and each local thread.
Optionally, in any of the above-described embodiment of the application, in each thread and the target processor set
At least one processor binding.
Optionally, each thread is bound with a processor in the target processor set.
Optionally, in another embodiment of the application, above-mentioned processing module 52 is additionally operable to according to above-mentioned acquisition module 51
The thread information of each thread got changes the scheduling strategy of each real-time thread in each thread, so that described each
The scheduling strategy of real-time thread is Real-Time Scheduling Police.
Optionally, in any of the above-described embodiment of the application, the thread information includes at least one of following:Thread
Name, thread number, the priority of thread, the operating status of thread, the scheduling strategy of thread, affiliated processor sets.
Optionally, thread scheduling device provided by the embodiments of the present application can be that a kind of the general of fast generating date is set
Standby, the code and data of execution are customizable, have the execution speed being exceedingly fast, and can need horizontal extension according to performance, in gold
Melt air control, Internet of Things to handle in real time, in real time in a variety of scenes stringent to delay sensitive and performance requirement such as analysis, Real-time Decision
It plays an important role.
Fig. 6 is the structural schematic diagram of thread scheduling device embodiment two provided by the embodiments of the present application.As shown in fig. 6, this
Apply for the thread scheduling device that embodiment provides, including:Memory 61 and processor 62.
Wherein, memory 61, for storing program instruction, which can be flash (flash memory).Processor 62 is used
In calling and executing the program instruction in memory 61, to realize each step in Fig. 2 and thread scheduling method shown in Fig. 4
Suddenly.The specific associated description that may refer in previous methods embodiment, details are not described herein again.
Optionally, memory 61 can also be to be integrated with processor 62 either independent.
The embodiment of the present application also provides a kind of electronic equipment, which includes processor, memory and be stored in institute
The computer program that can be run on memory and on the processor is stated, the processor is realized as above when executing described program
State Fig. 2 and thread scheduling method shown in Fig. 4.
The embodiment of the present application also provides a kind of storage medium, and instruction is stored in the storage medium, when it is in computer
When upper operation so that computer executes above-mentioned Fig. 2 and thread scheduling method shown in Fig. 4.
The embodiment of the present application also provides a kind of program product, which includes computer program, the computer program
It is stored in a storage medium.At least one processor of thread scheduling device can read the computer program from storage medium,
At least one processor executes the computer program and thread scheduling device is made to execute above-mentioned Fig. 2 and thread scheduling shown in Fig. 4
Each step of method.
Optionally, the embodiment of the present application provides the also a kind of chip of operating instruction, the chip for execute above-mentioned Fig. 2 with
The method of embodiment illustrated in fig. 4.
It should be noted that it should be understood that the modules of apparatus above division be only a kind of division of logic function,
It can completely or partially be integrated on a physical entity in actual implementation, it can also be physically separate.And these modules can be with
All realized in the form of software is called by processing element;It can also all realize in the form of hardware;It can also part mould
Block calls the form of software to realize by processing element, and part of module is realized by the form of hardware.For example, determining module can be with
For the processing element individually set up, it can also be integrated in some chip of above-mentioned apparatus and realize, in addition it is also possible to program
The form of code is stored in the memory of above-mentioned apparatus, is called by some processing element of above-mentioned apparatus and is executed above true
The function of cover half block.The realization of other modules is similar therewith.In addition these modules can completely or partially integrate, and also may be used
With independent realization.Processing element described here can be a kind of integrated circuit, the processing capacity with signal.In the process of realization
In, each step of the above method or more modules can by the integrated logic circuit of the hardware in processor elements or
The instruction of software form is completed.
For example, the above module can be arranged to implement one or more integrated circuits of above method, such as:
One or more specific integrated circuits (application specific integrated circuit, ASIC), or, one
Or multi-microprocessor (digital singnal processor, DSP), or, one or more field programmable gate array
(field programmable gate array, FPGA) etc..For another example, when some above module dispatches journey by processing element
When the form of sequence code is realized, which can be general processor, such as central processing unit (central
Processing unit, CPU) or it is other can be with the processor of caller code.For another example, these modules can be integrated in one
It rises, is realized in the form of system on chip (system-on-a-chip, SOC).
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or its arbitrary combination real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program
Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or
It partly generates according to the flow or function described in the embodiment of the present application.The computer can be all-purpose computer, special meter
Calculation machine, computer network or other programmable devices.The computer instruction can be stored in computer readable storage medium
In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer
Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center
User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or
Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or
It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with
It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state disk
Solid state disk (SSD)) etc..
Term " multiple " herein refers to two or more.The terms "and/or", only a kind of description
The incidence relation of affiliated partner indicates may exist three kinds of relationships, for example, A and/or B, can indicate:Individualism A, simultaneously
There are A and B, these three situations of individualism B.In addition, character "/" herein, it is a kind of to typically represent forward-backward correlation object
The relationship of "or";In formula, character "/" indicates that forward-backward correlation object is the relationship of a kind of " being divided by ".
It is understood that in the area that the various digital numbers involved in embodiments herein only carry out for convenience of description
Point, it is not intended to limit the range of embodiments herein.
It is understood that in embodiments herein, size of the sequence numbers of the above procedures is not meant to execute
The execution sequence of the priority of sequence, each process should be determined by its function and internal logic, without coping with embodiments herein
Implementation process constitutes any restriction.
Claims (16)
1. a kind of thread scheduling method, which is characterized in that including:
Obtain the pairing relationship in each thread and operating system between each local thread, each local in target virtual machine process
Thread is corresponding with target processor set, and the target processor set includes at least one of operating system processor,
Number of threads in the target virtual machine process is less than or equal to the quantity of local thread in the operating system;
According to the pairing relationship between each thread and each local thread, each thread is bundled in the mesh respectively
It marks on the alignment processing device in processor sets, so that each thread is by corresponding processor scheduling.
2. according to the method described in claim 1, it is characterized in that, in the acquisition target virtual machine process each thread with behaviour
Before making the pairing relationship in system between each local thread, the method further includes:
The target virtual machine process and the target processor set are bound.
3. according to the method described in claim 2, it is characterized in that, described by the target virtual machine process and the target
After processor sets are bound, the method further includes:
Obtain the thread information of each thread in the target virtual machine process;
According to the thread information of each thread, determines and store the pass of the pairing between each thread and each local thread
System.
4. according to claim 1-3 any one of them methods, which is characterized in that each thread and the target processor collection
At least one of conjunction processor binding.
5. according to the method described in claim 4, it is characterized in that, each thread and one in the target processor set
A processor binding.
6. according to claim 1-3 any one of them methods, which is characterized in that the method further includes:
According to the thread information of each thread, the scheduling strategy of each real-time thread in each thread is changed, so that described each
The scheduling strategy of real-time thread is Real-Time Scheduling Police.
7. according to the method described in claim 3, it is characterized in that, the thread information includes at least one of following:Thread name,
Thread number, the priority of thread, the operating status of thread, the scheduling strategy of thread, affiliated processor sets.
8. a kind of thread scheduling device, which is characterized in that including:Acquisition module and processing module;
The acquisition module, for obtaining in target virtual machine process matching between each local thread in each thread and operating system
To relationship, each local thread is corresponding with target processor set, and the target processor set includes in operating system
At least one processor, the number of threads in the target virtual machine process is less than or equal to this ground wire in the operating system
The quantity of journey;
The processing module, between each thread and each local thread for being got according to the acquisition module
Each thread is bundled on the alignment processing device in the target processor set by pairing relationship respectively, so that described each
Thread is by corresponding processor scheduling.
9. device according to claim 8, which is characterized in that
The processing module is additionally operable to obtain in target virtual machine process in the acquisition module each in each thread and operating system
Before pairing relationship between local thread, the target virtual machine process and the target processor set are bound.
10. device according to claim 9, which is characterized in that
The acquisition module is additionally operable to the target virtual machine process and the target processor set in the processing module
After being bound, the thread information of each thread in the target virtual machine process is obtained;
The processing module is additionally operable to the thread information of each thread got according to the acquisition module, determines and deposits
Store up the pairing relationship between each thread and each local thread.
11. according to claim 8-10 any one of them devices, which is characterized in that each thread and the target processor
The processor binding of at least one of set.
12. according to the devices described in claim 11, which is characterized in that in each thread and the target processor set
One processor binding.
13. according to claim 8-10 any one of them devices, which is characterized in that
The processing module, is additionally operable to the thread information of each thread got according to the acquisition module, described in change
The scheduling strategy of each real-time thread in each thread, so that the scheduling strategy of each real-time thread is Real-Time Scheduling Police.
14. device according to claim 10, which is characterized in that the thread information includes at least one of following:Thread
Name, thread number, the priority of thread, the operating status of thread, the scheduling strategy of thread, affiliated processor sets.
15. a kind of electronic equipment, including processor, memory and it is stored on the memory and can transports on the processor
Capable computer program, which is characterized in that the processor is realized when executing described program such as any one of the claims 1-7
The method.
16. a kind of storage medium, which is characterized in that instruction is stored in the storage medium, when run on a computer,
So that computer executes such as claim 1-7 any one of them methods.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810395327.1A CN108804211A (en) | 2018-04-27 | 2018-04-27 | Thread scheduling method, device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810395327.1A CN108804211A (en) | 2018-04-27 | 2018-04-27 | Thread scheduling method, device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108804211A true CN108804211A (en) | 2018-11-13 |
Family
ID=64094102
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810395327.1A Pending CN108804211A (en) | 2018-04-27 | 2018-04-27 | Thread scheduling method, device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108804211A (en) |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110347489A (en) * | 2019-07-12 | 2019-10-18 | 之江实验室 | A kind of method for stream processing that the multicenter data collaborative based on Spark calculates |
CN111181871A (en) * | 2019-08-02 | 2020-05-19 | 腾讯科技(深圳)有限公司 | Message transmission method and related device |
CN111242943A (en) * | 2020-01-22 | 2020-06-05 | 腾讯科技(深圳)有限公司 | Image processing method, image processing apparatus, image processing device, and storage medium |
CN111324432A (en) * | 2020-01-21 | 2020-06-23 | 腾讯科技(深圳)有限公司 | Processor scheduling method, device, server and storage medium |
CN111650895A (en) * | 2020-04-08 | 2020-09-11 | 上海航天精密机械研究所 | Automatic line production task dynamic scheduling method |
CN111736959A (en) * | 2020-07-16 | 2020-10-02 | 南京南软科技有限公司 | Spark task scheduling method considering data affinity under heterogeneous cluster |
CN111797110A (en) * | 2020-06-23 | 2020-10-20 | 北京金堤科技有限公司 | Method and device for generating scheduling model, computer equipment and storage medium |
CN111813521A (en) * | 2020-07-01 | 2020-10-23 | Oppo广东移动通信有限公司 | Thread scheduling method and device, storage medium and electronic equipment |
CN111858056A (en) * | 2020-07-24 | 2020-10-30 | 南方电网数字电网研究院有限公司 | Task scheduling method and device, computer equipment and storage medium |
WO2020238967A1 (en) * | 2019-05-28 | 2020-12-03 | 深圳市道通智能航空技术有限公司 | Multi-thread exiting method and mobile terminal |
CN112579249A (en) * | 2019-09-30 | 2021-03-30 | 奇安信安全技术(珠海)有限公司 | Multi-CPU virtual machine operation method and device, storage medium and computer equipment |
CN112631802A (en) * | 2019-04-29 | 2021-04-09 | 杭州涂鸦信息技术有限公司 | Inter-thread communication method and related device |
CN112817762A (en) * | 2021-01-29 | 2021-05-18 | 中汽创智科技有限公司 | Dispatching system based on adaptive automobile open system architecture standard and dispatching method thereof |
CN113467884A (en) * | 2021-05-25 | 2021-10-01 | 阿里巴巴新加坡控股有限公司 | Resource allocation method and device, electronic equipment and computer readable storage medium |
CN114706671A (en) * | 2022-05-17 | 2022-07-05 | 中诚华隆计算机技术有限公司 | Multiprocessor scheduling optimization method and system |
CN115794450A (en) * | 2023-02-13 | 2023-03-14 | 中国人民解放军国防科技大学 | Parallelism optimization method, system and medium for microkernel system service |
CN116627549A (en) * | 2023-05-30 | 2023-08-22 | 云海链控股股份有限公司 | General function calling method, device, equipment and medium under SGX multithreading |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101976201A (en) * | 2010-10-22 | 2011-02-16 | 北京航空航天大学 | CPU affinity-based virtual CPU dynamic binding method |
CN103617071A (en) * | 2013-12-02 | 2014-03-05 | 北京华胜天成科技股份有限公司 | Method and device for improving calculating ability of virtual machine in resource monopolizing and exclusive mode |
CN105700949A (en) * | 2014-11-24 | 2016-06-22 | 中兴通讯股份有限公司 | Data processing method and device based on multi-core processor |
CN106371894A (en) * | 2016-08-31 | 2017-02-01 | 华为技术有限公司 | Collocation method, collocation device and data processing server |
CN106775927A (en) * | 2016-11-25 | 2017-05-31 | 郑州云海信息技术有限公司 | A kind of processor partition method and device based on KVM virtualization technology |
-
2018
- 2018-04-27 CN CN201810395327.1A patent/CN108804211A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101976201A (en) * | 2010-10-22 | 2011-02-16 | 北京航空航天大学 | CPU affinity-based virtual CPU dynamic binding method |
CN103617071A (en) * | 2013-12-02 | 2014-03-05 | 北京华胜天成科技股份有限公司 | Method and device for improving calculating ability of virtual machine in resource monopolizing and exclusive mode |
CN105700949A (en) * | 2014-11-24 | 2016-06-22 | 中兴通讯股份有限公司 | Data processing method and device based on multi-core processor |
CN106371894A (en) * | 2016-08-31 | 2017-02-01 | 华为技术有限公司 | Collocation method, collocation device and data processing server |
CN106775927A (en) * | 2016-11-25 | 2017-05-31 | 郑州云海信息技术有限公司 | A kind of processor partition method and device based on KVM virtualization technology |
Non-Patent Citations (1)
Title |
---|
黄煜 等: ""KVM虚拟化技术中处理器隔离的实现"", 《计算机系统应用》 * |
Cited By (27)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112631802B (en) * | 2019-04-29 | 2024-04-12 | 杭州涂鸦信息技术有限公司 | Inter-thread communication method and related device |
CN112631802A (en) * | 2019-04-29 | 2021-04-09 | 杭州涂鸦信息技术有限公司 | Inter-thread communication method and related device |
WO2020238967A1 (en) * | 2019-05-28 | 2020-12-03 | 深圳市道通智能航空技术有限公司 | Multi-thread exiting method and mobile terminal |
US11853153B2 (en) | 2019-05-28 | 2023-12-26 | Autel Robotics Co., Ltd. | Multi-thread exit method and mobile terminal |
CN110347489A (en) * | 2019-07-12 | 2019-10-18 | 之江实验室 | A kind of method for stream processing that the multicenter data collaborative based on Spark calculates |
CN110347489B (en) * | 2019-07-12 | 2021-08-03 | 之江实验室 | Multi-center data collaborative computing stream processing method based on Spark |
CN111181871B (en) * | 2019-08-02 | 2022-03-25 | 腾讯科技(深圳)有限公司 | Message transmission method and related device |
CN111181871A (en) * | 2019-08-02 | 2020-05-19 | 腾讯科技(深圳)有限公司 | Message transmission method and related device |
CN112579249A (en) * | 2019-09-30 | 2021-03-30 | 奇安信安全技术(珠海)有限公司 | Multi-CPU virtual machine operation method and device, storage medium and computer equipment |
CN111324432A (en) * | 2020-01-21 | 2020-06-23 | 腾讯科技(深圳)有限公司 | Processor scheduling method, device, server and storage medium |
CN111242943A (en) * | 2020-01-22 | 2020-06-05 | 腾讯科技(深圳)有限公司 | Image processing method, image processing apparatus, image processing device, and storage medium |
CN111242943B (en) * | 2020-01-22 | 2022-10-28 | 腾讯科技(深圳)有限公司 | Image processing method, image processing apparatus, storage medium, and image processing device |
CN111650895A (en) * | 2020-04-08 | 2020-09-11 | 上海航天精密机械研究所 | Automatic line production task dynamic scheduling method |
CN111650895B (en) * | 2020-04-08 | 2023-07-04 | 上海航天精密机械研究所 | Automatic line production task dynamic scheduling method |
CN111797110A (en) * | 2020-06-23 | 2020-10-20 | 北京金堤科技有限公司 | Method and device for generating scheduling model, computer equipment and storage medium |
CN111797110B (en) * | 2020-06-23 | 2024-01-26 | 北京金堤科技有限公司 | Method, device, computer equipment and storage medium for generating scheduling model |
CN111813521A (en) * | 2020-07-01 | 2020-10-23 | Oppo广东移动通信有限公司 | Thread scheduling method and device, storage medium and electronic equipment |
CN111736959A (en) * | 2020-07-16 | 2020-10-02 | 南京南软科技有限公司 | Spark task scheduling method considering data affinity under heterogeneous cluster |
CN111858056A (en) * | 2020-07-24 | 2020-10-30 | 南方电网数字电网研究院有限公司 | Task scheduling method and device, computer equipment and storage medium |
CN112817762A (en) * | 2021-01-29 | 2021-05-18 | 中汽创智科技有限公司 | Dispatching system based on adaptive automobile open system architecture standard and dispatching method thereof |
CN113467884A (en) * | 2021-05-25 | 2021-10-01 | 阿里巴巴新加坡控股有限公司 | Resource allocation method and device, electronic equipment and computer readable storage medium |
WO2022247698A1 (en) * | 2021-05-25 | 2022-12-01 | 阿里巴巴(中国)有限公司 | Resource configuration method and apparatus, electronic device, and computer-readable storage medium |
CN114706671A (en) * | 2022-05-17 | 2022-07-05 | 中诚华隆计算机技术有限公司 | Multiprocessor scheduling optimization method and system |
CN114706671B (en) * | 2022-05-17 | 2022-08-12 | 中诚华隆计算机技术有限公司 | Multiprocessor scheduling optimization method and system |
CN115794450A (en) * | 2023-02-13 | 2023-03-14 | 中国人民解放军国防科技大学 | Parallelism optimization method, system and medium for microkernel system service |
CN116627549A (en) * | 2023-05-30 | 2023-08-22 | 云海链控股股份有限公司 | General function calling method, device, equipment and medium under SGX multithreading |
CN116627549B (en) * | 2023-05-30 | 2024-03-26 | 云海链控股股份有限公司 | General function calling method, device, equipment and medium under SGX multithreading |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108804211A (en) | Thread scheduling method, device, electronic equipment and storage medium | |
US9886305B2 (en) | Determining the status of plurality of threads by monitoring the execution of folded thread | |
US9465663B2 (en) | Allocating resources in a compute farm to increase resource utilization by using a priority-based allocation layer to allocate job slots to projects | |
KR101312886B1 (en) | Process scheduler employing adaptive partitioning of process threads | |
KR100898315B1 (en) | Enhanced runtime hosting | |
US8145817B2 (en) | Reader/writer lock with reduced cache contention | |
US8631409B2 (en) | Adaptive partitioning scheduler for multiprocessing system | |
EP1912119B1 (en) | Synchronization and concurrent execution of control flow and data flow at task level | |
CN100377091C (en) | Grouped hard realtime task dispatching method of built-in operation system | |
CN106371894A (en) | Collocation method, collocation device and data processing server | |
CN109522101A (en) | For dispatching the method, system and/or device of multiple operating system tasks | |
US8006064B2 (en) | Lock-free vector utilizing a resource allocator for assigning memory exclusively to a thread | |
WO2005048009A2 (en) | Method and system for multithreaded processing using errands | |
WO2022257435A1 (en) | Method and apparatus for processing batch of tasks, computing device, and storage medium | |
Yu et al. | Colab: a collaborative multi-factor scheduler for asymmetric multicore processors | |
Huh et al. | Cross‐layer resource control and scheduling for improving interactivity in Android | |
US9229716B2 (en) | Time-based task priority boost management using boost register values | |
Müller et al. | MULTI SLOTH: An efficient multi-core RTOS using hardware-based scheduling | |
Casini et al. | Addressing analysis and partitioning issues for the Waters 2019 challenge | |
US11301304B2 (en) | Method and apparatus for managing kernel services in multi-core system | |
Parikh et al. | Performance parameters of RTOSs; comparison of open source RTOSs and benchmarking techniques | |
Finkelstein et al. | Real time threads interface | |
CN115051980B (en) | HTCondor super-calculation grid file transmission method and system | |
US20240036868A1 (en) | Schedulable Asynchronous Methods with Semi-Reactive Completion Stages | |
Bacou et al. | Your Containers should be WYSIWYG |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20220214 Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province Applicant after: Huawei Cloud Computing Technology Co.,Ltd. Address before: No. 127, Jinye Road, high tech Zone, Xi'an, Shaanxi 710075 Applicant before: Huawei Technologies Co.,Ltd, Xi'an |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181113 |