Thread: Multi-core affinity defaults

  1. #1
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    937

    Multi-core affinity defaults

    So,
    Is it safe to assume that any system that supports multiple processors will split a two-threaded program down the middle if nothing else is going on?
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Well that would depend on your OS.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    937
    Well sure. I guess my question is -- if it seems obvious to be using both processors, will that happen?

    Take my laptop with Vista Home Premium and Ubuntu 8.04 on it. I have an Intel Dual-Core in there. Now, I know how my computer behaves. What can I expect from other systems?
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Whilst Salem is technically correct, I am personally not aware of any OS that DOESN'T do that, if it supports multiple processors or multiple cores. Certainly, Linux, MacOS, Windows and Solaris works that way.

    If you have a specific OS in mind, please tell us which it is.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    937
    Nope, just a general question. Thanks.
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Enable core dumping
    By steve1_rm in forum C Programming
    Replies: 3
    Last Post: 01-21-2009, 10:41 AM
  2. having a core dump
    By justins in forum C Programming
    Replies: 6
    Last Post: 05-21-2008, 12:00 PM
  3. buying a laptop ; intel dual core?
    By BobMcGee123 in forum A Brief History of Cprogramming.com
    Replies: 27
    Last Post: 07-30-2006, 02:28 PM
  4. program segfaults without dumping a core
    By ladar in forum C Programming
    Replies: 4
    Last Post: 04-04-2005, 11:21 AM
  5. Core dumps
    By rotis23 in forum Linux Programming
    Replies: 4
    Last Post: 06-06-2003, 10:01 AM