Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problems synchronizing multiple threads?? Pin
led mike27-Jun-06 9:18
led mike27-Jun-06 9:18 
GeneralRe: Problems synchronizing multiple threads?? [modified] Pin
Zac Howland27-Jun-06 9:31
Zac Howland27-Jun-06 9:31 
GeneralRe: Problems synchronizing multiple threads?? Pin
mikeorama1234527-Jun-06 9:53
mikeorama1234527-Jun-06 9:53 
GeneralRe: Problems synchronizing multiple threads?? Pin
Zac Howland27-Jun-06 10:12
Zac Howland27-Jun-06 10:12 
GeneralRe: Problems synchronizing multiple threads?? Pin
John M. Drescher27-Jun-06 10:17
John M. Drescher27-Jun-06 10:17 
AnswerRe: Problems synchronizing multiple threads?? Pin
valikac27-Jun-06 9:12
valikac27-Jun-06 9:12 
AnswerRe: Problems synchronizing multiple threads?? Pin
Michael Dunn27-Jun-06 9:47
sitebuilderMichael Dunn27-Jun-06 9:47 
GeneralRe: Problems synchronizing multiple threads?? Pin
pavanbabut29-Jun-06 12:11
pavanbabut29-Jun-06 12:11 
Thanks for all your replies. Yep, I think my question should state as 'Parallel/simultaneous processing of multiple threads'. Synchronization is more related to resource sharing between threads. The problem is to run both threads exactly at same speed and at the same time (which assures the frame rate). I have tried several ways by defining the priority classes to both threads to HIGH_PRIORITY_CLASS and setting their priority to PRORITY_TIME_CRITICAL, but still 'sometimes' I am getting a difference of one frame between 2 threads. I am running my application on a Dell Precision 670 (Dual xeon processors) with 2 threads on each core.
Here is how my application works-
I am having 2 waveform generating boards on 2 of my 64-bit PCI slots. In my application I am generating waveforms on both of these boards and each thread generates waveforms on each of these boards. These boards will have on-board buffers where we can store the data to be generated as waveforms. Since these buffers are to be in multiples of 1024 and my data is not in multiples of 1024, as usual, I am using rotating buffers. The board buffers, data buffers are completely independent for both threads (each thread is having its own buffers), so no data is shared between these threads except the intial flag variable which initiates the starting loop in the thread. Neither of these threads change the flag. They just use it to start their wave form generating loop (just like as a trigger signal).
At last I would like to know how we can make sure these threads run at the same rate and speed and at any given instant of time they both should be at the same point of execution (one more thing is both these threads have exact and same number of instructions).

thanks,
-Pavan
Questionbug of mouse_event() Pin
V_shr27-Jun-06 7:28
V_shr27-Jun-06 7:28 
QuestionCOM Port Acesss in VC++ Pin
tanksali27-Jun-06 6:17
tanksali27-Jun-06 6:17 
AnswerRe: COM Port Acesss in VC++ Pin
David Crow27-Jun-06 6:41
David Crow27-Jun-06 6:41 
AnswerRe: COM Port Acesss in VC++ Pin
mikeorama1234527-Jun-06 8:43
mikeorama1234527-Jun-06 8:43 
AnswerRe: COM Port Acesss in VC++ Pin
Hamid_RT27-Jun-06 19:17
Hamid_RT27-Jun-06 19:17 
QuestionMultiple string tables in exe Pin
Andre xxxxxxx27-Jun-06 6:06
Andre xxxxxxx27-Jun-06 6:06 
AnswerRe: Multiple string tables in exe Pin
Joe Woodbury27-Jun-06 6:15
professionalJoe Woodbury27-Jun-06 6:15 
GeneralRe: Multiple string tables in exe Pin
Andre xxxxxxx27-Jun-06 6:22
Andre xxxxxxx27-Jun-06 6:22 
GeneralRe: Multiple string tables in exe Pin
Joe Woodbury27-Jun-06 6:29
professionalJoe Woodbury27-Jun-06 6:29 
GeneralRe: Multiple string tables in exe Pin
Andre xxxxxxx27-Jun-06 6:35
Andre xxxxxxx27-Jun-06 6:35 
GeneralRe: Multiple string tables in exe Pin
Joe Woodbury27-Jun-06 6:47
professionalJoe Woodbury27-Jun-06 6:47 
GeneralRe: Multiple string tables in exe Pin
Andre xxxxxxx27-Jun-06 8:30
Andre xxxxxxx27-Jun-06 8:30 
AnswerRe: Multiple string tables in exe Pin
Zac Howland27-Jun-06 7:21
Zac Howland27-Jun-06 7:21 
GeneralRe: Multiple string tables in exe Pin
Andre xxxxxxx27-Jun-06 8:29
Andre xxxxxxx27-Jun-06 8:29 
GeneralRe: Multiple string tables in exe Pin
Zac Howland27-Jun-06 9:20
Zac Howland27-Jun-06 9:20 
Questionstring tables Pin
big_denny_20027-Jun-06 5:43
big_denny_20027-Jun-06 5:43 
AnswerRe: string tables Pin
Neil Van Eps27-Jun-06 5:48
Neil Van Eps27-Jun-06 5:48 

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.