Hi,
I'm doing a program in dual core processor. I'm wondering, is it possible for write a program that is core specific..? For example, thread A only runs at core 1 and thread B only runs at core 2. I'm currently looking at IntelĀ® Threading Building Blocks (TBB)..
Am I going down the right path..? Can somebody please advice/confirm..? Thanks alot..

Ok.. the reason I'm asking about this is because, currently, i wrote a program and it functions well in single core computer. When I try to run the same program in dual core computer, it gives weird results.. When I tried to disable a processor and only use 1 processor on dual core computer, it again functions ok.. I suspect that for some reason, when the program runs on 2 cores, the thread got mixed up and because of that gives weird and unpredictable results.. So to try to overcome it, i am thinking of making the thread core specific..
If anybody experience this before or knows how to overcome this problem, please do share your experience.. Thanks..

Does one thread depends on the results of the other thread? Or main() needs the results of the other two threads() ? Maybe you need to add a WaitForMultipleObjects() -- or something like that -- in main(). Without more detail its hard telling what is going on.

To answer your specific question: I don't know how to do it, but I think it can be done because there are several programs out there that I think do it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.