Click here to Skip to main content
15,887,135 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Fast Image Processing - programming language to use Pin
CPallini24-Sep-09 21:57
mveCPallini24-Sep-09 21:57 
GeneralRe: Fast Image Processing - programming language to use Pin
Luc Pattyn25-Sep-09 2:59
sitebuilderLuc Pattyn25-Sep-09 2:59 
GeneralRe: Fast Image Processing - programming language to use [modified] Pin
CPallini25-Sep-09 9:28
mveCPallini25-Sep-09 9:28 
AnswerRe: Fast Image Processing - programming language to use Pin
Chris Losinger24-Oct-09 10:50
professionalChris Losinger24-Oct-09 10:50 
AnswerRe: Fast Image Processing - programming language to use Pin
novice__geek30-Oct-09 0:13
novice__geek30-Oct-09 0:13 
GeneralPagerank and its mathematics: Explanation needed Pin
kentipsy20-Sep-09 8:24
kentipsy20-Sep-09 8:24 
GeneralRe: Pagerank and its mathematics: Explanation needed Pin
Richard MacCutchan20-Sep-09 9:41
mveRichard MacCutchan20-Sep-09 9:41 
QuestionHow to manage a share buf array? Pin
donniehan18-Sep-09 0:04
donniehan18-Sep-09 0:04 
Hi i have a problem.

Thing like this:

This is multi-thread program, 1 master thread processing the msgs generated by child threads(typical consumer-producer model). I create a large share buf, all the children will put their msgs into this buf if they can get the buf lock. When a child put its msg into the buf completely, it will notify the master there is a msg waiting for process, so master aquire the buf lock and hold it and begin to deal with the msgs.

The problem is when there are a lot of child threads startup, there will be a lot of msgs waiting for process, then master thread will hold the the buf lock for a while which is not acceptable Frown | :( , as no child thread can put msg into it. This problem apparently causes poor performance of this program.

So what i try to do is to separete the large share buf to a array of small buf, and children can put their msgs into the available buf, and master can process msgs in each small share buf one by one.

But i don't know whether there is a good and mature algorithm or way to manage the share buf array.

Any good idea is welcome! Thanks.

BTW, i'm not sure whether i make the problem clear.(Because english is not my mother tongue, forgive me if it is not clear enough.) if you are interested in this problem, please feel free to contact me and ask me more details Smile | :) by email or
MSN: donniehan@live.cn

Thanks again!
AnswerRe: How to manage a share buf array? Pin
Luc Pattyn18-Sep-09 2:32
sitebuilderLuc Pattyn18-Sep-09 2:32 
GeneralRe: How to manage a share buf array? Pin
donniehan18-Sep-09 4:06
donniehan18-Sep-09 4:06 
GeneralRe: How to manage a share buf array? Pin
Luc Pattyn18-Sep-09 4:15
sitebuilderLuc Pattyn18-Sep-09 4:15 
GeneralRe: How to manage a share buf array? Pin
donniehan18-Sep-09 13:43
donniehan18-Sep-09 13:43 
GeneralRe: How to manage a share buf array? Pin
Luc Pattyn18-Sep-09 14:48
sitebuilderLuc Pattyn18-Sep-09 14:48 
GeneralRe: How to manage a share buf array? Pin
donniehan20-Sep-09 18:03
donniehan20-Sep-09 18:03 
GeneralRe: How to manage a share buf array? [modified] Pin
Luc Pattyn21-Sep-09 1:17
sitebuilderLuc Pattyn21-Sep-09 1:17 
GeneralRe: How to manage a share buf array? Pin
donniehan21-Sep-09 2:00
donniehan21-Sep-09 2:00 
GeneralRe: How to manage a share buf array? Pin
Luc Pattyn21-Sep-09 2:07
sitebuilderLuc Pattyn21-Sep-09 2:07 
QuestionHough Circular transform Pin
lcssiva16-Sep-09 1:38
lcssiva16-Sep-09 1:38 
AnswerRe: Hough Circular transform Pin
Alan Balkany16-Sep-09 3:27
Alan Balkany16-Sep-09 3:27 
GeneralRe: Hough Circular transform Pin
Luc Pattyn16-Sep-09 4:08
sitebuilderLuc Pattyn16-Sep-09 4:08 
GeneralRe: Hough Circular transform Pin
Alan Balkany16-Sep-09 4:24
Alan Balkany16-Sep-09 4:24 
GeneralRe: Hough Circular transform Pin
Luc Pattyn16-Sep-09 4:39
sitebuilderLuc Pattyn16-Sep-09 4:39 
GeneralRe: Hough Circular transform Pin
Fatbuddha 116-Sep-09 5:02
Fatbuddha 116-Sep-09 5:02 
GeneralRe: Hough Circular transform Pin
Alan Balkany16-Sep-09 5:17
Alan Balkany16-Sep-09 5:17 
GeneralRe: Hough Circular transform Pin
Luc Pattyn16-Sep-09 5:33
sitebuilderLuc Pattyn16-Sep-09 5:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.