Click here to Skip to main content
15,881,559 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Lock free algorithms Pin
Joe Woodbury31-Jul-14 19:21
professionalJoe Woodbury31-Jul-14 19:21 
GeneralRe: Lock free algorithms Pin
Michael Gazonda31-Jul-14 19:25
professionalMichael Gazonda31-Jul-14 19:25 
AnswerRe: Lock free algorithms Pin
SledgeHammer016-Sep-14 8:58
SledgeHammer016-Sep-14 8:58 
GeneralRe: Lock free algorithms Pin
Joe Woodbury6-Sep-14 9:50
professionalJoe Woodbury6-Sep-14 9:50 
GeneralRe: Lock free algorithms Pin
SledgeHammer016-Sep-14 11:35
SledgeHammer016-Sep-14 11:35 
GeneralRe: Lock free algorithms Pin
Joe Woodbury6-Sep-14 11:49
professionalJoe Woodbury6-Sep-14 11:49 
GeneralRe: Lock free algorithms Pin
SledgeHammer016-Sep-14 12:55
SledgeHammer016-Sep-14 12:55 
GeneralRe: Lock free algorithms Pin
Joe Woodbury6-Sep-14 13:11
professionalJoe Woodbury6-Sep-14 13:11 
SledgeHammer01 wrote:
As far as the client side goes, it sounds like you are polling your circular queue for work. NOTHING in your design should be polling. Polling is a big no-no. Everything should be async push notifications. Sleep / poll is not a good design. Should be push / WaitForSingleObject. WaitForSingleObject does not consume any CPU resources.


That's the point of my question. When doing a lock-free algorithm, how do you avoid polling (due to starvation or saturation)? In the discussions of the well-known circular queue, this is never actually answered--it assumes that a natural balance will always be present.

For the record, my various solutions have used locks.
GeneralRe: Lock free algorithms Pin
SledgeHammer016-Sep-14 13:37
SledgeHammer016-Sep-14 13:37 
GeneralRe: Lock free algorithms Pin
Joe Woodbury6-Sep-14 13:44
professionalJoe Woodbury6-Sep-14 13:44 
QuestionAlgorithm for comparing word with randomly distributed substring Pin
asdf2321130-Jun-14 23:06
asdf2321130-Jun-14 23:06 
AnswerRe: Algorithm for comparing word with randomly distributed substring Pin
Sanmayce3-Jul-14 7:15
Sanmayce3-Jul-14 7:15 
AnswerRe: Algorithm for comparing word with randomly distributed substring Pin
Sanmayce5-Jul-14 7:19
Sanmayce5-Jul-14 7:19 
QuestionCubesort Pin
Igor van den Hoven22-Jun-14 4:09
Igor van den Hoven22-Jun-14 4:09 
AnswerRe: Cubesort Pin
Sanmayce28-Jun-14 8:02
Sanmayce28-Jun-14 8:02 
GeneralRe: Cubesort Pin
Igor van den Hoven29-Jun-14 9:58
Igor van den Hoven29-Jun-14 9:58 
AnswerRe: Cubesort Pin
Sanmayce30-Jun-14 6:48
Sanmayce30-Jun-14 6:48 
GeneralRe: Cubesort Pin
Igor van den Hoven12-Jul-14 4:01
Igor van den Hoven12-Jul-14 4:01 
AnswerRe: Cubesort Pin
Sanmayce3-Jul-14 4:30
Sanmayce3-Jul-14 4:30 
QuestionReduce a Q2SAT formula Pin
Apurvgupta15-Jun-14 20:48
Apurvgupta15-Jun-14 20:48 
QuestionFastest textual decompression in C Pin
Sanmayce10-May-14 8:54
Sanmayce10-May-14 8:54 
AnswerRe: Fastest textual decompression in C Pin
Richard MacCutchan10-May-14 21:46
mveRichard MacCutchan10-May-14 21:46 
GeneralRe: Fastest textual decompression in C Pin
Sanmayce12-May-14 0:18
Sanmayce12-May-14 0:18 
GeneralRe: Fastest textual decompression in C Pin
Richard MacCutchan12-May-14 1:24
mveRichard MacCutchan12-May-14 1:24 
GeneralRe: Fastest textual decompression in C Pin
Chris Losinger23-May-14 3:12
professionalChris Losinger23-May-14 3:12 

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.