CN104156260A - Concurrent queue access control method and system based on task eavesdropping - Google Patents
Concurrent queue access control method and system based on task eavesdropping Download PDFInfo
- Publication number
- CN104156260A CN104156260A CN201410386814.3A CN201410386814A CN104156260A CN 104156260 A CN104156260 A CN 104156260A CN 201410386814 A CN201410386814 A CN 201410386814A CN 104156260 A CN104156260 A CN 104156260A
- Authority
- CN
- China
- Prior art keywords
- deque
- thread
- access
- task
- undetermined
- 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
Links
Abstract
The invention discloses a concurrent queue access control method and system based on task eavesdropping. The concurrent queue access control system based on task eavesdropping comprises a safe access module (1), a concurrent access degree monitoring module (2), a task scheduling module (3) and a prediction module (4). By means of the method, operations of double-end queues are separated from access control, a queue concurrent access degree monitoring mechanism is built, in the task eavesdropping process, the queues are dynamically selected in a self-adaptation mode for operation according to the queue concurrent access degree, accordingly concurrent access of the double-end queues is evenly distributed to the double-end queues, and thread safety of execution operations of the double-end queues is guaranteed in a blocking mode in terms of access of each double-end queue. The method supports different task eavesdropping strategies, and as for applications using task eavesdropping and operating on a concurrent random access machine, a higher throughput rate and the acceleration effect are achieved.
Description
Technical field
The present invention relates to a kind of operation method of the task dispatcher in multinuclear and many-core processor, more particularly, refer to a kind of access control method of the concurrent queue based on task stealing, described access control runs in task dispatcher.
Background technology
Task dispatcher normally carrys out the best mode of improving performance by thread.Task dispatcher is applicable to the high-performance algorithm being made up of multiple unblock tasks.If task is just blocked once in a while, so still can normally work.But, if need to block continually in thread, use so task dispatcher will bring the loss in performance, because processor can not do any work in the situation that task gets clogged.
Under existing polycaryon processor, task stealing (work stealing) has been proved to be a kind of efficient scheduling concurrent program mode, a kind of conventional technology that realizes load balancing (load balancing), while being used in existing many parallel runnings in system.The mode of task stealing allows each worker thread safeguard a deque, be called Deque, first worker thread checks local queue, if local queue non-NULL, take out the task in local deque, and carry out this task, if local queue is empty, worker thread adopts the mode of stealing at random to steal task from the deque of other worker thread.In theory, task stealing mode can make to apply quite widely and obtain more dominance energy, but because using lock mechanism, need ensure the correctness of deque Concurrency Access, when processor check figure is more, while causing worker thread to carry out task stealing, easily produce mutual contention and cause task dispatcher hydraulic performance decline, therefore, obtaining the key of actual efficiency is deque (deque) data structure of a high efficient and flexible of design, prevents the contention between worker thread during concurrent operations and the hydraulic performance decline that causes.
In the process that research shows to steal in the time of task Parallel Scheduling, provide to support flexibly it is very important to the selection of task, for example, some irregular figure is calculated, when stealing task at every turn, steal multiple tasks and compare and steal a task and more have superiority; Stealing half (steal-half), to compare the strategy of (steal-one) task steathily more effective.
The popular of shared drive processor is due to its simple and general programming model, and it makes to support that the parallel software development of sharing code and data becomes simple.Another name of shared drive processor is parallel random access machine (PRAM).In the time that parallel random access machine is in the application of weak internal memory (weak memory), because the use expense to internal memory fence (memory-fences) is large with respect to the expense of X86, need to avoid using internal memory fence in common tasks parallel dispatch system as far as possible, but the realization of the concurrent queue of existing unblock all needs to ensure with internal memory fence the correctness of algorithm, this will obviously reduce the performance of common tasks parallel dispatch system.The half that can take scheduling time as the task stealing strategy of common tasks parallel dispatch system is carried out internal memory fence.
Summary of the invention
Excessive in order to solve the expense of parallel random access protocol in the time dispatching deque, the problem that the performance causing reduces, the present invention proposes a kind of concurrent queue accesses control method based on task stealing.Access control of the present invention is operation and the access control of deque (deque) are separated, utilize efficient extendible concurrent queue accesses control strategy PDACS, the deque of design need not be concerned about the problem of Concurrency Access between multithreading, makes deque design more flexible.
Access control method of the present invention is by obtaining the Concurrency Access degree of each deque, set up the monitoring mechanism of the Concurrency Access degree to each deque, adopt prediction work thread success efficiently to obtain task, realize the feedback regulation to deque Concurrency Access degree, and then the expense that makes the Concurrency Access of deque is shared in each deque uniformly, thereby make to obtain good extendability in the more situation of deque, make system performance along with concurrent thread becomes many and increases, finally by ensure the thread-safe of deque executable operations in the mode of blocking.
The present invention is a kind of concurrent queue accesses control system based on task stealing, in PRAM system, as multiple thread thread, to be blocked in same deque deque upper, can cause deque deque to occur that access is intensive, increased thread and steal the expense of task; The relative thread thread of deque deque, has ACC=0 or ACC=1 two states; Excessive in order to solve the expense of parallel random access protocol in the time dispatching deque deque, the problem that the performance causing reduces, in PRAM system, the concurrent queue accesses control system of operation based on task stealing, is characterized in that: the described concurrent queue accesses control system based on task stealing is made up of secure access module (1), Concurrency Access degree monitoring module (2), task scheduling modules (3) and prediction module (4);
Task scheduling modules (3) first obtains all deque DEQUE={deque from PRAM system
1, deque
2..., deque
i..., deque
n, all Concurrency Access degree S={s
1, s
2..., s
i..., s
nand all thread THREAD={thread
1, thread
2..., thread
i..., thread
n; Then:
(A) by task scheduling modules (3) from DEQUE={deque
1, deque
2..., deque
i..., deque
nin choose except deque
ifirst undetermined-deque deque in addition
1, and record this deque
1concurrency Access degree s
1; Then, Concurrency Access degree monitoring module (2) is from deque
1extract deque
1corresponding s
1, by queue prediction module (4) according to Concurrency Access degree s
1predict first undetermined-deque deque
1whether existence access is intensive, access dense prediction relation
if
first undetermined-deque deque
1be selected, become first selected-deque deque
1, carry out secure access module (1); If
abandon first undetermined-deque deque
1, carry out (B);
(B) by task scheduling modules (3) from DEQUE={deque
1, deque
2..., deque
i..., deque
nin choose except deque
isecond undetermined-deque deque in addition
2, and record this deque
2concurrency Access degree s
2; Then, Concurrency Access degree monitoring module (2) is from deque
2extract deque
2corresponding s
2, by queue prediction module (4) according to Concurrency Access degree s
2predict second undetermined-deque deque
2whether existence access is intensive, access dense prediction relation
if
second undetermined-deque deque
2be selected, become second selected-deque deque
2, carry out secure access module (1); If
abandon second undetermined-deque deque
2, carry out (C);
(C) by task scheduling modules (3) from DEQUE={deque
1, deque
2..., deque
i..., deque
nin choose except deque
ilast undetermined-deque deque in addition
n, and record this deque
nconcurrency Access degree s
n; Then, Concurrency Access degree monitoring module (2) is from deque
nextract deque
ncorresponding s
n, by queue prediction module (4) according to Concurrency Access degree s
npredict last undetermined-deque deque
nwhether existence access is intensive, access dense prediction relation
if
last undetermined-deque deque
nbe selected, become last selected-deque deque
n, carry out secure access module (1); If
abandon last undetermined-deque deque
n;
Secure access module (1) judges first selected-deque deque
1whether taken by thread, if
deque is described
1taken by thread, can wait for, until
be changed to
in time, stops; If
deque is described
1do not taken by thread, thread thread
iobtain access right, to deque
1task operating is obtained in execution;
Secure access module (1) judges second selected-deque deque
2whether taken by thread, if
deque is described
2taken by thread, can wait for, until
be changed to
in time, stops; If
deque is described
2do not taken by thread, thread thread
iobtain access right, to deque
2task operating is obtained in execution;
Secure access module (1) judges last selected-deque deque
nwhether taken by thread, if
deque is described
ntaken by thread, can wait for, until
be changed to
in time, stops, thread thread
iobtain access right; If
deque is described
ndo not taken by thread, thread thread
iobtain access right, to deque
ntask operating is obtained in execution.
The advantage that the present invention is based on the concurrent queue accesses control system of task stealing is:
1. the present invention is by isolated with Parallel access control deque (deque) operation, can operate neatly the deque of any type (deque), make application be easy to realize the task scheduling strategy adapting with it, can obtain better performance.
2. in the present invention because the access of deque (deque) is had and only has a thread at every turn, in weak memory system, do not need the internal memory fence that uses expense large, make the extendability that also can obtain in weak memory system.
3. concurrent queue accesses control method of the present invention, with respect to the concurrent deque method for designing of traditional unblock, is not only subject to the restriction of queue size, does not need complicated Memory recycle mechanism yet, can not cause RAM leakage.
Brief description of the drawings
Fig. 1 is the structured flowchart that the present invention is based on the concurrent queue accesses control system of task stealing.
Fig. 2 is the process flow diagram that adopts the concurrent queue accesses control system that the present invention is based on task stealing to operate local deque.
Fig. 3 is the process flow diagram that adopts the concurrent queue accesses control system that the present invention is based on task stealing to operate outside deque.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.
In the present invention, all deque deque of the upper operation of parallel random access machine (PRAM) are designated as DEQUE, the corresponding Concurrency Access degree of each deque deque, a thread thread, the Concurrency Access degree that described DEQUE is corresponding is designated as S, and the thread that described DEQUE is corresponding is designated as THREAD.
All deques adopt set form to be expressed as DEQUE={deque
1, deque
2..., deque
i..., deque
n, wherein, deque
1represent first deque, deque
2represent second deque, deque
irepresent i deque, deque
nrepresent last deque, for convenience of description, deque
nalso referred to as any one deque, n represents the identification number of deque.
All Concurrency Access degree adopt set form to be expressed as S={s
1, s
2..., s
i..., s
n, wherein, s
1represent first deque deque
1concurrency Access degree, s
2represent second deque deque
2concurrency Access degree, s
irepresent i deque deque
iconcurrency Access degree, s
nrepresent last deque deque
nconcurrency Access degree, for convenience of description, s
nalso referred to as any Concurrency Access degree.In the present invention, any Concurrency Access degree s
nin include the current number of threads a getting clogged and deque deque
nin task number b, s
n=(a, b).
All threads adopt set form to be expressed as THREAD={thread
1, thread
2..., thread
i..., thread
n, wherein, thread
1represent first deque deque
1thread, thread
2represent second deque deque
2thread, thread
irepresent i deque deque
ithread, thread
nrepresent last deque deque
nthread, for convenience of description, thread
nalso referred to as any thread.
In the present invention, local deque refers to thread thread
ithe deque deque that (also referred to as local thread) has
i.Outside deque refers to except deque deque
iother deques in addition, as deque
1, deque
2, deque
n.Task scheduling modules 3 is at every turn from DEQUE={deque
1, deque
2..., deque
i..., deque
nin only steal one except deque
ideque as undetermined-deque.
In PRAM system, as multiple thread thread, to be blocked in same deque deque upper, can cause described deque deque to occur that access is intensive, increased thread and steal the expense of task.The relative thread thread of deque deque, has two states, and state one is accessed by thread by deque deque, referred to as ACC=0; State two does not have thread accesses for deque deque, referred to as ACC=1.In PRAM system, all deques are designated as DEQUE={deque
1, deque
2..., deque
i..., deque
n, all Concurrency Access degree are designated as S={s
1, s
2..., s
i..., s
nand all threads be designated as THREAD={thread
1, thread
2..., thread
i..., thread
n.
Shown in Figure 1, it is upper that a kind of concurrent queue accesses control system based on task stealing of the present invention's design operates in parallel random access machine (PRAM), and this system is made up of secure access module 1, Concurrency Access degree monitoring module 2, task scheduling modules 3 and prediction module 4.Adopting after concurrent queue accesses control strategy PDACS of the present invention, first task scheduling modules 3 obtains DEQUE={deque from PRAM system
1, deque
2..., deque
i..., deque
n, S={s
1, s
2..., s
i..., s
nand THREAD={thread
1, thread
2..., thread
i..., thread
n; Then:
(A) by task scheduling modules 3 from DEQUE={deque
1, deque
2..., deque
i..., deque
nin choose except deque
ifirst undetermined-deque deque in addition
1, and record this deque
1concurrency Access degree s
1; Then, Concurrency Access degree monitoring module 2 is from deque
1extract deque
1corresponding s
1, by queue prediction module 4 according to Concurrency Access degree s
1predict first undetermined-deque deque
1whether existence access is intensive, access dense prediction relation
if
first undetermined-deque deque
1be selected, become first selected-deque deque
1, carry out secure access module 1; If
abandon first undetermined-deque deque
1, carry out (B);
(B) by task scheduling modules 3 from DEQUE={deque
1, deque
2..., deque
i..., deque
nin choose except deque
isecond undetermined-deque deque in addition
2, and record this deque
2concurrency Access degree s
2; Then, Concurrency Access degree monitoring module 2 is from deque
2extract deque
2corresponding s
2, by queue prediction module 4 according to Concurrency Access degree s
2predict second undetermined-deque deque
2whether existence access is intensive, access dense prediction relation
if
second undetermined-deque deque
2be selected, become second selected-deque deque
2, carry out secure access module 1; If
abandon second undetermined-deque deque
2, carry out (C);
(C) by task scheduling modules 3 from DEQUE={deque
1, deque
2..., deque
i..., deque
nin choose except deque
ilast undetermined-deque deque in addition
n, and record this deque
nconcurrency Access degree s
n; Then, Concurrency Access degree monitoring module 2 is from deque
nextract deque
ncorresponding s
n, by queue prediction module 4 according to Concurrency Access degree s
npredict last undetermined-deque deque
nwhether existence access is intensive, access dense prediction relation
if
last undetermined-deque deque
nbe selected, become last selected-deque deque
n, carry out secure access module 1; If
abandon last undetermined-deque deque
n;
(D) if task scheduling modules 3 can not be from DEQUE={deque
1, deque
2..., deque
i..., deque
nin choose except deque
iselect-deque in addition, waits for after an average task execution time (described average task execution time is the design load in PRAM system), restarts task scheduling modules 3.
Secure access module 1 judges first selected-deque deque
1whether taken by thread, if
deque is described
1taken by thread, can wait for, until
be changed to
in time, stops; If
deque is described
1do not taken by thread, thread thread
iobtain access right, to deque
1task operating is obtained in execution; After complete task operating, send and remove deque to PRAM system
1occupied mark;
Secure access module 1 judges second selected-deque deque
2whether taken by thread, if
deque is described
2taken by thread, can wait for, until
be changed to
in time, stops; If
deque is described
2do not taken by thread, thread thread
iobtain access right, to deque
2task operating is obtained in execution; After complete task operating, send and remove deque to PRAM system
2occupied mark;
Secure access module 1 judges last selected-deque deque
nwhether taken by thread, if
deque is described
ntaken by thread, can wait for, until
be changed to
in time, stops, thread thread
iobtain access right; If
deque is described
ndo not taken by thread, thread thread
iobtain access right, to deque
ntask operating is obtained in execution; After complete task operating, send and remove deque to PRAM system
noccupied mark.
The present invention proposes a kind of concurrent queue accesses control method based on task stealing, the method operates in parallel random access machine (PRAM), and to deque (deque), operation is divided into local deque and two aspects of outside deque to described PRAM; The concrete steps of concurrent queue accesses control strategy PDACS are:
Shown in Figure 3, adopt concurrent queue accesses control strategy PDACS to the task stealing treatment step of outside deque to be:
Step 101: the monitoring of deque concurrency
As local thread thread
ideque deque
iin, during without any task, select any one undetermined-deque deque by task scheduling modules 3
n;
Then by Concurrency Access degree monitoring module 2 from described undetermined-deque deque
nin extract Concurrency Access degree s
n=(a, b); Perform step subsequently 102;
In the present invention, Concurrency Access degree s
n=(a, b) is that the access situation of following in real time deque is upgraded, and each deque has with it corresponding Concurrency Access degree, and from Concurrency Access degree, can obtain record etc. the number of threads of deque to be visited.
Step 102: can prediction the access of effective acquisition to deque
Prediction module 4 is according to Concurrency Access degree s
npredict described undetermined-deque deque
nwhether existence access is intensive, access dense prediction relation
if
described undetermined-deque deque
nbe selected, become selected-deque deque
n, carry out secure access module 1; If
abandon described undetermined-deque deque
n.
In the present invention,
while showing that thread conducts interviews to undetermined-deque, synchronization overhead is little;
show that thread now conducts interviews to undetermined-deque, synchronization overhead is large, need to wait for the long period.
In the present invention, steal information of forecasting
when just deque being stolen, calculate, deque is not conducted interviews at ordinary times, do not need in real time to this
value is calculated renewal, and each queue has the steal information of forecasting corresponding with it.
Step 103: the access right that obtains queue
As local thread thread
ineed to be to selected-deque deque
nwhile obtaining task operating, need to obtain deque
naccess right
If
deque is described
ndo not taken by thread, thread thread
iobtain access right, execution step 104;
If
deque is described
ntaken by thread, can wait for, until
be changed to
in time, stops, thread thread
iobtain access right, perform step subsequently 104.
Step 104: the access queue of obstruction
At local thread thread
iobtain after access right, can select-deque deque of mark
1, deque
2or deque
nby thread thread
itake; Until thread
icomplete and obtain after task operating, just can discharge selected-deque deque
1, deque
2or deque
ntake mark.
Finally, secure access module 1 is sent selected-deque deque to PRAM system
1, deque
2or deque
nthe information not taken by thread.In the present invention, after taking mark and being disengaged, selected-deque deque
1, deque
2or deque
nidentity revert to the deque deque operating on parallel random access machine (PRAM).
Shown in Figure 2, adopt concurrent queue accesses control strategy PDACS to the task stealing treatment step of local deque to be:
Step 201: the access right that obtains queue
As local thread thread
ideque deque
iin while there is task, judge deque
iaccess right
If
deque is described
ido not taken by thread, thread thread
iobtain access right, execution step 202;
If
deque is described
itaken by thread, can wait for, until
be changed to
in time, stops, thread thread
iobtain access right, perform step subsequently 202.
Step 202: the access queue of obstruction
At local thread thread
iobtain after access right, can mark deque
ideque is by thread thread
itake; Until thread
icomplete and obtain after task operating, just can discharge deque
itake mark; Finally, secure access module 1 is sent deque to PRAM system
ithe information not taken by thread.
embodiment 1
By apply the access control method of concurrent queue accesses control strategy PDACS in the parallel tables Cilk of shared memory multiprocessor, and compare experiment with original Cilk parallel tables, the standard testing set of MITCilk for experiment test centralized procurement, experimental situation platform is the tide server with an intel xeon phi 7110P series processors, this processor one has 61 processor cores, after opening CPU hyperthread, have altogether 244 logic processor cores, can support 244 concurrent execution of physical thread simultaneously, server OS is RedHat Linux 6.3.
Use MIT Cilk test procedure, test respectively the time of the execution test procedure of Cilk parallel tables under 244 threads and PDACS parallel tables, the compiler using when test procedure compiling is
c++Composer XE 2013 SP1, optimization rank option when compiling is-O2, test result shows that PDACS parallel tables performance compares Cilk parallel tables and promote 10% left and right.
Claims (5)
1. the concurrent queue accesses control system based on task stealing, in PRAM system, as multiple thread thread, to be blocked in same deque deque upper, can cause deque deque to occur that access is intensive, increased thread and steal the expense of task; The relative thread thread of deque deque, has ACC=0 or ACC=1 two states; Excessive in order to solve the expense of parallel random access protocol in the time dispatching deque deque, the problem that the performance causing reduces, in PRAM system, the concurrent queue accesses control system of operation based on task stealing, is characterized in that: the described concurrent queue accesses control system based on task stealing is made up of secure access module (1), Concurrency Access degree monitoring module (2), task scheduling modules (3) and prediction module (4);
Task scheduling modules (3) first obtains all deque DEQUE={deque from PRAM system
1, deque
2..., deque
i..., deque
n, all Concurrency Access degree S={s
1, s
2..., s
i..., s
nand all thread THREAD={thread
1, thread
2..., thread
i..., thread
n; Then:
(A) by task scheduling modules (3) from DEQUE={deque
1, deque
2..., deque
i..., deque
nin choose except deque
ifirst undetermined-deque deque in addition
1, and record this deque
1concurrency Access degree s
1; Then, Concurrency Access degree monitoring module (2) is from deque
1extract deque
1corresponding s
1, by queue prediction module (4) according to Concurrency Access degree s
1predict first undetermined-deque deque
1whether existence access is intensive, access dense prediction relation
if
first undetermined-deque deque
1be selected, become first selected-deque deque
1, carry out secure access module (1); If
abandon first undetermined-deque deque
1, carry out (B);
(B) by task scheduling modules (3) from DEQUE={deque
1, deque
2..., deque
i..., deque
nin choose except deque
isecond undetermined-deque deque in addition
2, and record this deque
2concurrency Access degree s
2; Then, Concurrency Access degree monitoring module (2) is from deque
2extract deque
2corresponding s
2, by queue prediction module (4) according to Concurrency Access degree s
2predict second undetermined-deque deque
2whether existence access is intensive, access dense prediction relation
if
second undetermined-deque deque
2be selected, become second selected-deque deque
2, carry out secure access module (1); If
abandon second undetermined-deque deque
2, carry out (C);
(C) by task scheduling modules (3) from DEQUE={deque
1, deque
2..., deque
i..., deque
nin choose except deque
ilast undetermined-deque deque in addition
n, and record this deque
nconcurrency Access degree s
n; Then, Concurrency Access degree monitoring module (2) is from deque
nextract deque
ncorresponding s
n, by queue prediction module (4) according to Concurrency Access degree s
npredict last undetermined-deque deque
nwhether existence access is intensive, access dense prediction relation
if
last undetermined-deque deque
nbe selected, become last selected-deque deque
n, carry out secure access module (1); If
abandon last undetermined-deque deque
n;
Secure access module (1) judges first selected-deque deque
1whether taken by thread, if
deque is described
1taken by thread, can wait for, until
be changed to
in time, stops; If
deque is described
1do not taken by thread, thread thread
iobtain access right, to deque
1task operating is obtained in execution;
Secure access module (1) judges second selected-deque deque
2whether taken by thread, if
deque is described
2taken by thread, can wait for, until
be changed to
in time, stops; If
deque is described
2do not taken by thread, thread thread
iobtain access right, to deque
2task operating is obtained in execution;
Secure access module (1) judges last selected-deque deque
nwhether taken by thread, if
deque is described
ntaken by thread, can wait for, until
be changed to
in time, stops, thread thread
iobtain access right; If
deque is described
ndo not taken by thread, thread thread
iobtain access right, to deque
ntask operating is obtained in execution.
2. the concurrent queue accesses control system based on task stealing according to claim 1, is characterized in that: deque has local deque and outside deque.
3. the concurrent queue accesses control system based on task stealing according to claim 2, is characterized in that including the following step for the task stealing of outside deque:
Step 101: the monitoring of deque concurrency
As local thread thread
ideque deque
iin, during without any task, select any one undetermined-deque deque by task scheduling modules (3)
n;
Then by Concurrency Access degree monitoring module (2) from described undetermined-deque deque
nin extract Concurrency Access degree s
n=(a, b); Perform step subsequently 102;
Step 102: can prediction the access of effective acquisition to deque
Prediction module (4) is according to Concurrency Access degree s
npredict described undetermined-deque deque
nwhether existence access is intensive, access dense prediction relation
if
described undetermined-deque deque
nbe selected, become selected-deque deque
n, carry out secure access module (1); If
abandon described undetermined-deque deque
n;
Step 103: the access right that obtains queue
As local thread thread
ineed to be to described select-deque deque
nwhile obtaining task operating, need to obtain deque
naccess right
If
deque is described
ndo not taken by thread, thread thread
iobtain access right, execution step 104;
If
deque is described
ntaken by thread, can wait for, until
be changed to
in time, stops, thread thread
iobtain access right, perform step subsequently 104;
Step 104: the access queue of obstruction
At local thread thread
iobtain after access right, can mark described in selected-deque deque
nby thread thread
itake; Until thread
icomplete and obtain after task operating, just can discharge selected-deque deque
ntake mark;
Finally, secure access module (1) is sent selected-deque deque to PRAM system
nthe information not taken by thread.
4. the concurrent queue accesses control system based on task stealing according to claim 2, is characterized in that including the following step for the task stealing of local deque:
Step 201: the access right that obtains queue
As local thread thread
ideque deque
iin while there is task, judge deque
iaccess right
If
deque is described
ido not taken by thread, thread thread
iobtain access right, execution step 202;
If
deque is described
itaken by thread, can wait for, until
be changed to
in time, stops, thread thread
iobtain access right, perform step subsequently 202;
Step 202: the access queue of obstruction
At local thread thread
iobtain after access right, can mark deque
ideque is by thread thread
itake; Until thread
icomplete and obtain after task operating, just can discharge deque
itake mark; Finally, secure access module (1) is sent deque to PRAM system
ithe information not taken by thread.
5. the concurrent queue accesses control system based on task stealing according to claim 1, is characterized in that: task scheduling modules (3) is at every turn from DEQUE={deque
1, deque
2..., deque
i..., deque
nin only steal one except deque
ideque as undetermined-deque.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410386814.3A CN104156260B (en) | 2014-08-07 | 2014-08-07 | The concurrent queue accesses control system that a kind of task based access control is stolen |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410386814.3A CN104156260B (en) | 2014-08-07 | 2014-08-07 | The concurrent queue accesses control system that a kind of task based access control is stolen |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104156260A true CN104156260A (en) | 2014-11-19 |
CN104156260B CN104156260B (en) | 2017-03-15 |
Family
ID=51881766
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410386814.3A Expired - Fee Related CN104156260B (en) | 2014-08-07 | 2014-08-07 | The concurrent queue accesses control system that a kind of task based access control is stolen |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104156260B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107220111A (en) * | 2017-04-28 | 2017-09-29 | 华中科技大学 | Method for scheduling task and system that a kind of task based access control is stolen |
CN109408490A (en) * | 2018-09-29 | 2019-03-01 | 武汉斗鱼网络科技有限公司 | A kind of regular method, apparatus of array, terminal and readable medium |
CN110083445A (en) * | 2019-04-21 | 2019-08-02 | 哈尔滨工业大学 | A kind of multithreading certainty execution method based on weak memory consistency |
CN110908794A (en) * | 2019-10-09 | 2020-03-24 | 上海交通大学 | Task stealing method and system based on task stealing algorithm |
CN115292025A (en) * | 2022-09-30 | 2022-11-04 | 神州数码融信云技术服务有限公司 | Task scheduling method and device, computer equipment and computer readable storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050132374A1 (en) * | 2000-05-15 | 2005-06-16 | Sun Microsystems, Inc. | Work stealing queues for parallel garbage collection |
CN103677760A (en) * | 2013-12-04 | 2014-03-26 | 北京航空航天大学 | Event parallel controller based on Openflow and event parallel processing method thereof |
-
2014
- 2014-08-07 CN CN201410386814.3A patent/CN104156260B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050132374A1 (en) * | 2000-05-15 | 2005-06-16 | Sun Microsystems, Inc. | Work stealing queues for parallel garbage collection |
CN103677760A (en) * | 2013-12-04 | 2014-03-26 | 北京航空航天大学 | Event parallel controller based on Openflow and event parallel processing method thereof |
Non-Patent Citations (2)
Title |
---|
ACAR U A ET AL: "Scheduling parallel programs by work stealing with private deques", 《THE 18TH ACM SIGPLAN SYMPOSIUM ON PRINCIPLES AND PRACTICE OF PARALLEL PROGRAMMING》 * |
LÊ N M ET AL: "Correct and efficient work-stealing for weak memory models", 《THE 18TH ACM SIGPLAN SYMPOSIUM ON PRINCIPLES AND PRACTICE OF PARALLEL PROGRAMMING》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107220111A (en) * | 2017-04-28 | 2017-09-29 | 华中科技大学 | Method for scheduling task and system that a kind of task based access control is stolen |
CN107220111B (en) * | 2017-04-28 | 2019-08-09 | 华中科技大学 | A kind of method for scheduling task that task based access control is stolen and system |
CN109408490A (en) * | 2018-09-29 | 2019-03-01 | 武汉斗鱼网络科技有限公司 | A kind of regular method, apparatus of array, terminal and readable medium |
CN110083445A (en) * | 2019-04-21 | 2019-08-02 | 哈尔滨工业大学 | A kind of multithreading certainty execution method based on weak memory consistency |
CN110083445B (en) * | 2019-04-21 | 2023-04-25 | 哈尔滨工业大学 | Multithreading deterministic execution method based on weak memory consistency |
CN110908794A (en) * | 2019-10-09 | 2020-03-24 | 上海交通大学 | Task stealing method and system based on task stealing algorithm |
CN110908794B (en) * | 2019-10-09 | 2023-04-28 | 上海交通大学 | Task stealing method and system based on task stealing algorithm |
CN115292025A (en) * | 2022-09-30 | 2022-11-04 | 神州数码融信云技术服务有限公司 | Task scheduling method and device, computer equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN104156260B (en) | 2017-03-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104156260A (en) | Concurrent queue access control method and system based on task eavesdropping | |
Evtushenko et al. | A framework for parallel large-scale global optimization | |
Buttari | Fine-grained multithreading for the multifrontal QR factorization of sparse matrices | |
Chakroun et al. | Combining multi-core and GPU computing for solving combinatorial optimization problems | |
CN106164881A (en) | Work in heterogeneous computing system is stolen | |
CN102053870A (en) | Systems and methods for affinity driven distributed scheduling of parallel computations | |
CN103279391A (en) | Load balancing optimization method based on CPU (central processing unit) and MIC (many integrated core) framework processor cooperative computing | |
DE102013214756A1 (en) | METHOD AND DEVICE FOR IMPROVING THE PROCESSING CAPACITY OF A MULTI-CORE PROCESSOR | |
CN101833438A (en) | General data processing method based on multiple parallel | |
CN101604263A (en) | A kind of method that realizes multi-duplicate running of core code segment of operation system | |
CN110032450B (en) | Large-scale deep learning method and system based on solid-state disk extended memory | |
CN105975349A (en) | Thread lock optimization method | |
Mezmaz et al. | A multi-core parallel branch-and-bound algorithm using factorial number system | |
Dechev et al. | Lc/dc: Lockless containers and data concurrency a novel nonblocking container library for multicore applications | |
CN104615445B (en) | A kind of equipment I O queuing methods based on atomic operation | |
CN106445666A (en) | Parallel optimization method of DOACROSS cycle | |
CN103810041A (en) | Parallel computing method capable of supporting dynamic compand | |
JP2014528609A5 (en) | ||
Agathos et al. | Design and implementation of openmp tasks in the ompi compiler | |
CN102023846B (en) | Shared front-end assembly line structure based on monolithic multiprocessor system | |
Bloom et al. | SatX10: A Scalable Plug&Play Parallel SAT Framework: (Tool Presentation) | |
CN103699363A (en) | Method for optimizing key critical zone under multi-core platform | |
Hugo et al. | A runtime approach to dynamic resource allocation for sparse direct solvers | |
Soroushnia et al. | Heterogeneous parallelization of Aho-Corasick algorithm | |
Melab et al. | Towards paradisEO-MO-GPU: a framework for GPU-based local search metaheuristics |
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: 20210419 Address after: 100160, No. 4, building 12, No. 128, South Fourth Ring Road, Fengtai District, Beijing, China (1515-1516) Patentee after: Kaixi (Beijing) Information Technology Co.,Ltd. Address before: 100191 Haidian District, Xueyuan Road, No. 37, Patentee before: BEIHANG University |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170315 Termination date: 20210807 |