CN103164338A - Analogy method and analogy device of concurrent processing system - Google Patents

Analogy method and analogy device of concurrent processing system Download PDF

Info

Publication number
CN103164338A
CN103164338A CN2013100963194A CN201310096319A CN103164338A CN 103164338 A CN103164338 A CN 103164338A CN 2013100963194 A CN2013100963194 A CN 2013100963194A CN 201310096319 A CN201310096319 A CN 201310096319A CN 103164338 A CN103164338 A CN 103164338A
Authority
CN
China
Prior art keywords
concurrent processing
processing system
user
entity
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2013100963194A
Other languages
Chinese (zh)
Other versions
CN103164338B (en
Inventor
文雨
车皓阳
黄文龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XFusion Digital Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310096319.4A priority Critical patent/CN103164338B/en
Publication of CN103164338A publication Critical patent/CN103164338A/en
Application granted granted Critical
Publication of CN103164338B publication Critical patent/CN103164338B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

An embodiment of the invention provides an analogy method and an analogy device of a concurrent processing system. The analogy method of the concurrent processing system includes the steps of adding at least one user request received by at least one executive entity of the concurrent processing system which comprises a plurality of executive entities into a timer queue, adding user requests which are arranged in the timer queue and have waiting time which is equal to or longer than overtime time into a ready queue, and calling at least one executive entity of the concurrent processing system to sequentially process user requests in the ready queue to stimulate the interbehaviors of the concurrent processing system and users. Due to the fact that the executive entities are not just used to stimulate a single user any more, overtime user requests can be carried out through utilizing overtime waiting time of part of user requests. Accordingly, the resource utilization efficiencyduring simulating the concurrent processing system is improved effectively.

Description

The analogy method of concurrent processing system and device
Technical field
The embodiment of the present invention relates to computer technology, relates in particular to analogy method and the device of a kind of concurrent processing system.
Background technology
Along with the development of cloud computing technology, the concurrent processing system of carrying mass data is widely used.The performance of concurrent processing system can directly have influence on the user and experience.Experience and better system performance in order to obtain better user, can utilize benchmark test (Benchmark) technical modelling concurrent user to initiate the application scenarios of mutual request to goal systems.According to the result that user and goal systems interactive quality are simulated, the configuration of the concurrent processing system of reality is adjusted, with the performance of optimization system.
Present Benchmark technology mainly based on system concurrency mechanism, is simulated the concurrent scene of system.System concurrency mechanism can be multi-process or multithreading etc., correspondingly, adopts a process or thread to simulate mutual between a user and system.The deadline of each user request mainly comprises user's keyboard input time, user's the expense of think time, system response time and Benchmark instrument.Generally, user's keyboard input time and think time were at tens seconds to tens seconds, and system response time, by several seconds, the expense of Benchmark instrument arrived several milliseconds in the hundreds of microsecond in a few tens of milliseconds.Wherein, user's keyboard input time and user's think time were compared with the expense of Benchmark instrument with system response time, and the required time of expending is more.
Due in the process of keyboard input time of analog subscriber and think time, the Benchmark technology also needs the resource of the process that takies or thread, and process or thread can be in sleep state in the process of the keyboard input time of waiting for the user and think time end.Resource utilization when therefore, the Benchmark of utilization technology of the prior art is simulated the concurrent processing system is lower.
Summary of the invention
The embodiment of the present invention provides analogy method and the device of a kind of concurrent processing system, the lower problem of resource utilization when being used for solving the Benchmark of utilization technology of the prior art the concurrent processing system being simulated.
First aspect of the embodiment of the present invention is to provide the analogy method of a kind of concurrent processing system, comprising:
At least one of concurrent processing system carried out at least one user's request that entity receives, join in timer queue, described concurrent processing system comprises a plurality of execution entities;
With the user request of the stand-by period in described timer queue more than or equal to time-out time, join in ready queue;
At least one that call described concurrent processing system carried out entity and processed successively user's request in described ready queue, to simulate described concurrent processing system and user's interbehavior.
The analogy method of the concurrent processing system that provides in conjunction with first aspect, in the possible implementation of the first, described execution entity comprises that timer is carried out entity and affairs are carried out entity;
Correspondingly, described at least one with the concurrent processing system carried out at least one user's request that entity receives, and joins timer queue and comprises:
At least one timer of described concurrent processing system is carried out at least one user's request that entity receives, join in described timer queue;
Correspondingly, described at least one that call described concurrent processing system carried out user's request that entity processes in described ready queue successively and comprised:
Call at least one affairs of described concurrent processing system and carry out entity, process successively the user's request in described ready queue.
The analogy method of the concurrent processing system that provides in conjunction with first aspect, in the possible implementation of the second, described at least one with the concurrent processing system carried out at least one user's request that entity receives, and before joining in timer queue, described method also comprises:
In advance for described at least one user request that receives distributes respectively think time and keyboard input time, and with the time-out time of two time sums as described at least one user's request; Wherein, described think time and keyboard are respectively the user's who sends described at least one user's request simulation think time and the Simulation of keyboard input time input time.
The analogy method of the concurrent processing system that provides in conjunction with first aspect, in the third possible implementation, described method also comprises:
In the difference of the throughput of described concurrent processing system and ideal value during more than or equal to threshold value, execution entity number in described concurrent processing system is adjusted, so that each in the described concurrent processing system after carrying out the entity number and adjusting carried out entity, receive user's request.
In conjunction with the third possible implementation of first aspect, in the 4th kind of possible implementation, described execution entity number in described concurrent processing system is adjusted comprises:
According to the historical data of execution entity number, user's number of request and the throughput of described concurrent processing system, obtain the system model of match;
According to the ideal value of throughput and the system model of described match, obtain the execution entity number that upgrades;
According to the execution entity number of described renewal, the execution entity number in described concurrent processing system is adjusted.
In conjunction with any one in the possible implementation of first to fourth kind of first aspect, in the 5th kind of possible implementation, described execution entity is thread;
Correspondingly, it is the timer thread that described timer is carried out entity, and it is the affairs thread that described affairs are carried out entity.
In conjunction with any one in the possible implementation of first to fourth kind of first aspect, in the 6th kind of possible implementation, described execution entity is process;
Correspondingly, it is the timer process that described timer is carried out entity, and it is Transaction that described affairs are carried out entity.
Second aspect of the embodiment of the present invention is to provide the analogue means of a kind of concurrent processing system, comprising:
Receiving element, at least one that is used for the concurrent processing system carried out at least one user's request that entity receives, and joins in timer queue, and described concurrent processing system comprises a plurality of execution entities;
Processing unit is used for the user's request more than or equal to time-out time of stand-by period of described timer queue is joined in ready queue;
Call unit, at least one that is used for calling described concurrent processing system carried out user's request that entity is processed described ready queue successively, to simulate described concurrent processing system and user's interbehavior.
The analogue means of the concurrent processing system that provides in conjunction with second aspect, in the possible implementation of the first, described execution entity comprises that timer is carried out entity and affairs are carried out entity;
Correspondingly, described receiving element specifically is used for:
At least one timer of described concurrent processing system is carried out at least one user's request that entity receives, join in described timer queue;
Correspondingly, described call unit also specifically in:
Call at least one affairs of described concurrent processing system and carry out entity, process successively the user's request in described ready queue.
The analogue means of the concurrent processing system that provides in conjunction with second aspect, in the possible implementation of the second, the analogue means of described concurrent processing system also comprises:
Allocation units are used in advance for described at least one user's request that receives distributes respectively think time and keyboard input time, and with the time-out time of two time sums as described at least one user's request; Wherein, described think time and keyboard are respectively the user's who sends described at least one user's request simulation think time and the Simulation of keyboard input time input time.
The analogue means of the concurrent processing system that provides in conjunction with second aspect, in the third possible implementation, the analogue means of described concurrent processing system also comprises:
Adjustment unit, when being used for difference in the throughput of described concurrent processing system and ideal value more than or equal to threshold value, execution entity number in described concurrent processing system is adjusted, so that each in the described concurrent processing system after carrying out the entity number and adjusting carried out entity, receive user's request.
In conjunction with the third possible implementation of second aspect, in the 4th kind of possible implementation, described adjustment unit specifically comprises:
Fitting module is used for the historical data according to execution entity number, user's number of request and the throughput of described concurrent processing system, obtains the system model of match;
Update module is used for the system model of the match that ideal value and described fitting module according to throughput obtain, and obtains the execution entity number that upgrades;
Adjusting module is used for the execution entity number according to described renewal, and the execution entity number in described concurrent processing system is adjusted.
In conjunction with any one in first to fourth kind of second aspect possible implementation, the 5th kind may implementation in, the described execution entity of described concurrent processing system is thread;
Correspondingly, it is the timer thread that described timer is carried out entity, and it is the affairs thread that described affairs are carried out entity.
In conjunction with any one in first to fourth kind of second aspect possible implementation, the 6th kind may implementation in, the described execution entity of described concurrent processing system is process;
Correspondingly, it is the timer process that described timer is carried out entity, and it is Transaction that described affairs are carried out entity.
Analogy method and the device of the embodiment of the present invention provides concurrent processing system, at least one of concurrent processing system carried out at least one user's request that entity receives, join in timer queue, with the user request of the stand-by period in timer queue more than or equal to time-out time, join in ready queue, at least one that call the concurrent processing system carried out entity and processed successively user's request in ready queue, to simulate described concurrent processing system and user's interbehavior; By at least one user's request of polymerization in the execution entity of concurrent processing system, wherein overtime user's request is added in ready queue, process successively again the user's request in ready queue, no longer only be used for the simulation unique user owing to carrying out entity, therefore can utilize the time of certain customers' request wait timeout, process overtime user request, effectively improved the resource utilization when the concurrent processing system is simulated.
Description of drawings
The process flow diagram of the analogy method of Fig. 1 provides for the embodiment of the present invention concurrent processing system;
The process flow diagram of the analogy method of Fig. 2 provides for the embodiment of the present invention another concurrent processing system;
The structural representation of the analogue means of Fig. 3 provides for the embodiment of the present invention concurrent processing system;
The structural representation of the analogue means of Fig. 4 provides for the embodiment of the present invention another concurrent processing system;
The structural representation of the analogue means of Fig. 5 provides for the embodiment of the present invention another concurrent processing system.
Embodiment
Resource utilization when in order to improve, the concurrent processing system being simulated is improved the Benchmark technology, does not recycle a thread or the request of process simulation unique user, but a plurality of users' requests are aggregated in a thread or process.By utilizing the method that the concurrent processing system is simulated described in various embodiments of the present invention, can effectively improve the resource utilization when the concurrent processing system is simulated.
Method in various embodiments of the present invention and device can be applied in the system that multiple needs carry out concurrent control.The analogue means of the concurrent processing system described in various embodiments of the present invention can be equipment independently, also can be the functional module in server.
The process flow diagram of the analogy method of Fig. 1 provides for the embodiment of the present invention concurrent processing system, as shown in Figure 1, the method comprises:
101, at least one of concurrent processing system carried out at least one user's request that entity receives, join in timer queue.Wherein, described concurrent processing system comprises a plurality of execution entities.
Concrete, carry out entity and can be process or the thread in this concurrent processing system.This is carried out entity or is thread, is perhaps process, cannot both represent to represent again process by thread in complete implementation method.That is to say, the method described in various embodiments of the present invention can realize in dimension corresponding to thread, also can realize in dimension corresponding to process.
In the concurrent processing system, can comprise one or more execution entities, each is carried out can the one or more users' requests of polymerization in entity.In order to simulate actual user's request, for each user asks to set corresponding time span, i.e. time-out time is with the keyboard input time of analog subscriber and user's think time.After the time-out time that the user asks need to wait for finishes, can carry out this user's request, with the interbehavior between analog subscriber and concurrent processing system.
The execution entity of concurrent processing system for the user asks to distribute corresponding time-out time, then will distribute user's request of time-out time to join in timer queue after receiving user's request.
102, with the user request of the stand-by period in described timer queue more than or equal to time-out time, join in ready queue.
Set in advance in the analogue means of concurrent processing system the user in the timer queue request overtime mechanism that judges whether.To ask to distribute the time point of time-out time as zero-time for the user, in the situation that the current time ask corresponding time-out time with the difference between this zero-time more than or equal to this user, the analogue means of concurrent processing system can with this user's request from timer queue, be transferred in ready queue.Ready queue is used for the identification information of the overtime user's request of temporary transient storage or these users request, so that the concurrent processing system can know which user's request is overtime.
103, at least one that call described concurrent processing system carried out entity and processed successively user's request in described ready queue, to simulate described concurrent processing system and user's interbehavior.
Concrete, to carry out entity corresponding respectively with each for each ready queue in the analogue means of concurrent processing system.That is to say, each carries out entity respectively corresponding ready queue, is used for user's request is kept in.
Temporary user's request in the ready queue of the analogue means of concurrent processing system, all need processed, therefore, the order the when analogue means of concurrent processing system can join this ready queue according to each user's request is processed each user's request successively.Thereby realize the simulation to concurrent processing system and user's interbehavior.
In the analogue means operational process of concurrent processing system, when certain customers' request is in not overtime loitering phase, the analogue means of concurrent processing system can be processed overtime user's request, therefore, the analogue means that has reduced the concurrent processing system in the process of waiting for user's request timed out, the waste that system resource is caused.
The analogy method of the embodiment of the present invention provides concurrent processing system, at least one of concurrent processing system carried out at least one user's request that entity receives, join in timer queue, with the user request of the stand-by period in timer queue more than or equal to time-out time, join in ready queue, at least one that call the concurrent processing system carried out entity and processed successively user's request in ready queue, to simulate described concurrent processing system and user's interbehavior; By at least one user's request of polymerization in the execution entity of concurrent processing system, wherein overtime user's request is added in ready queue, process successively again the user's request in ready queue, no longer only be used for the simulation unique user owing to carrying out entity, therefore can utilize the time of certain customers' request wait timeout, process overtime user request, effectively improved the resource utilization when the concurrent processing system is simulated.
The process flow diagram of the analogy method of Fig. 2 provides for the embodiment of the present invention another concurrent processing system, as shown in Figure 2, the method comprises:
201, in advance for described at least one user request that receives distributes respectively think time and keyboard input time, and with the time-out time of two time sums as described at least one user's request.Wherein, described think time and keyboard are respectively the user's who sends described at least one user's request simulation think time and the Simulation of keyboard input time input time.
Concrete, the analogue means of concurrent processing system can be that it distributes time-out time when initially receiving the user and ask, also can this user's request be performed complete after, again be its distribution time-out time.That is to say, when simulating, user request can circulate in the analogue means of this concurrent processing system and simulated, and the time-out time that at every turn is assigned with can be identical, also can be not identical.Can distribute according to certain strategy the size of duration, also can be divided at random the size of duration.
Owing to need to user's think time and keyboard be simulated input time, therefore will be for two time sums of the think time of analog subscriber and keyboard input time, as time-out time; For the user that receives asks the time-out time that distributes, be used for characterizing user's simulation think time and the Simulation of keyboard input time in other words.
202, at least one timer of described concurrent processing system is carried out at least one user's request that entity receives, join in described timer queue.
Concrete, can be referring to the implementation described in step 101.
Further, on the basis of the described embodiment of Fig. 1, the analogue means of concurrent processing system can utilize two classes to carry out entities and complete above-mentioned functions.Wherein a class execution entity is that timer is carried out entity, and another kind of execution entity is that affairs are carried out entity.Under these circumstances, timer is carried out all needs the one or more users' requests of polymerization in entity and affairs execution entity.
Timer is carried out entity after receiving user's request, and for after the user asks to have distributed time-out time, this user is asked to join in timer queue.
Can be thread or process owing to carrying out entity, timer is carried out entity correspondingly can be timer thread or timer process, and affairs are carried out entity correspondingly can be affairs thread or Transaction.Be in the implementation of thread carrying out entity, entity carried out by timer and affairs execution entity is respectively timer thread and affairs thread; Be in the implementation of process carrying out entity, entity carried out by timer and affairs execution entity is respectively timer process and Transaction.In complete implementation method, do not exist the timer thread mixedly with Transaction, perhaps the timer process is carried out mixed situation with the affairs thread.That is to say, the method described in various embodiments of the present invention can realize in dimension corresponding to thread, also can realize in dimension corresponding to process.
203, with the user request of the stand-by period in described timer queue more than or equal to time-out time, join in ready queue.
Concrete, can be referring to the implementation described in step 102.
Further, on the basis of step 202, the analogue means of concurrent processing system calls timer and carries out entity and judge on it, whether one or more users' requests of institute's polymerization are overtime, and wherein overtime user's request is joined in ready queue.
204, at least one affairs of calling described concurrent processing system are carried out entity, process successively the user's request in described ready queue.
Concrete, can be referring to the implementation described in step 103.
Further, the analogue means of concurrent processing system calls affairs and carries out entity, processes successively each user's request in ready queue.
Utilize timer execution entity and affairs to carry out entity and realize that respectively the benefit of above-mentioned steps is, it can be that a plurality of affairs are carried out entity services that a timer is carried out entity.The quantity that in the analogue means of concurrent processing system, timer is carried out entity can be lacked than the quantity that affairs are carried out entity.
205, in the difference of the throughput of described concurrent processing system and ideal value during more than or equal to threshold value, the execution entity number in described concurrent processing system is adjusted.
Execution in step 205 is in order to make each in the described concurrent processing system after carrying out the entity number and adjusting carry out entity, to receive user's request.
Concrete, the analogue means of concurrent processing system or obtains the throughput of this concurrent processing system in the process of carrying out user's request.Therefore set in advance ideal value and the threshold value of throughput in analogue means due to the concurrent processing system, will to the numerical values recited of the throughput that gets and the difference of this ideal value, compare with this threshold value.
If the analogue means of concurrent processing system is judged the difference of accessed throughput and this ideal value less than this threshold value, do not need the execution entity number in this concurrent processing system is adjusted;
If the analogue means of concurrent processing system is judged the difference of accessed throughput and this ideal value more than or equal to this threshold value, need the execution entity number in the concurrent processing system is adjusted.
The analogue means of concurrent processing system can be periodically, perhaps according to the trigger pip that receives, the process of carrying out above-mentioned judgement and adjustment.
Further, when the execution entity number in the concurrent processing system is adjusted, can adopt following implementation.
According to the historical data of execution entity number, user's number of request and the throughput of described concurrent processing system, obtain the system model of match;
According to the ideal value of throughput and the system model of described match, obtain the execution entity number that upgrades;
According to the execution entity number of described renewal, the execution entity number in described concurrent processing system is adjusted.
Concrete, the analogue means of concurrent processing system is with the quantity of the execution entity in operational process, quantity and the corresponding throughput that obtains of user's request, and the three is stored as historical data accordingly.Utilize these historical datas, simulate the model of this concurrent processing system, as the system model of match.
The system model of this match has reflected the throughput and the relation of carrying out entity number and user's number of request of concurrent processing system.After the system model that has obtained this match, the analogue means of concurrent processing system can be according to the ideal value of throughput and user's number of request of needs execution, calculate the quantity of the execution entity that needs employing, and will carry out the quantity of entity as the execution entity number of renewal.
If the numerical value of the execution entity number that should upgrade in the accessible scope of concurrent processing system, with the execution entity number of this concurrent processing system, is adjusted into the execution entity number of this renewal.
If the numerical value of the execution entity number that should upgrade is not in the accessible scope of concurrent processing system, in the scope of concurrent processing system accessible execution entity number, select the immediate execution entity of the execution entity number number with this renewal, this concurrent processing system is adjusted get final product.
For example, as throughput y and ideal value y *Between difference during more than or equal to threshold value, count N according to carrying out entity Thread, user's number of request w and throughput y historical data, model coefficient a, b and c in calculating, thus obtain system model after match System model, w and y according to this match *, calculate the execution entity number that needs employing.
Throughput according to user's number of request and new execution entity number obtain can continue and y again *Compare, in the situation that satisfy above-mentioned condition, adjust carrying out the entity number.
The analogy method of the embodiment of the present invention provides concurrent processing system, at least one timer of concurrent processing system is carried out at least one user's request that entity receives, join in timer queue, with the user request of the stand-by period in timer queue more than or equal to time-out time, join in ready queue, at least one affairs of calling the concurrent processing system are carried out entity and are processed successively user's request in ready queue, to simulate described concurrent processing system and user's interbehavior; By at least one user's request of polymerization in the execution entity of concurrent processing system, wherein overtime user's request is added in ready queue, process successively again the user's request in ready queue, no longer only be used for the simulation unique user owing to carrying out entity, therefore can utilize the time of certain customers' request wait timeout, process overtime user request, effectively improved the resource utilization when the concurrent processing system is simulated.
Below the situation take the execution entity as thread describes by way of example.
In each cycle of activity, the Benchmark Technology Need is simulated five sequentially-operatings for the user, namely thinks deeply behavior, keyboard input behavior, submits request to, waits for that return message and reception return results.The user behavior conversion that circulates in these five active states.Wherein, submit to request, wait return message and reception to return results the interbehavior that has consisted of user and system; Thinking behavior and keyboard input behavior can realize by the mode of random generation stand-by period.
When a plurality of users were aggregated on a thread, the behavior of the user of institute's polymerization on it need to be controlled and coordinate to this thread, and each user's behavior can be carried out according to default rule.
For the user to institute's polymerization on thread coordinates, utilize the time that each user's thinking behavior and keyboard input behavior are simulated, the interbehavior of other users on this thread is simulated.When user's thinking behavior and keyboard input behavior are simulated, can utilize system resource that other users' interbehavior is simulated, therefore can realize a plurality of users that are aggregated on same thread are carried out concurrent simulation.
When the thinking behavior of the user of institute's polymerization on thread and keyboard input behavior are simulated, can utilize timer mechanism.
In the analogy method of concurrent processing system, be virtual timer of each user assignment, and adopt a timer queue that these virtual timers are managed.Virtual timer does not have countdown function, but is used for recording time-out time corresponding to this user, i.e. time-out time, and the start time point that carries out the countdown state.
When certain user enters thinking cap and keyboard input state, for this user starts its virtual timer, and be this user assignment time-out time, this time-out time is represented this user's thinking behavior and the keyboard input shared time of behavior.And this user is joined in timer queue.
Before this user's time-out time finished, this thread can be simulated the interbehavior of other users on it.Utilize the user of a pending interbehavior of user's ready queue equity to manage
The time-out time corresponding when certain user's virtual timer finishes, namely overtime, the thinking behavior and the keyboard input behavior that represent this user finish, and this user is joined in user's ready queue, are scheduled and carry out follow-up interbehavior so that this user waits for.
Owing to only can having a system timer on each thread, therefore need to according to the excess time of each user in timer queue, each user in formation be carried out ascending order arrange, with wherein being positioned at the user's of head of the queue virtual timer, as system timer.
The analogy method of the concurrent processing system in various embodiments of the present invention can be utilized single-threaded realization, also can utilize the two-wire journey to realize.
Utilize the mode of single-threaded realization as follows.
Judge whether system timer is overtime.If system timer is not overtime, judge further whether user's ready queue is empty; If user's ready queue is empty, judge whether that circulation finishes, if end operation if not, returns and judges whether system timer is overtime; If user's ready queue is not empty, be the user's simulation system interbehavior in formation, and the user that will complete interbehavior joins in timer queue, and start virtual timer.If system timer is overtime, carry out timeout treatment.
Wherein, timeout treatment is specially, and the user that all are overtime takes out from timer queue, joins successively the tail of the queue of user's ready queue, and the virtual timer that will start the next user in timer queue is as new system timer.
The simulation system interbehavior is specially, and the user of head of the queue in user's ready queue is taken out, for this user simulates interbehavior.
The user is joined timer queue be specially, after user's interbehavior simulation is completed, for this user generates thinking behavior and keyboard input shared time of behavior at random, and with the time-out time of two time sums as this user's virtual timer.Excess time current according to this virtual timer when joining this user in timer queue, carry out ascending order and arrange in timer queue, adjust on corresponding ordinal position.
When producing new system timer in timer queue, upgraded the excess time of each virtual timer in timer queue.
The mode of utilizing the two-wire journey to realize is as follows.
The timer thread is simulated user's thinking behavior and keyboard input behavior based on timer queue, and realizes the scheduling to the user; The affairs thread is responsible for user's interbehavior is simulated.
By user's ready queue with complete formation, characterize the state of user between two class threads between timer thread and affairs thread.
The timer thread waits for that with the tail of the queue that overtime user joins ready queue the affairs thread is its simulation interbehavior, and the user who completes the interbehavior simulation is added into and completes in formation.The timer thread is that the user who completes formation generates thinking behavior and keyboard input shared time of behavior at random, and with the time-out time of sum of the two as this user's virtual timer, this user's the virtual timer mode by the time-out time ascending order is joined in timer queue.The affairs thread is dispatched the user in ready queue by the First Come First Served strategy, is its simulation interbehavior.After user's interbehavior was completed, the affairs thread joined this user the tail of the queue of completing formation, and the waiting timer thread is simulated thinking behavior and keyboard input behavior for this user.
The timer thread judges whether system timer is overtime.If system timer is not overtime, judge further whether user's ready queue is empty; If user's ready queue is empty, judge whether that circulation finishes, if end operation if not, returns and judges whether system timer is overtime; If user's ready queue is not empty, be the user's simulation system interbehavior in formation, and the user that will complete interbehavior joins in timer queue, and start virtual timer.If system timer is overtime, carry out timeout treatment.
Wherein, timeout treatment is specially, and the user that all are overtime takes out from timer queue, joins successively the tail of the queue of user's ready queue, and the virtual timer that will start the next user in timer queue is as new system timer.
The simulation system interbehavior is specially, and the user of head of the queue in user's ready queue is taken out, for this user simulates interbehavior.
The user is joined timer queue be specially, after simulation is completed to user's interbehavior, for this user generates think time and keyboard input time at random, and with the time-out time of two time sums as this user's virtual timer.Excess time current according to this virtual timer when joining this user in timer queue, carry out ascending order and arrange in timer queue, adjust on corresponding ordinal position.
When producing new system timer in timer queue, upgraded the excess time of each virtual timer in timer queue.
The affairs thread checks whether user's ready queue is empty, if user's ready queue be empty, judges whether that circulation finishes, if, end operation, if not, whether echo check user ready queue is sky.If user's ready queue is not empty, simulate interbehavior for head of the queue user in user's ready queue.After the user interactions behavior is completed, then this user is joined the tail of the queue that the user completes formation, the waiting timer thread is its analog subscriber thinking behavior and keyboard input behavior.
The structural representation of the analogue means of Fig. 3 provides for the embodiment of the present invention concurrent processing system, as shown in Figure 3, the analogue means of this concurrent processing system comprises: receiving element 11, processing unit 12 and call unit 13.
Receiving element 11, at least one that is used for the concurrent processing system carried out at least one user's request that entity receives, and joins in timer queue, and described concurrent processing system comprises a plurality of execution entities;
Processing unit 12 is used for the user's request more than or equal to time-out time of stand-by period of described timer queue is joined in ready queue;
Call unit 13, at least one that is used for calling described concurrent processing system carried out user's request that entity is processed described ready queue successively, to simulate described concurrent processing system and user's interbehavior.
Further, described execution entity comprises that timer is carried out entity and affairs are carried out entity;
Correspondingly, described receiving element 11 specifically is used for:
At least one timer of described concurrent processing system is carried out at least one user's request that entity receives, join in described timer queue;
Correspondingly, described call unit 13 also specifically in:
Call at least one affairs of described concurrent processing system and carry out entity, process successively the user's request in described ready queue.
The structural representation of the analogue means of Fig. 4 provides for the embodiment of the present invention another concurrent processing system, as shown in Figure 4, the analogue means of this concurrent processing system also comprises:
Allocation units 14 are used in advance for described at least one user's request that receives distributes respectively think time and keyboard input time, and with the time-out time of two time sums as described at least one user's request; Wherein, described think time and keyboard are respectively the user's who sends described at least one user's request simulation think time and the Simulation of keyboard input time input time.
Further, the analogue means of this concurrent processing system also comprises:
Adjustment unit 15, when being used for difference in the throughput of described concurrent processing system and ideal value more than or equal to threshold value, execution entity number in described concurrent processing system is adjusted, so that each in the described concurrent processing system after carrying out the entity number and adjusting carried out entity, receive user's request.
Further, described adjustment unit 15 specifically comprises:
Fitting module 151 is used for the historical data according to execution entity number, user's number of request and the throughput of described concurrent processing system, obtains the system model of match;
Update module 152 is used for the system model of the match that ideal value and described fitting module according to throughput obtain, and obtains the execution entity number that upgrades;
Adjusting module 153 is used for the execution entity number according to described renewal, and the execution entity number in described concurrent processing system is adjusted.
Further, the described execution entity of described concurrent processing system is thread;
Correspondingly, it is the timer thread that described timer is carried out entity, and it is the affairs thread that described affairs are carried out entity.
Further, the described execution entity of described concurrent processing system is process;
Correspondingly, it is the timer process that described timer is carried out entity, and it is Transaction that described affairs are carried out entity.
The analogue means of various embodiments of the present invention provide concurrent processing system carries out the method that the concurrent processing system is simulated, and can referring to the implementation described in the embodiment of the method for above-mentioned correspondence, repeat no more herein.
The analogue means of various embodiments of the present invention provide concurrent processing system, at least one of concurrent processing system carried out at least one user's request that entity receives, join in timer queue, with the user request of the stand-by period in timer queue more than or equal to time-out time, join in ready queue, at least one that call the concurrent processing system carried out entity and processed successively user's request in ready queue, to simulate described concurrent processing system and user's interbehavior; By at least one user's request of polymerization in the execution entity of concurrent processing system, wherein overtime user's request is added in ready queue, process successively again the user's request in ready queue, no longer only be used for the simulation unique user owing to carrying out entity, therefore can utilize the time of certain customers' request wait timeout, process overtime user request, effectively improved the resource utilization when the concurrent processing system is simulated.The structural representation of the analogue means of Fig. 5 provides for the embodiment of the present invention another concurrent processing system, as shown in Figure 5, the analogue means of this concurrent processing system comprises:
Processor 21, storer 22, bus 23 and communication interface 24.Connect by bus 23 between processor 21, storer 22 and communication interface 24 and complete mutual communication.
Processor 21 may be monokaryon or multinuclear CPU (central processing unit) (Central Processing Unit, CPU), be perhaps specific integrated circuit (Application Specific Integrated Circuit, ASIC), perhaps for being configured to implement one or more integrated circuit of the embodiment of the present invention.
Storer 22 can be the high-speed RAM storer, also can be nonvolatile memory (non-volatile memory), for example at least one magnetic disk memory.
Storer 22 is used for depositing program 221.Concrete, can comprise program code in program 221, described program code comprises computer-managed instruction.
Processor 21 working procedures 221, to carry out:
At least one of concurrent processing system carried out at least one user's request that entity receives, join in timer queue, described concurrent processing system comprises a plurality of execution entities;
With the user request of the stand-by period in described timer queue more than or equal to time-out time, join in ready queue;
At least one that call described concurrent processing system carried out entity and processed successively user's request in described ready queue, to simulate described concurrent processing system and user's interbehavior.
One of ordinary skill in the art will appreciate that: all or part of step that realizes above-mentioned each embodiment of the method can be completed by the hardware that programmed instruction is correlated with.Aforesaid program can be stored in a computer read/write memory medium.This program is carried out the step that comprises above-mentioned each embodiment of the method when carrying out; And aforesaid storage medium comprises: the various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above each embodiment is not intended to limit only in order to technical scheme of the present invention to be described; Although with reference to aforementioned each embodiment, the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme that aforementioned each embodiment puts down in writing, and perhaps some or all of technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the scope of various embodiments of the present invention technical scheme.

Claims (14)

1. the analogy method of a concurrent processing system, is characterized in that, comprising:
At least one of concurrent processing system carried out at least one user's request that entity receives, join in timer queue, described concurrent processing system comprises a plurality of execution entities;
With the user request of the stand-by period in described timer queue more than or equal to time-out time, join in ready queue;
At least one that call described concurrent processing system carried out entity and processed successively user's request in described ready queue, to simulate described concurrent processing system and user's interbehavior.
2. the analogy method of concurrent processing according to claim 1 system, is characterized in that, described execution entity comprises that timer is carried out entity and affairs are carried out entity;
Correspondingly, described at least one with the concurrent processing system carried out at least one user's request that entity receives, and joins timer queue and comprises:
At least one timer of described concurrent processing system is carried out at least one user's request that entity receives, join in described timer queue;
Correspondingly, described at least one that call described concurrent processing system carried out user's request that entity processes in described ready queue successively and comprised:
Call at least one affairs of described concurrent processing system and carry out entity, process successively the user's request in described ready queue.
3. the analogy method of concurrent processing according to claim 1 system, is characterized in that, described at least one with the concurrent processing system carried out at least one user's request that entity receives, and before joining in timer queue, described method also comprises:
In advance for described at least one user request that receives distributes respectively think time and keyboard input time, and with the time-out time of two time sums as described at least one user's request; Wherein, described think time and keyboard are respectively the user's who sends described at least one user's request simulation think time and the Simulation of keyboard input time input time.
4. the analogy method of concurrent processing according to claim 1 system, is characterized in that, described method also comprises:
In the difference of the throughput of described concurrent processing system and ideal value during more than or equal to threshold value, execution entity number in described concurrent processing system is adjusted, so that each in the described concurrent processing system after carrying out the entity number and adjusting carried out entity, receive user's request.
5. the analogy method of concurrent processing according to claim 4 system, is characterized in that, described execution entity number in described concurrent processing system is adjusted comprises:
According to the historical data of execution entity number, user's number of request and the throughput of described concurrent processing system, obtain the system model of match;
According to the ideal value of throughput and the system model of described match, obtain the execution entity number that upgrades;
According to the execution entity number of described renewal, the execution entity number in described concurrent processing system is adjusted.
6. the analogy method of arbitrary described concurrent processing system according to claim 2-5, is characterized in that, described execution entity is thread;
Correspondingly, it is the timer thread that described timer is carried out entity, and it is the affairs thread that described affairs are carried out entity.
7. the analogy method of arbitrary described concurrent processing system according to claim 2-5, is characterized in that, described execution entity is process;
Correspondingly, it is the timer process that described timer is carried out entity, and it is Transaction that described affairs are carried out entity.
8. the analogue means of a concurrent processing system, is characterized in that, comprising:
Receiving element, at least one that is used for the concurrent processing system carried out at least one user's request that entity receives, and joins in timer queue, and described concurrent processing system comprises a plurality of execution entities;
Processing unit is used for the user's request more than or equal to time-out time of stand-by period of described timer queue is joined in ready queue;
Call unit, at least one that is used for calling described concurrent processing system carried out user's request that entity is processed described ready queue successively, to simulate described concurrent processing system and user's interbehavior.
9. the analogue means of concurrent processing according to claim 8 system, is characterized in that, described execution entity comprises that timer is carried out entity and affairs are carried out entity;
Correspondingly, described receiving element specifically is used for:
At least one timer of described concurrent processing system is carried out at least one user's request that entity receives, join in described timer queue;
Correspondingly, described call unit also specifically in:
Call at least one affairs of described concurrent processing system and carry out entity, process successively the user's request in described ready queue.
10. the analogue means of concurrent processing according to claim 8 system, is characterized in that, the analogue means of described concurrent processing system also comprises:
Allocation units are used in advance for described at least one user's request that receives distributes respectively think time and keyboard input time, and with the time-out time of two time sums as described at least one user's request; Wherein, described think time and keyboard are respectively the user's who sends described at least one user's request simulation think time and the Simulation of keyboard input time input time.
11. the analogue means of concurrent processing according to claim 8 system is characterized in that, the analogue means of described concurrent processing system also comprises:
Adjustment unit, when being used for difference in the throughput of described concurrent processing system and ideal value more than or equal to threshold value, execution entity number in described concurrent processing system is adjusted, so that each in the described concurrent processing system after carrying out the entity number and adjusting carried out entity, receive user's request.
12. the analogue means of concurrent processing according to claim 11 system is characterized in that, described adjustment unit specifically comprises:
Fitting module is used for the historical data according to execution entity number, user's number of request and the throughput of described concurrent processing system, obtains the system model of match;
Update module is used for the system model of the match that ideal value and described fitting module according to throughput obtain, and obtains the execution entity number that upgrades;
Adjusting module is used for the execution entity number according to described renewal, and the execution entity number in described concurrent processing system is adjusted.
13. according to claim 8-12, the analogue means of arbitrary described concurrent processing system, is characterized in that, the described execution entity of described concurrent processing system is thread;
Correspondingly, it is the timer thread that described timer is carried out entity, and it is the affairs thread that described affairs are carried out entity.
14. according to claim 8-12, the analogue means of arbitrary described concurrent processing system, is characterized in that, the described execution entity of described concurrent processing system is process;
Correspondingly, it is the timer process that described timer is carried out entity, and it is Transaction that described affairs are carried out entity.
CN201310096319.4A 2013-03-25 2013-03-25 The analogy method of concurrent processing system and device Active CN103164338B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310096319.4A CN103164338B (en) 2013-03-25 2013-03-25 The analogy method of concurrent processing system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310096319.4A CN103164338B (en) 2013-03-25 2013-03-25 The analogy method of concurrent processing system and device

Publications (2)

Publication Number Publication Date
CN103164338A true CN103164338A (en) 2013-06-19
CN103164338B CN103164338B (en) 2016-03-30

Family

ID=48587443

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310096319.4A Active CN103164338B (en) 2013-03-25 2013-03-25 The analogy method of concurrent processing system and device

Country Status (1)

Country Link
CN (1) CN103164338B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104734915A (en) * 2015-03-05 2015-06-24 重庆邮电大学 Composite multiprocess and multithread multi-network concurrence dynamic simulation method
CN107872396A (en) * 2016-09-26 2018-04-03 华为技术有限公司 Communication means, processing equipment, terminal device and server with overtime control
CN108566346A (en) * 2018-03-14 2018-09-21 阿里巴巴集团控股有限公司 The processing method and processing device of network request
CN111625322A (en) * 2019-02-27 2020-09-04 阿里巴巴集团控股有限公司 Data processing method, system and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1873615A (en) * 2006-01-20 2006-12-06 华为技术有限公司 Method for servicing task of timer
CN101196827A (en) * 2007-12-28 2008-06-11 中国科学院计算技术研究所 Parallel simulator and method
CN102426539A (en) * 2011-11-01 2012-04-25 深圳市航天泰瑞捷电子有限公司 Timer task automatic processing method and system
CN102455932A (en) * 2010-10-22 2012-05-16 金蝶软件(中国)有限公司 Serial execution method, device and system for task instances
CN102880503A (en) * 2012-08-24 2013-01-16 新浪网技术(中国)有限公司 Data analysis system and data analysis method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1873615A (en) * 2006-01-20 2006-12-06 华为技术有限公司 Method for servicing task of timer
CN101196827A (en) * 2007-12-28 2008-06-11 中国科学院计算技术研究所 Parallel simulator and method
CN102455932A (en) * 2010-10-22 2012-05-16 金蝶软件(中国)有限公司 Serial execution method, device and system for task instances
CN102426539A (en) * 2011-11-01 2012-04-25 深圳市航天泰瑞捷电子有限公司 Timer task automatic processing method and system
CN102880503A (en) * 2012-08-24 2013-01-16 新浪网技术(中国)有限公司 Data analysis system and data analysis method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104734915A (en) * 2015-03-05 2015-06-24 重庆邮电大学 Composite multiprocess and multithread multi-network concurrence dynamic simulation method
CN104734915B (en) * 2015-03-05 2018-02-27 重庆邮电大学 A kind of concurrent dynamic emulation method of Multi net voting of compound multi-process multithreading
CN107872396A (en) * 2016-09-26 2018-04-03 华为技术有限公司 Communication means, processing equipment, terminal device and server with overtime control
CN108566346A (en) * 2018-03-14 2018-09-21 阿里巴巴集团控股有限公司 The processing method and processing device of network request
CN111625322A (en) * 2019-02-27 2020-09-04 阿里巴巴集团控股有限公司 Data processing method, system and equipment
CN111625322B (en) * 2019-02-27 2024-03-29 阿里巴巴集团控股有限公司 Data processing method, system and equipment

Also Published As

Publication number Publication date
CN103164338B (en) 2016-03-30

Similar Documents

Publication Publication Date Title
CN112346859B (en) Resource scheduling method and device, electronic equipment and storage medium
CN108090731B (en) Information processing method and device
CN110389816B (en) Method, apparatus and computer readable medium for resource scheduling
CN111381950A (en) Task scheduling method and system based on multiple copies for edge computing environment
CN105378668B (en) The interruption of operating system management in multicomputer system guides
CN103793272A (en) Periodical task scheduling method and periodical task scheduling system
Delamare et al. SpeQuloS: a QoS service for BoT applications using best effort distributed computing infrastructures
CN111861412B (en) Completion time optimization-oriented scientific workflow scheduling method and system
CN106557369A (en) A kind of management method and system of multithreading
CN103164338B (en) The analogy method of concurrent processing system and device
CN112416585A (en) GPU resource management and intelligent scheduling method for deep learning
CN113946431B (en) Resource scheduling method, system, medium and computing device
CN112463375A (en) Data processing method and device
CN116541134B (en) Method and device for deploying containers in multi-architecture cluster
CN104599085A (en) User motivating method under crowdsourcing mode and crowdsourcing system
CN103544102A (en) Method and device for test and simulation of software performance
CN115543615A (en) Resource allocation method and device, electronic equipment and storage medium
CN113434284A (en) Privacy computation server side equipment, system and task scheduling method
CN112363913B (en) Parallel test task scheduling optimizing method, device and computing equipment
CN115586961A (en) AI platform computing resource task scheduling method, device and medium
CN111352735A (en) Data acceleration method, device, storage medium and equipment
CN114721818A (en) Kubernetes cluster-based GPU time-sharing method and system
CN112181661B (en) Task scheduling method
Happe Predicting software performance in symmetric multi-core and multiprocessor environments
CN105511959A (en) Method and device for distributing virtual resource

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211223

Address after: 450046 Floor 9, building 1, Zhengshang Boya Plaza, Longzihu wisdom Island, Zhengdong New Area, Zhengzhou City, Henan Province

Patentee after: Super fusion Digital Technology Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.