This discussion is archived
4 Replies Latest reply: Feb 22, 2011 9:53 AM by 841270 RSS

Multiprocessing Notes and Hyper-threading

841270 Newbie
Currently Being Moderated
Hello,

I am just getting started with 64-bit Java RTS on Linux, and have a couple questions about the "Multiprocessing Notes" in the Getting Started guide.
http://download.oracle.com/javase/realtime/doc_2.2/release/JavaRTSGettingStarted.html

They state that some of the scenarios in the GCDeterministic program require a 4-CPU machine (presumably, scenarios 5 and 6 which bind the program to two processors). Does this really mean "at least a 4-CPU machine?" If not, any suggestions for how to optimize the scenarios for an 8-CPU machine (for example) would be greatly appreciated.

In addition, I understand a system with a single dual-core hyper-threaded processor (giving the OS 4 "virtual" CPUs) meets the 4-CPU requirement. We will be looking into this ourselves, but any advice on the impacts of running with hyper-threading in a real-time environment would be greatly appreciated.

Many thanks.

Edited by: user3855552 on Feb 20, 2011 8:01 PM
  • 1. Re: Multiprocessing Notes
    tschodt Pro
    Currently Being Moderated
    You fail to mention if you are talking about Solaris or Linux.

    Did you even read the link you yourself provided?
    It talks at length on exactly those aspects about which you are asking.
  • 2. Re: Multiprocessing Notes
    841270 Newbie
    Currently Being Moderated
    We're using Linux (Red Hat). Sorry for leaving that out.

    Yes, I've ready the document; sorry if my questions weren't clear or the answers should be obvious. The original post has been edited.
  • 3. Re: Multiprocessing Notes
    tschodt Pro
    Currently Being Moderated
    user3855552 wrote:
    We're using Linux (Red Hat). Sorry for leaving that out.
    Yes, I've ready the document; sorry if my questions weren't clear or the answers should be obvious. The original post has been edited.
    Having more than 4 cores should not be a problem.
    Several of the scenarios use Solaris processor sets to take advantage of the machine architecture, and to make sure that the selected CPUs in the processor set are isolated from any other activity on the machine. The equivalent functionality on Linux includes processor affinity and cpusets, in order to restrict the set of processors used by the tests.
    Having less cores just means the test will not be able to demonstrate deterministic behaviour.
    you can use the script as-is (on Solaris or Linux) to run the scenarios on a single-processor machine, although some of the scenarios, mainly those for the GCDeterministic program, require a 4-CPU machine. If you have a single-CPU machine, just remove all instances of the following command in the script file:

        * Solaris: psrset
        * Linux: taskset

    Note that removing these commands in the GCDeterministic scenarios will affect deterministic behavior.
  • 4. Re: Multiprocessing Notes
    841270 Newbie
    Currently Being Moderated
    Thanks, tschodt. I guess part of my confusion was not understanding exactly why some of the GCDeterministic scenarios require four CPUs in order to demonstrate determinism. All of the scenarios use either one or two CPUs. If the "one CPU" scenarios were able to demonstrate determinism on a single-CPU system, it wasn't clear to me why the "two CPU" scenarios required four CPUs to demonstrate determinism.

    Thanks again.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points