Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Multi Core question

Multi Core question

Scheduled Pinned Locked Moved C / C++ / MFC
c++questionasp-net
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    ForNow
    wrote on last edited by
    #1

    Hi I have C/C++ solution/project The parent process is C the child process is MFC C++. Each in its own project The C project has a number of threads. I have a quad core laptop. Is there any way of knowing how many cores the .exe(s) is/are using. Don't know if task manager is the answer. More so can I have an affinity of a thread to a core ? Thanks

    J 1 Reply Last reply
    0
    • F ForNow

      Hi I have C/C++ solution/project The parent process is C the child process is MFC C++. Each in its own project The C project has a number of threads. I have a quad core laptop. Is there any way of knowing how many cores the .exe(s) is/are using. Don't know if task manager is the answer. More so can I have an affinity of a thread to a core ? Thanks

      J Offline
      J Offline
      Jochen Arndt
      wrote on last edited by
      #2

      It is all handled by the operation system. Don't care about. While it is possible to set a thread affinity it is usually not necessary and often counterproductive. If a process has multiple threads it will use multiple cores when available. But there is no single core assigned to a specific thread. The OS assigns the cores so that a thread runs on different cores.

      F 1 Reply Last reply
      0
      • J Jochen Arndt

        It is all handled by the operation system. Don't care about. While it is possible to set a thread affinity it is usually not necessary and often counterproductive. If a process has multiple threads it will use multiple cores when available. But there is no single core assigned to a specific thread. The OS assigns the cores so that a thread runs on different cores.

        F Offline
        F Offline
        ForNow
        wrote on last edited by
        #3

        Is there anything in task manager or VS debugger or maybe the Kernal debugger that would show me any information about this Thanks

        J 1 Reply Last reply
        0
        • F ForNow

          Is there anything in task manager or VS debugger or maybe the Kernal debugger that would show me any information about this Thanks

          J Offline
          J Offline
          Jochen Arndt
          wrote on last edited by
          #4

          Showing information about the core that runs a specific thread makes no sense due to the fast switching between the cores. For process information have a look at the Sysinternals Suite[^].

          F 1 Reply Last reply
          0
          • J Jochen Arndt

            Showing information about the core that runs a specific thread makes no sense due to the fast switching between the cores. For process information have a look at the Sysinternals Suite[^].

            F Offline
            F Offline
            ForNow
            wrote on last edited by
            #5

            Thanks so much :)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups