Results 1 to 6 of 6

Thread: How to find which thread is running on which processor

  1. #1
    Join Date
    Sep 2010
    Posts
    58

    How to find which thread is running on which processor

    I am using windows 7 as an operating system and Intel core 2 duo as its processor, Some times i am a really confused that which thread of the processes are running and where , I just want know that there is something like master thread and what it does , And also who controls all the thread that are being created. And also one important query that how threads are made and who decides that which thread will run which process. Is there is any way that we can increase the number of thread on my core 2 duo processor,and if we do so does it will affect the performance of our processor.

  2. #2
    Join Date
    May 2008
    Posts
    835

    Re: How to find which thread is running on which processor

    First of all i must say that you have a lot of eagerness regarding threads and a lot of queries also, I think that i can help you out in this, Thread is the smallest process that can be run and scheduled by an operating system, Thread is nothing but the fork of a computer program normally known as multiple running tasks or multitasking.

  3. #3
    Join Date
    Oct 2005
    Posts
    924

    Re: How to find which thread is running on which processor

    I have gone through your problem and i would rather say that it is not the problem it is the concern. The thread is the one which is the small process that is working with the processor or handling its task, there are multiple threads run on the CPU it is called multitasking these all threads controlled by the master thread , Master thread is the one which controls the subordinate threads and assigns process to them. and the master thread is controlled by the main processor.

  4. #4
    Join Date
    Oct 2005
    Posts
    1,217

    Re: How to find which thread is running on which processor

    If the threads are not pinned threads then they are affinity pinned and then they will migrate from processor to processors.This affinity restrictions can be set through the system API calls,The system API calls will vary from one system to another one. to use or set these API calls you can use the CPUID system which is totally depended on the processors. And you might come to know that which thread is running for which process.

  5. #5
    Join Date
    Nov 2005
    Posts
    1,187

    Re: How to find which thread is running on which processor

    It seems to me that you are keen to know about the threads the master thread is the one that control all the subordinate threads of it, these thread are made to keep the track of the others threads. this treads uses Open MP concept of thread team member numbers, where each team of n threads is numbered 0-n . These n threads are then assigned the small process.

  6. #6
    Join Date
    Sep 2005
    Posts
    1,434

    Re: How to find which thread is running on which processor

    It seemed to me that you are willing to know more about what the thread is and how it is created , As per the information provided by you that you are willing to create the thread, so here is the small code which will help you to create an user defined thread.
    declspec(n) unsigned get_current_proc()
    {
    asm
    {
    mov ecx, 03Bh
    lsl eax, ecx
    shr eax, 0Eh
    retn
    }
    }

Similar Threads

  1. Synchronize a producer thread and a consumer thread in C#
    By Ayuka in forum Software Development
    Replies: 6
    Last Post: 10-11-2010, 04:04 AM
  2. Best Processor for Single Thread Application
    By Eleeazar in forum Motherboard Processor & RAM
    Replies: 7
    Last Post: 18-09-2010, 12:04 AM
  3. Urgent:Processor not running
    By kousikm in forum Motherboard Processor & RAM
    Replies: 2
    Last Post: 12-01-2010, 02:55 PM
  4. Thread waiting on a lock while running windbg syncblk
    By Dwij in forum Software Development
    Replies: 2
    Last Post: 10-06-2009, 05:40 PM
  5. CPU processor running at 100%
    By Maximus() in forum Motherboard Processor & RAM
    Replies: 2
    Last Post: 07-08-2008, 06:08 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,148,800.72373 seconds with 16 queries