Alternative Threading Model in Solaris 8?

I haven't been able to get to any Solaris 8 docs yet, but I've been hearing about his alternative threading model available in Solaris 8. Can someone explain it to me?

I know this question was posted a while ago, but this info may be of help.
As well as improved real-time support for threads, Solaris 8 has an extra set of thread libraries under /usr/lib/lwp.
They are designed to be direct replacements for the standard libraries; you can pick them up by linking against them or using LD_LIBRARY_PATH.
This new one-level libthread is a library that implements all of the POSIX and Solaris threads interfaces using a one-level threading model, where threads are one-to-one with lightweight processes (LWPs), rather than the two-level model that is used in the standard libthread implementation, where user-level threads are multiplexed over possibly fewer LWPs.
It has been found in tests that some applications perform much better with the new library. However, more kernel resources are consumed.
Hope that helps.
Ralph
SUN DTS

Similar Messages

  • How can I verify alternative thread library use?

    Hello all,
    If anyone could help me with finding a method for verifying that the Solaris alternative threading model (LD_LIBRARY_PATH=/usr/lib/lwp) is being used successfully by a virtual machine it would be much appreciated.
    I am using Solaris 8, JDK 1.3.1_03.
    Thanks in advance,
    Nathaniel

    Run the JVM with the utility truss to see the system calls. That might help.
    User Commands truss(1)
    NAME
    truss - trace system calls and signals

  • Xsql servlet threading model?

    does anybody know the threading model supporting by the xsql servlet? from my testing, it appears that it only supports single threaded.
    environment: nt 4.0, svcpack 5/iis/servlet exec 2.2/jdk 1.1.8/xsql servlet 0.9.6
    any help/info appreciated.
    thanks
    michael lasmanis

    steve,
    here are the java vm settings from servlet exec. all the other settings are in line with the install instructions.
    VM Settings
    Java VM: 1.1.8 from Sun Microsystems Inc.
    JITC: symcjit
    Host: Windows NT 4.0 on x86
    Native Stack Size: 128K Bytes
    Java Stack Size: 400K Bytes
    Minimum Heap Size: 1024K Bytes
    Maximum Heap Size: 524288K Bytes
    Verbose GC: Disabled
    Verbose: Disabled
    JITC: Enabled
    Class GC: Enabled
    Async GC: Enabled
    Verify: Remote
    Java VM: Sun Classic
    null

  • Single Threaded Model JSP- Servlet

    Servelts can be set to have thread safe access (Single thread model). However, when a JSP is converted in to a servlet, is the servlet tagged as to use the single thread model?

    As of JSP specification 1.2 the default value for the "isThreadSafe" attribute of the page directive is true indicating that the container can direct multiple requests to the page simultaneously. If this value is set to false then the requests will be sent one at a time.
    Good Luck!
    Eshwar Rao
    Developer Technical Support
    Sun microsystems inc
    http://www.sun.com/developers/support

  • Disabling Thread Preemption on Solaris 9

    Hi,
    Is there any way to turn off thread preemption on Solaris 9?
    I want to prevent my application thread from being swapped out.
    -Richard

    I think I misleadingly used the term "swap out." Let's focus on the thread preemption only.
    I'm experimenting with a computer architecture simulator, but it can't handle thread preemption correctly. So whenever a user-level thread gets preempted, the simulation crashes.
    I tried to workaround this by running 15 user threads on a 16-CPU machine, leaving one dedicated CPU for the kernel. I bound each of those 15 threads to a separate, dedicated CPU. But this doesn't seem to help.
    I need something like kpreempt_disable() in /usr/include/sys/disp.h to prevent my user-level threads from being preempted. However, that macro seems to be enabled in kernel code conly.
    -Richard

  • Native pthread mutex on 1:1 threading model

    Hi,
    I wanted to verify with the experts that it is safe to use a native mutex in JNI instead of
    MonitorEnter/MonitorExit on all JREs that map a java thread to a native thread in a
    1:1 fashion. Why do this? Because MonitorEnter/Exit pair takes 500 nanos which
    is way to slow for my JNI component. Of course, on threading models that
    are not 1:1 I am definitely not safe(?).
    By the way, does anyone know if the SUN hotspot for windows is a 1:1 threading model.
    I know that it is for Linux.
    Andy

    i know that it's old but some other ppl can found it.
    actually i'm using a pthread_mutex_lock on linux/unix and WaitForSingleObject on windows. see, i don't create threads inside the jni glue, but i create mutexes.
    it seems to work well, but for some unknow reason it leads to deadlocks on certain unices.
    right now i'm going to change my implementations for MonitorEnter/Exit and GetPrimitiveArrayCritical.

  • Threading model: Linux, MacOSX, Win32

    Hi,
    I've been searching these forums for topics regarding Java threading models for the three operating systems for which we build Java applications: Linux, MacOSX and Windows. So far, I've only got a clear picture on the Win32 environment. It uses native threads, which I'm told is best for performance.
    My question is: what threading models do the virtual machines for Linux and MacOSX support these days? Are they working with socalled "green threads" or do they use the more powerful native threads as well? I can't seem to find any recent posts with information on this subject.
    Thanks in advance

    Here is an article that you might find interesting:
    Programming Java threads in the real world
    http://www.javaworld.com/javaworld/jw-09-1998/jw-09-threads.html
    Jesper

  • Anyone about Thread.sleep() in solaris???

    hi
    can anyone pls tell me how to make sure that a thread sleeps exactly for a given amount of time inspite of its processing time in solaris?
    i have noticed that when i say Thread.sleep(10000)
    it is not exacly sleeping for 10 secs every time.sometime it sleeps for more than 3 mts.
    why is it so different in solaris?
    In winNT it is working fine.
    Thank you

    I my experience, on a idle Solaris system, a call to Thread.sleep(n) will sleep n plus or minus 1 millisecond. Of course, what Solaris box is really idle. The sleeping thread is able to run after the the requested time but must compete with other threads. Generally, unless the box is VERY busy, calling Thread.Sleep(10000) should wake up in not too much more than 10 seconds - 20 would be unusual.
    Is the thread running at a lower priority than normal or are high-priority threads busying the system?
    Chuck

  • Thread Problems with Solaris 2.7 and Java 1.3

    Hi,
    we are deploying a Java distributed application, based on JAVA 1.3, on a SOLARIS 2.7 system and we are meeting some problems with threads.
    This application uses a distribuite computing based on ORBIX 2000 environment and creates more than 40 threads.
    Sometimes happens that one or more threads ( consider that all the threads have the same priority) are no more scheduled even tought they have some work to do into the local queue.
    We have tested the application on a NT system and the problem does not appears.
    Do you have some suggestion ?
    PS: Note that all the other threads work well and it seems that the problem is not related to a Orbix method.
    Thanks
    Roberto

    It crashed 3 seconds after it is running. Should be reading some jar file.
    Could be a something corrupted a zip file or something. Can you still do a java -version? You may want to try reinstalling 1.4.2_07

  • Struts Action threading model bottleneck

    Hi,
    Struts Action classes are only instantiated once. Then the controller servlet routes all perform/execute calls through the single instantiated Action class. Does this create a performance bottleneck? Any insights would be helpful.
    Thanks

    It's more performant, since it doesn't need to create new objects for each request. You just need to write your code in a thread-safe manner (watch the instance variable!).
    Cheers

  • BPEL Threading Model

    I have three BPEL Processes: BPEL1, BPEL2 and BPEL3 invoking each other in a synchronous fashion as shown below:
    Synchronous flow - BPEL1 -> BPEL2 -> BPEL3
    I have a java web service which sends in the request to the BPEL1. I would like to increase the no of threads to handle more requests from the Java web service. I looked up four parameters that can be tuned:
    Dispatcher Invoke Threads
    Dispatcher Engine Threads
    Dispatcher System Threads
    Dispatcher Maximum Request Depth
    As per my understanding Dispatcher Invoke Threads comes into the picture when a synchronous transaction is involved. The question I have is:
    Is the value of 20 per instance of BPEL Process or per synchronous transaction? With the above flow stated, BPEL1 invoking BPEL2, BPEL2 invoking BPEL3 and response flow from BPEL3 to BPEL2 and BPEL2 to BPEL1, all being synchronous calls, is this parameter for every instance of BPEL1 alone (per synchronous transaction) or per BPEL instance of BPEL1,BPEL2 and BPEL3?*

    No, "Dispatcher Invoke Threads" come into play with async (oneway / possible callbacks). This setting controls the threadpool size to create new process instances, after the originator thread saved the instance data and returned.
    Engine threads handle callbacks and expirations
    System threads are cleanup threads

  • Alternative fisheye models?

    When I apply a fisheye profile in camera raw 6, 100% "distortion correction" generates a rectilinear image, and 0% leaves the geometry as-shot.  But I would prefer to correct my fisheye images to a more appropriate ideal projection, that neither stretches the image so severely nor crops so much of the edges.
    Best would be the stereographic projection, r/f = 2sin(a/2), however the equal-angle spherical projection r/f = a or the equal area one r/f = 2tan(a/2) would be almost as good. [ a = angle from optical axis in radians, r = radius in image, f = focal length.]  All 3 of those projections are used to model 'ideal' fisheye lenses, and there are real lens designs that approximate each of them.
    The Adobe Camera Model (as given in the Lens Design Data Conversion Guide) apparently takes the rectilinear image as the standard for an 'undistorted' image for both normal lens and fisheye lenses.  That is unreasonable, given that fisheyes can have fields of view of 180 degrees or more.  That model becomes numerically unstable for fields of view over 160 degrees, and undefined at 180 degrees.
    The standard of correctness for a "corrected" image should simply be a known mathematical relationship to the ideal pinhole image, which is the projection of the world on a sphere of radius f.  That can be satisfied by correcting the image to any of the mentioned projections of the sphere, among many others. 
    So my question is, when can we expect ACR lens profiles to deliver more appropriate "corrected" fisheye images?
    -- Tom

    Hi Chan,  sorry, did try to post by email; here's a copy
    The pinhole image -- equivalent to the mathematical operation  of linear projection -- has always been the standard of correctness for  imaging optics.  It is often assumed that the flat image surface, found  in so many cameras, is part of this standard; but in fact that is only a  secondary requirement.  Many specialized cameras in fact have curved  image surfaces, and this in no way invalidates the ray tracing and other  computations used to design, optimize and calibrate them.  The  principle of pinhole projection is equally valid for any image surface  shape, provided only that it is accurately known.
    Consider a spherical panorama.  It shows everything that  can be seen from a certain point in space.  It is equivalent to a 2D  image painted on a sphere.  Ideally that spherical image is a linear  projection of the whole world -- equivalent to a pinhole image with the  pinhole at the center of the sphere -- which is mathematically valid  even though not physically realizable.
    An ordinary photo is a projection of part of the world onto a flat  surface.  If we "correct" the lens accurately, we get the image that  would have been projected on that surface by a pinhole at the lens's  entrance pupil (ignoring slight complications for thick lenses).  That  is fine for fields of view up to perhaps 90 degrees, but leads to severe  distortion (and numerically unstable calibration computations) when the  lens covers a really wide angle.  And if the field of view is 180  degrees or more, no flat corrected image is even possible in theory.
    If we calibrated lenses in terms of a perfect spherical pinhole  image, that calibration would be valid for all lenses, up to and  including exotic designs with fields of view over 270 degrees.  More  practically, it would work for the many fisheye lenses with fields of  120 to 180 degrees that are in daily use, as well as for all longer  lenses.
    Given a calibration that maps the lens's output to the sphere, one  can easily generate "corrected" images in any desired flat projection;  not only the normal rectilinear perspective projection but also  stereographic, cylindrical, equirectangular, Pannini, ....  Those other  projections are increasingly being used for presenting wide photos, and  some are very useful as the starting point for stitching panoramas.
    There are some special difficulties with calibrating fisheye lenses,  notably that both optical axis tilt and the shift of the entrance pupil  with angle have to be taken into account.
    This paper by NASA engineer Don Gennery gives a lucid account of the problems and  of one way of structuring calibration s/w to deal with them.
    Gennery's method does not explicitly model a spherical image  surface, and it is not necessary for a wide angle calibration algorithm  to do that.  However the results of any valid lens calibration can be  converted to a mapping to/from a reference sphere.  What I am suggesting  is really that Adobe should consider packaging its calibration  parameters in that form, and putting code in CameraRaw that implements  "correction" to a range of useful projections.   And of course  developing a really good fisheye calibration capability.
    I use Sigma 8mm, Nikon 10.5mm and Canon 15mm fisheye lenses for  panoramic photography, and I am impressed by how well Adobe's own  calibrations of the 10.5 and 15 seem to work.  However I am not happy  with the results I have been able to get on those lenses myself, using  Lens Profile Creator; I suspect Adobe's may have benefited from some  expert tweaking.  What I really need is corrected fisheye images in  stereographic projection, I'd be perfectly happy to leave the  calibration to Adobe. 
    Hoping this helps move Adobe lens profiling forward.  BTW I am available as a (tele-)consultant if you decide you need help. 
    -- Tom

  • WLS6.1 hanging on Solaris- and SIGQUIT doesn't work

    Hi,
    We are experiencing a problem that looks like a deadlock when our server is under load (using WLS6.1SP2, Solaris 8 and the 1.3.1 JVM supplied with WLS). After processing many requests, the server hangs and CPU usage drops to 0%. Unfortunately the standard means of getting a thread dump (sending a SIGQUIT with kill -3 or Ctrl-\) does nothing. The problem also occurs if WebLogic is running under debug (using
    -Xdebug -Xnoagent -Djava.compiler=none -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5555) but alas the debugger hangs when trying to pause the server after this deadlock). It appears as though the server is not accepting any requests (including administrative requests from the console) but this doesn't seem to be due to thread starvation as CPU usage is 0%.
    The only output we can get is from truss, which seems to indicate no activity at all until the SIGQUIT is received. It seems to register the SIGQUIT but it looks as though it is not being processed.
    Does anyone have any ideas?
    Kevin.

    We found a solution to this problem, relating to the threading model that the JVM
    uses.
    Have a look at http://java.sun.com/docs/hotspot/threads/threads.html for more
    details.
    The default threading model on Solaris 8 is many-to-many (threads to LWPs) with
    thread-based synchronisation. After playing with various threading models, we
    found that the best was one-to-one with the alternate thread library. This is
    the default provided by Solaris 9, but you can also tell Java to use this with
    older versions of Solaris by putting the following line in your start command
    prior to executing WebLogic:
    export LD_LIBRARY_PATH=/usr/lib/lwp:$LD_LIBRARY_PATH
    Apologies to anyone who was looking for an answer to this beforehand: I should
    have replied to this newsgroup back in September!
    Kevin Thomas
    J2EE Consultant
    LogicaCMG
    Charlie Therit <[email protected]> wrote:
    Kevin,
    If you are not able to capture a JVM thread dump, then the next best
    thing would be to capture several "/usr/proc/bin/pstack pid" C-level
    thread dumps. This information may enable BEA Support to help suggest
    potential work arounds. Depending upon the data in the pstack output,
    you may also wish to open a support case with Sun.
    Sincerely,
    Charlie Therit
    Developer Relations Engineer
    BEA Support
    Kevin Thomas wrote:
    Hi,
    We are experiencing a problem that looks like a deadlock when our serveris under load (using WLS6.1SP2, Solaris 8 and the 1.3.1 JVM supplied
    with WLS). After processing many requests, the server hangs and CPU
    usage drops to 0%. Unfortunately the standard means of getting a thread
    dump (sending a SIGQUIT with kill -3 or Ctrl-\) does nothing. The problem
    also occurs if WebLogic is running under debug (using
    -Xdebug -Xnoagent -Djava.compiler=none -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5555)but alas the debugger hangs when trying to pause the server after this
    deadlock). It appears as though the server is not accepting any requests
    (including administrative requests from the console) but this doesn't
    seem to be due to thread starvation as CPU usage is 0%.
    The only output we can get is from truss, which seems to indicate noactivity at all until the SIGQUIT is received. It seems to register
    the SIGQUIT but it looks as though it is not being processed.
    Does anyone have any ideas?
    Kevin.

  • Coredump on using mtmalloc on Solaris 8

    Hi ,
    We are trying to use mtmalloc with our application to compare
    the performance with other allocators.
    The tests go through fine on Solaris 9m, but coredumps immediately
    on Solaris 8 in a free call.
    Can you point out the differences in the mtmalloc between solaris 8 and 9
    that can be helpful to resolve this issue.
    Any pointers would be really helpful.
    regards,
    Johar

    Johar,
    1. Before you start with the tests patch your OS with the latest patch cluster
    http://patchpro.sun.com/
    "Solaris Recommended Patch Cluster"
    2. Are you running a binary compiled on Solaris 9 on Solaris 8?
    3. To level the playground you should use the new 1 to 1 thread model in Solaris 8
    which is not the default thread model (unfortunately).
    4. See thread 16910 in this forum
    http://forum.sun.com/thread.jsp?forum=4&thread=16910
    0. You might want to read this whitepaper too:
    http://wwws.sun.com/software/whitepapers/solaris9/multithread.pdf
    HTH,
    vladimir

  • JVM on Multiprocessing env

    Hi,
    running java threads on multiprocessors architecture lets spread java-threads on processors; since java-threads need of JVM in order to execute, does this mean that actually what is splitted too is the JVM along with each thread?
    Many thanks in advance.
    banto

    Hi Antonio,
    In your question, I would say the byte-code calls a native method which is calling an OS library ( calling a binary method) . This binary method is part of OS lib which is responsible for creating native threads for the JVM thread.
    for example this link allows you to map thread priority on JVM into the native thread on Solaris OS by changing the OS native thread lib.
    [http://java.sun.com/j2se/1.5.0/docs/guide/vm/thread-priorities.html#libthread|http://java.sun.com/j2se/1.5.0/docs/guide/vm/thread-priorities.html#libthread]
    and here it shows us we can change the native threading model on Solaris OS which JVM threads is using to acquire OS or native thread
    [http://java.sun.com/docs/hotspot/threads/threads.html|http://java.sun.com/docs/hotspot/threads/threads.html]
    as per JVM spec at
    it says
    *8.12 Threads*
    Threads are created and managed by the classes Thread and ThreadGroup. Creating a Thread object creates a thread, and that is the only way to create a thread*. When the thread is created, it is not yet active; it begins to run when its start method is called.*
    So if we look at this source class for Thread.java,for example, we will see a natvie method
    public synchronized void start() {
          * This method is not invoked for the main method thread or "system"
          * group threads created/set up by the VM. Any new functionality added
          * to this method in the future may have to also be added to the VM.
          * A zero status value corresponds to state "NEW".
            if (threadStatus != 0) // flag to see if the thread has already started. Not started is =0
                throw new IllegalThreadStateException();
            group.add(this);
            start0(); // *this is the native method*
            if (stopBeforeStart) {
             stop0(throwableFromStop);
    *No idea how the detail of the native method works. It is OS(s) related thing.*
    *As we can see we call a native. In java we delegate to a native method to have a thread.*
    *I can say JVM thread is not real thread but a proxy for the real thread*
    private native void start0();If you look at this link for example, it covers some apect of JVM in relation to native thread
    [Frequently Asked Questions About the Java HotSpot VM|http://java.sun.com/docs/hotspot/HotSpotFAQ.html]
    On thing that I will not try to understand which is the native thread on different OS in relation to different CPUs. We do not need to focus on the underlying issues until we get into performance problem; then we can investigate the native thread models
    Last month during a seminar ( new feature in Java 1.7 like ParallelArray etc..) at Sun MicroSystem in the City of London. We spoke about the JVM in relation with the OS. Many audience seems to forget the native methods which you can find around in java source code.
    Let me know what do you think?
    Regards,
    Alan Mehio
    London, UK

Maybe you are looking for

  • Bad version number on Mac, but not PC

    I have a java applet that works fine in Windows. It works fine on Macs as long as I compile it with JDK 1.5. However, once I compile it with JDK 1.6 it loads in Windows, but it doesn't load at all in Mac OSX. I've tried compiling it with javac using

  • How to Create Menu Exit

    Hi,    Please tell me steps for how to create Menu Exit. Please Help me

  • I chat...no video

    Hey everyone. I currently have a powerbook G4 with an apple I sight. I have used it to I chat in the past but recently have not been able to I chat or even receive one way video chats. I can IM fine just no video. I am using wireless internet in my d

  • Jar file required for class

    Hi folks i need to know the IBM's Jar file and download the same which consists of following Classes. com.ibm.connector.ConnectionSpec com.ibm.connector.InteractionSpec com.ibm.connector.ConnectionSpecManagementProperties com.ibm.connector.Interactio

  • WCF net.tcp binding Opentimeout not firing

    I have a WCF service with net.tcp endpoint. I have been using reliable session. In one of our production scenario, the web server was down and in this case the client systems was trying to establish a connection with the service. The clients were stu