Which cpu is it running on?

Discussion in 'Hardware' started by kiwi_trader, Dec 12, 2006.

  1. I've just got a Core2 system running and am exploring it. How do you tell what is allocated to which CPU?

    I'd like to know which elements of my trading environment are running where. Is there a simple monitoring program out there?
  2. A process will most likely run each of the two cores at different times.

    In simplified terms, it will work something like this:

    Suppose a process is not running either because of waiting for IO, or because it has been preempted by the scheduler to give other process(es) a go. When it is runnable it will go on the run queue. When it reaches the front of the run queue, the scheduler will assign it to the first available core which could be either core. It will run on that core until it 'sleeps' waiting for IO to complete, or until the scheduler (on timer interrupt) kicks it off to give a fair go to some other process. All this can happen on a context switch of which there can be hundreds or thousands per second.

    There is probably some way to bind processes to a particular core or CPU (processor affinity or something like that) but I would think you would not normally want to do this without some special reason.

    This is a generic description of how these things happen. I know very little about the specifics of Windows internals and no doubt there are some clever algorithms to assign resources efficiently (especially the processor cache) and fairly.