Home » U++ Library support » U++ MT-multithreading and servers » what about WorkQueue : public CoWork
2 basic problems [message #25034 is a reply to message #24910] |
Mon, 08 February 2010 22:29   |
 |
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
hi mirek,
i am still thinking about the WorkQueue.. there is 1 basic problem to face:
* how to ensure that the common thread pool does not execute more than X jobs from a specific CoWork instace in parallel. since the pool does not care about sequencing relative to a CoWork instance. (restrict the global pool itself is no option, this would affect other CoWorks with proper different constraints)
the threads serve themselves from a global job queue. if we i.e say, only X=1 task from all the tasks commited to a certain CoWork may execute at once, other threads would still dequeue and execute jobs, since they dont care.
any idea? to make a per CoWork queue, which then really submits to the global queue?
i mean the following:
task A1 is executing in a thread from pool. task A2 (related to A1, may not intersect it) is also posted there, but may not execute, before A1 is done, meanwhile any other thread from pool finishes, dequeues A2 task, checks and realizes that A1 is still running, and it may not execute it. what to do with the job? the thread may not wait, it would block work of other CoWorks, post the job back to queue is not reliable, other related tasks might have been posted meanwhile. results in desorder.
seems as here we come close to a scheduler 
[Updated on: Mon, 08 February 2010 22:47] Report message to a moderator
|
|
|
 |
|
what about WorkQueue : public CoWork
By: kohait00 on Wed, 03 February 2010 07:26
|
 |
|
Re: what about WorkQueue : public CoWork
By: koldo on Wed, 03 February 2010 08:22
|
 |
|
Re: what about WorkQueue : public CoWork
By: kohait00 on Wed, 03 February 2010 08:58
|
 |
|
first, CoWork.h and CoWork.cpp cleanups
By: kohait00 on Wed, 03 February 2010 12:07
|
 |
|
WorkQueue
By: kohait00 on Wed, 03 February 2010 12:14
|
 |
|
Re: what about WorkQueue : public CoWork
By: mirek on Wed, 03 February 2010 12:36
|
 |
|
Re: what about WorkQueue : public CoWork
By: kohait00 on Wed, 03 February 2010 13:31
|
 |
|
changed CoWork and derived WorkQueue
By: kohait00 on Wed, 03 February 2010 15:03
|
 |
|
Re: changed CoWork and derived WorkQueue
By: mirek on Wed, 03 February 2010 15:08
|
 |
|
Re: changed CoWork and derived WorkQueue
By: kohait00 on Wed, 03 February 2010 15:14
|
 |
|
Re: changed CoWork and derived WorkQueue
By: mirek on Wed, 03 February 2010 20:45
|
 |
|
Re: changed CoWork and derived WorkQueue
By: kohait00 on Wed, 03 February 2010 21:58
|
 |
|
2 basic problems
By: kohait00 on Mon, 08 February 2010 22:29
|
 |
|
Re: changed CoWork and derived WorkQueue
By: mirek on Tue, 09 February 2010 10:56
|
 |
|
Re: changed CoWork and derived WorkQueue
By: kohait00 on Tue, 09 February 2010 15:14
|
 |
|
Re: changed CoWork and derived WorkQueue
By: mirek on Mon, 15 February 2010 12:49
|
 |
|
Re: changed CoWork and derived WorkQueue
By: kohait00 on Tue, 16 February 2010 14:44
|
 |
|
BUGFIX to WorkQueue
By: kohait00 on Thu, 18 February 2010 16:02
|
 |
|
Re: BUGFIX to WorkQueue
By: kohait00 on Fri, 19 February 2010 08:47
|
Goto Forum:
Current Time: Thu Aug 28 16:09:46 CEST 2025
Total time taken to generate the page: 0.06631 seconds
|