Hi !
I need to test the thread execution processors in user mode.
Normal Processor - Execute One Thread at a time
Normal Processor + With HyperThreading Enabled (2 Logical Core Present) - Execute Two Threads at a time.
Dual Core Processor - (two Physical Core present) - Execute Two Threads at a time.
Assume One program is running two threads.
Is is possible to see visually or any proof of concept two thread is simultaneously running like that.
How to test these aspects with respect to C/C++/Win32 /etc ...programming?
I think using timestamp is not possible to test the multithreading. because
it is faster we can't print microsecond or even nanoseconds...etc...
Please advice me regarding this.
|
Go4Expert Founder
|
![]() |
| 18Oct2007,20:38 | #2 |
|
You should be having 2 processes and not 2 threads to be testing that. I am not sure if 2 threads will help because its only one thread that can be executed at a time and time is sliced between threads.
|
|
Go4Expert Member
|
|
| 19Oct2007,11:11 | #3 |
|
why I Need 2 processes.?
Because I need to testing the multi threading (whethther 2 threads simultaneously running )in a process. Quote:
I m asking this situation in Multicore processor like dual core,quad core etc.. Intel is tell 2 threads is running simultaneous. you can check their demo on their website. |
|
Go4Expert Founder
|
![]() |
| 19Oct2007,17:06 | #4 |
|
As far as My understanding goes it should be 2 threads from 2 different processes and not from the same process because everything could be in a mess.
Think of the situation where both of my thread can run for the same processes then my function need to be re-entrant which means that my same function can be executed at the same time. What probably Intel has told is from marketing point of view where more than one thread can be run but I am yet to be convinced that it can be from the same processes. |
|
Skilled contributor
|
![]() |
| 20Oct2007,11:25 | #5 |
|
I would love to have a core 2 duo but it seems to be too costly at the moment.
|
|
Go4Expert Member
|
|
| 22Oct2007,11:14 | #6 |
|
Quote:
Originally Posted by shabbir In Dual Core processor 2 threads will run simultaneously not from same processes. It may from different process. I agree your points. Is there any way to identify two threads are running simultaneouly (proof of concept) ? |
|
Go4Expert Founder
|
![]() |
| 22Oct2007,17:17 | #7 |
|
2 process having an infinite loop would suggest that but I am not sure
|

