CN107479958A - A kind of process scheduling method and device based on multiple nucleus system - Google Patents
A kind of process scheduling method and device based on multiple nucleus system Download PDFInfo
- Publication number
- CN107479958A CN107479958A CN201710702026.4A CN201710702026A CN107479958A CN 107479958 A CN107479958 A CN 107479958A CN 201710702026 A CN201710702026 A CN 201710702026A CN 107479958 A CN107479958 A CN 107479958A
- Authority
- CN
- China
- Prior art keywords
- business
- request information
- business request
- sent
- nucleus system
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a kind of process scheduling method based on multiple nucleus system, applied to the first process, comprise the following steps:During current business is handled, if reaching subprocess starts trigger condition, the business request information for current business is sent to the second process;Receive the feedback message for business request information of the second process return.The technical scheme provided using the embodiment of the present invention, in the case where not influencing the course with CPU binding relationship, first process passes through business request information, ask the related service of the second process processing current business, second process is according to business request information, handle related service, processing sends the feedback message for business request information to the first process after completing, first process is after feedback message is received, continue with current business, the speed of business processing is accelerated, improves the performance of multiple nucleus system.The invention also discloses a kind of process scheduling device based on multiple nucleus system, has relevant art effect.
Description
Technical field
The present invention relates to Computer Applied Technology field, more particularly to a kind of process scheduling method based on multiple nucleus system
And device.
Background technology
With the development of science and technology, multiple nucleus system because its can increase substantially computer processing data and instruction speed
Degree, by extensive concern, such as common SMP (Symmetric multiprocessing, symmetric multi-processors).
In multiple nucleus system, when some process needs to simplify business processing logic, it can typically use and start subprocess
Mode carry out business processing.Now, one CPU of selection that new subprocess needs multiple nucleus system random enters to run the son
Journey.In multiple nucleus system, in order to improve business processing speed, generally process and CPU are bound, and it is usual to start subprocess
Process and CPU binding relationship can be upset, after the binding relationship for upsetting process and CPU, often disturb process scheduling, Jin Erzeng
The overhead that journey is scheduled switching between CPU is added, reduces business processing speed, influences the performance of multiple nucleus system.
In summary, process scheduling how is effectively carried out in multiple nucleus system, accelerates business processing speed, improves multinuclear
The problems such as performance of system, it is the technical problem that current those skilled in the art are badly in need of solving.
The content of the invention
It is an object of the invention to provide a kind of process scheduling method and device based on multiple nucleus system, to accelerate business processing
Speed, improve the performance of multiple nucleus system.
In order to solve the above technical problems, the present invention provides following technical scheme:
A kind of process scheduling method based on multiple nucleus system, applied to the first process, including:
During the first process handles current business, if reaching subprocess starts trigger condition, it will be directed to described
The business request information of current business is sent to the second process;
Receive the feedback message for the business request information that second process returns.
Preferably, it is described the business request information for the current business is sent to the second process after, also wrap
Include:
If do not receive the second process return when reaching the time interval of setting is directed to the service request
The feedback message of message, then repeat and described the business request information for the current business is sent to the second process
Step.
Preferably, in addition to:
If number of repetition reaches given threshold, the business request information is sent to the 3rd process.
Preferably, when the number of repetition reaches given threshold, in addition to:
The business revocation message for the business request information is sent to second process.
Preferably, it is described receive the feedback message for the business request information that second process returns it
Afterwards, in addition to:
If the feedback message is business processing failed message, repeat described by for the current business
Business request information is sent to the step of the second process, or, the business request information is sent to the 4th process.
A kind of process scheduling device based on multiple nucleus system, applied to the first process, including:
Business request information sending module, for during current business is handled, being triggered if reaching subprocess and starting
Condition, then the business request information for the current business is sent to the second process;
Feedback message receiving module, the feedback for the business request information returned for receiving second process
Message.
Preferably, in addition to timeout treatment module, it is used for:
It is described the business request information for the current business is sent to the second process after, if set reaching
The feedback message for the business request information that second process returns is not received during fixed time interval, then is triggered
The business request information sending module.
Preferably, the timeout treatment module, is additionally operable to:
If number of repetition reaches given threshold, the business request information is sent to the 3rd process.
Preferably, the timeout treatment module, is additionally operable to:
When the number of repetition reaches given threshold, sent to second process for the business request information
Business revocation message.
Preferably, in addition to feedback message processing module, it is used for:
After the feedback message for the business request information for receiving second process and returning, if institute
It is business processing failed message to state feedback message, then triggers the business request information sending module, or, please by the business
Message is asked to be sent to the 4th process.
The technical scheme provided using the embodiment of the present invention, the first process is during current business is handled, if reached
Start trigger condition to subprocess, then the business request information for current business is sent to the second process, then receive the
The feedback message for business request information that two processes return.In the case where not influencing the course with CPU binding relationship, the
One process receives business by business request information, the related service of request the second process processing current business, the second process
After request message, the related service in business request information is handled, the second process has been handled after related service to first
Process sends the feedback message for business request information, and then the first process disappears according to the feedback of the second process received
Breath, continues with current business, accelerates the speed of business processing, improve the performance of multiple nucleus system.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of implementing procedure figure of the process scheduling method based on multiple nucleus system in the embodiment of the present invention;
Fig. 2 is a kind of structural representation of the process scheduling device based on multiple nucleus system in the embodiment of the present invention.
Embodiment
The core of the present invention is to provide a kind of process scheduling method based on multiple nucleus system, and this method can apply to first
Process.First process, if reaching subprocess starts trigger condition, will be directed to current business during current business is handled
Business request information be sent to the second process, receive the feedback message for business request information that the second process returns, with
Current business is continued with based on the feedback message, accelerates the speed of business processing, improves the performance of multiple nucleus system.
In order that those skilled in the art more fully understand the present invention program, with reference to the accompanying drawings and detailed description
The present invention is described in further detail.Obviously, described embodiment is only part of the embodiment of the present invention, rather than
Whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creative work premise
Lower obtained every other embodiment, belongs to the scope of protection of the invention.
Fig. 1 is refer to, Fig. 1 is a kind of implementing procedure of the process scheduling method based on multiple nucleus system in the embodiment of the present invention
Figure, this method include:
S101, during current business is handled, if reach subprocess start trigger condition, current business will be directed to
Business request information be sent to the second process.
In the present embodiment, one or more subprocess can be pre-set and start trigger condition.Specifically can basis
The processing logic of current business is configured.For example, when some process needs to start subprocess to handle some business, such as
When needing to call executable program or script processing current business, it is believed that reached subprocess and started trigger condition.
During the first process handles current business, if reaching subprocess starts trigger condition, it will be directed to and work as
The business request information of preceding business is sent to the second process.After second process receives business request information, according to service request
Message, handle the related service of current business.This way it is possible to avoid the first process is handled currently by way of starting subprocess
During business, multiple nucleus system randomly chooses CPU to run the related service of subprocess processing current business, and destroys original CPU
With the binding relationship between corresponding process.
In the present embodiment, business request information can include the phase of first the second process of process requested processing current business
Close business information.For example, the related service information can include:The logic of request processing related service, processing related service knot
The mode of the return of fruit, time of request processing related service etc..
It should be noted that the second process can be the first process randomly selected process in multiple nucleus system,
Can be a process for having process scheduling binding relationship with the first process, the binding relationship can be pre-set, can also root
It is determined and adjusts according to actual conditions, the embodiment of the present invention is not limited this.
S102, receive the feedback message for business request information that the second process returns.
After business request information for current business is sent to the second process by the first process, the second process can basis
Business request information, the related service of current business is handled, after the completion of processing, the second process can be returned to the first process and is directed to
The feedback message of business request information.
First process can receive the feedback message for business request information of the second process return.
Wherein, after the feedback message can be the related service in the normal processing business request message of the second process, return
Business processing success message;Can also be the second process can not normally related service in processing business request message when, return
The business processing failed message returned.
First process can be continued with according to feedback message and worked as after the feedback message for business request information is obtained
Preceding business.
In the specific embodiment of the present invention, the anti-of business request information is directed to what second process that receives returned
After presenting message, if feedback message is business processing failed message, repeat for the service request of current business
Message is sent to the step of the second process, or, business request information is sent to the 4th process.
After first process receives the feedback message for business request information that the second process returns, analyze the feedback and disappear
Breath, if the feedback message is business processing failed message, that is, shows the related industry in the second process processing business request message
Business failure, then it can repeat to send business request information to the second process, or, send business request information to the 4th process.
The method provided using the embodiment of the present invention, the first process is during current business is handled, if reaching son
Process initiation trigger condition, then the business request information for current business is sent to the second process, then receives second and enter
The feedback message for business request information that journey returns.In the case where not influencing the course with CPU binding relationship, first enters
Journey receives service request by business request information, the related service of request the second process processing current business, the second process
After message, the related service in business request information is handled, the second process has been handled after related service to the first process
The feedback message for business request information is sent, then the first process is according to the feedback message of the second process received, after
Continuous processing current business, the speed of business processing is accelerated, improve the performance of multiple nucleus system.
In one embodiment of the invention, the business request information for current business is sent in the first process
After two processes, if do not received when reaching the time interval of setting the second process return for business request information
Feedback message, then repeat the step of business request information for current business is sent to the second process.
In embodiments of the present invention, a time interval can be pre-set, the specific size of time interval can basis
Actual conditions are determined and adjusted, and the embodiment of the present invention does not limit.
During the first process handles current business, if reaching subprocess starts trigger condition, it will be directed to current
The business request information of business is sent to the second process.If pending message is more corresponding to the second process, possibly can not
The timely processing business request information, or, because of reasons such as communication failures, the second process may be caused can not to normally receive the industry
Business request message.These situations all will cause the second process can not normally return to the feedback message for the business request information.
So if the first process does not receive the feedback for business processing message of the second process return in the time interval of setting
Message, then the business request information for current business can be repeated one or more times and be sent to the second process.
Specifically, business request information to be sent to the number of repetition of the second process, can be carried out according to actual conditions true
Fixed and adjustment, the embodiment of the present invention do not limit.
In the specific embodiment of the present invention, if number of repetition reaches given threshold, service request is disappeared
Breath is sent to the 3rd process.
In the present embodiment, a threshold value can be set, specific given threshold size can carry out true according to actual conditions
Fixed and adjustment, the embodiment of the present invention do not limit.
If the first process do not received in the time interval of setting the second process return for business processing message
Feedback message, then business request information is repeated to be sent to the second process.Business request information is being sent to the second process
When number of repetition reaches given threshold, it is believed that the second process can not normally handle the business request information, in such case
Under, business request information can be sent to the 3rd process, to complete the processing to business request information as early as possible.
It should be noted that the 3rd process and the 4th process can be same process, can also be different processes.
, can also be to second when number of repetition reaches given threshold in the another embodiment of the present invention
Process sends the business revocation message for business request information.
When the number that transmission business request information is repeated to the second process reaches given threshold, pin is sent to the second process
To the business revocation message of business request information, to inform that the second process need not the service request that is directed to of processing business revocation message
Message.
Corresponding to above method embodiment, the embodiment of the present invention additionally provides a kind of process scheduling based on multiple nucleus system
Device, applied to the first process, a kind of process scheduling device based on multiple nucleus system described below and above-described one kind
Process scheduling method based on multiple nucleus system can be mutually to should refer to.
Shown in Figure 2, the device is included with lower module:
Business request information sending module 201, for during current business is handled, being touched if reaching subprocess and starting
Clockwork spring part, then the business request information for current business is sent to the second process;
Feedback message receiving module 202, the feedback message for business request information returned for receiving the second process.
The device provided using the embodiment of the present invention, the first process is during current business is handled, if reaching son
Process initiation trigger condition, then the business request information for current business is sent to the second process, then receives second and enter
The feedback message for business request information that journey returns.In the case where not influencing the course with CPU binding relationship, first enters
Journey receives service request by business request information, the related service of request the second process processing current business, the second process
After message, the related service in business request information is handled, the second process has been handled after related service to the first process
The feedback message for business request information is sent, then the first process is according to the feedback message of the second process received, after
Continuous processing current business, the speed of business processing is accelerated, improve the performance of multiple nucleus system.
In a kind of embodiment of the present invention, in addition to timeout treatment module, it is used for:
After the business request information for current business is sent into the second process, if in the time for reaching setting
The feedback message for business request information of the second process return is not received during interval, then triggers business request information and sends
Module 201.
In a kind of embodiment of the present invention, timeout treatment module, it is additionally operable to:
If number of repetition reaches given threshold, business request information is sent to the 3rd process.
In a kind of embodiment of the present invention, timeout treatment module, it is additionally operable to:
When number of repetition reaches given threshold, the business revocation to the transmission of the second process for business request information disappears
Breath.
In a kind of embodiment of the present invention, in addition to feedback message processing module, it is used for:
After the feedback message for business request information that second process that receives returns, if feedback message is business
Processing failure message, then business request information sending module 201 is triggered, or, business request information is sent to the 4th process.
Each embodiment is described by the way of progressive in this specification, what each embodiment stressed be with it is other
The difference of embodiment, between each embodiment same or similar part mutually referring to.For dress disclosed in embodiment
For putting, because it is corresponded to the method disclosed in Example, so description is fairly simple, related part is referring to method part
Explanation.
Professional further appreciates that, with reference to the unit of each example of the embodiments described herein description
And algorithm steps, can be realized with electronic hardware, computer software or the combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software, the composition and step of each example are generally described according to function in the above description.These
Function is performed with hardware or software mode actually, application-specific and design constraint depending on technical scheme.Specialty
Technical staff can realize described function using distinct methods to each specific application, but this realization should not
Think beyond the scope of this invention.
Directly it can be held with reference to the step of method or algorithm that the embodiments described herein describes with hardware, processor
Capable software module, or the two combination are implemented.Software module can be placed in random access memory (RAM), internal memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
Specific case used herein is set forth to the principle and embodiment of the present invention, and above example is said
It is bright to be only intended to help and understand technical scheme and its core concept.It should be pointed out that for the common of the art
For technical staff, under the premise without departing from the principles of the invention, some improvement and modification can also be carried out to the present invention, these
Improve and modification is also fallen into the protection domain of the claims in the present invention.
Claims (10)
- A kind of 1. process scheduling method based on multiple nucleus system, it is characterised in that applied to the first process, including:During current business is handled, if reaching subprocess starts trigger condition, by for the industry of the current business Business request message is sent to the second process;Receive the feedback message for the business request information that second process returns.
- 2. the process scheduling method according to claim 1 based on multiple nucleus system, it is characterised in that will be directed to institute described The business request information for stating current business is sent to after the second process, in addition to:If do not receive the second process return when reaching the time interval of setting is directed to the business request information Feedback message, then repeat the step that the business request information for the current business is sent to the second process Suddenly.
- 3. the process scheduling method according to claim 2 based on multiple nucleus system, it is characterised in that also include:If number of repetition reaches given threshold, the business request information is sent to the 3rd process.
- 4. the process scheduling method according to claim 3 based on multiple nucleus system, it is characterised in that in the number of repetition When reaching given threshold, in addition to:The business revocation message for the business request information is sent to second process.
- 5. the process scheduling method based on multiple nucleus system according to any one of Claims 1-4, it is characterised in that After the feedback message for the business request information for receiving second process and returning, in addition to:If the feedback message is business processing failed message, repeat described by for the business of the current business Request message is sent to the step of the second process, or, the business request information is sent to the 4th process.
- A kind of 6. process scheduling device based on multiple nucleus system, it is characterised in that applied to the first process, including:Business request information sending module, for during current business is handled, if reaching subprocess starts trigger condition, The business request information for the current business is then sent to the second process;Feedback message receiving module, disappear for receiving the feedback for the business request information that second process returns Breath.
- 7. the process scheduling device according to claim 6 based on multiple nucleus system, it is characterised in that also including timeout treatment Module, it is used for:It is described the business request information for the current business is sent to the second process after, if reaching setting The feedback message for the business request information that second process returns is not received during time interval, then described in triggering Business request information sending module.
- 8. the process scheduling device according to claim 7 based on multiple nucleus system, it is characterised in that the timeout treatment mould Block, it is additionally operable to:If number of repetition reaches given threshold, the business request information is sent to the 3rd process.
- 9. the process scheduling device according to claim 8 based on multiple nucleus system, it is characterised in that the timeout treatment mould Block, it is additionally operable to:When the number of repetition reaches given threshold, the business for the business request information is sent to second process Revocation message.
- 10. the process scheduling device based on multiple nucleus system according to any one of claim 6 to 9, it is characterised in that Also include feedback message processing module, be used for:After the feedback message for the business request information for receiving second process and returning, if described anti- Feedback message is business processing failed message, then triggers the business request information sending module, or, the service request is disappeared Breath is sent to the 4th process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710702026.4A CN107479958A (en) | 2017-08-16 | 2017-08-16 | A kind of process scheduling method and device based on multiple nucleus system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710702026.4A CN107479958A (en) | 2017-08-16 | 2017-08-16 | A kind of process scheduling method and device based on multiple nucleus system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107479958A true CN107479958A (en) | 2017-12-15 |
Family
ID=60600504
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710702026.4A Pending CN107479958A (en) | 2017-08-16 | 2017-08-16 | A kind of process scheduling method and device based on multiple nucleus system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107479958A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100083268A1 (en) * | 2008-09-29 | 2010-04-01 | Morris Robert P | Method And System For Managing Access To A Resource By A Process Processing A Media Stream |
CN103246557A (en) * | 2012-02-07 | 2013-08-14 | 腾讯科技(深圳)有限公司 | Method and device for calling application information in cross process mode |
CN104636210A (en) * | 2013-11-07 | 2015-05-20 | 腾讯科技(深圳)有限公司 | Method and device for achieving data exchanging between progresses |
CN106383743A (en) * | 2016-09-27 | 2017-02-08 | 腾讯科技(深圳)有限公司 | Business processing method and system |
CN106547631A (en) * | 2016-09-26 | 2017-03-29 | 腾讯科技(深圳)有限公司 | Striding course communication means and device based on Android platform |
-
2017
- 2017-08-16 CN CN201710702026.4A patent/CN107479958A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100083268A1 (en) * | 2008-09-29 | 2010-04-01 | Morris Robert P | Method And System For Managing Access To A Resource By A Process Processing A Media Stream |
CN103246557A (en) * | 2012-02-07 | 2013-08-14 | 腾讯科技(深圳)有限公司 | Method and device for calling application information in cross process mode |
CN104636210A (en) * | 2013-11-07 | 2015-05-20 | 腾讯科技(深圳)有限公司 | Method and device for achieving data exchanging between progresses |
CN106547631A (en) * | 2016-09-26 | 2017-03-29 | 腾讯科技(深圳)有限公司 | Striding course communication means and device based on Android platform |
CN106383743A (en) * | 2016-09-27 | 2017-02-08 | 腾讯科技(深圳)有限公司 | Business processing method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110750341B (en) | Task scheduling method, device, system, terminal equipment and storage medium | |
CN105487987B (en) | A kind of concurrent sequence of processing reads the method and device of IO | |
CN107257374A (en) | Transaction processing method and system on a kind of block chain | |
CN105844146B (en) | Method and device for protecting driver and electronic equipment | |
CN106685894B (en) | Risk identification method, device and system | |
CN104965727A (en) | Method and device for restarting server | |
CN107168813A (en) | Task processing method and system | |
CN102882805B (en) | Avoid method and the device of link aggregation group from state transition | |
CN107577561A (en) | A kind of data reconstruction method, device, equipment and computer-readable recording medium | |
CN107908481A (en) | A kind of method of data synchronization, device and system | |
CN106576068B (en) | A kind of software security verification method, equipment and system | |
CN107479958A (en) | A kind of process scheduling method and device based on multiple nucleus system | |
CN107678807A (en) | A kind of software realizes the method and device of state machine | |
CN110213157A (en) | A kind of monitoring method of instant messaging request, apparatus and system | |
CN117785431A (en) | Task scheduling distribution method and device, electronic equipment and storage medium | |
CN107967150A (en) | A kind of thread execution order determines method, apparatus, equipment and storage medium | |
CN117459286A (en) | SD-WAN-based data communication security early warning method and device | |
CN107704328A (en) | Client accesses method, system, device and the storage medium of file system | |
CN109819000A (en) | Methods, devices and systems and machine readable storage medium for PUSH message | |
CN104536926A (en) | Control method and device of serial devices | |
CN107958414B (en) | Method and system for eliminating long transactions of CICS (common integrated circuit chip) system | |
CN105740065A (en) | Method and device for controlling execution of asynchronous tasks | |
CN105656858B (en) | A kind of data-updating method and device | |
CN106502813A (en) | A kind of server hard disc monitoring method and device | |
CN114968581A (en) | Pod scheduling method of Kubernetes cluster and related components |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171215 |
|
RJ01 | Rejection of invention patent application after publication |