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

Similar Messages

  • Disable CPU core in Solaris 10

    Hi,
    can anybody help me to disable cpu core in solaris 10. my server is Sparc T4-1 server (1 physical processor with 8 core 64 threads). I am able to disable threads using psradm, but not sure about disabling core.
    thanks
    Sajith.P.V

    You can disable a single core in solaris using "psradm -f <cpu id>"
    man page for psradm
    The psradm utility changes the operational status of proces-
    sors. The legal states for the processor are on-line, off-
    line, spare, faulted, and no-intr.
    An on-line processor processes LWPs (lightweight processes)
    and can be interrupted by I/O devices in the system.
    An off-line processor does not process any LWPs. Usually, an
    off-line processor is not interruptible by I/O devices in
    the system. On some processors or under certain conditions,
    it might not be possible to disable interrupts for an off-
    line processor. Thus, the actual effect of being off-line
    might vary from machine to machine.
    A spare processor does not process any LWPs. A spare proces-
    sor can be brought on-line, off-line or to no-intr by a
    privileged user of the system or by the kernel in response
    to changes in the system state.
    Example 1 Setting Processors to off-line
    The following example sets processors 2 and 3 off-line:
    % psradm -f 2 3
    Example 2 Setting Processors to no-intr
    The following example sets processors 1 and 2 no-intr:
    % psradm -i 1 2
    Example 3 Setting Processors to spare
    The following example sets processors 1 and 2 spare, even if
    either of the processors was in the faulted state:
    % psradm -F -s 1 2
    Example 4 Setting All Processors on-line
    % psradm -a -n
    Example 5 Forcing Processors to off-line
    The following example sets processors 1 and 2 offline, and
    revokes the processor bindings from the processes bound to
    them:
    % psradm -F -f 1 2

  • How do I disable NFS client in Solaris 10

    I am trying to disable NFS client in Solaris 10. In Solaris 9 I would simply rename /etc/rc2.d/S73nfs.client to /etc/rc2.d/s73nfs.client
    Since /etc/rc2.d/nfs.client does not seem to exist in 10 I'm wondering how to do this.
    Thanks in advance for the help.
    Max

    Since /etc/rc2.d/nfs.client does not seem to exist in
    10 I'm wondering how to do this.Read up on the new Solaris 10 service management faciities. Info at http://docs.sun.com/ There are a couple of tutorial doc's at bigadmin

  • How to disable role password in Solaris 11

    Roles can only be assumed by logged in users. That is the definition of a role. Therefore role authentication is to some extent double authentication. The user has already authenticated as himself when he logged in and the sysadmin has enough trust in him to grant him a certain role. So why would he need to authenticate to the role? Isn't that double authentication ? Anyway I can see why that makes sense on a role like 'root' but on other more normal types of roles ? Really?
    Anyway that is not what this posting is about. It is about me not being able to figure out how to disable role password in Oracle 11.
    In Solaris 10 I would do:
    <pre>passwd -r files -d myrole</pre>
    That would set the myrole account to a no password account and that would be enough to disable it.
    In Solaris 11 I cannot make this work. I suspect this is because of the introduction of the roleauth attribute but I've tried all possible combinations:
    <pre>passwd -r files -d myrole</pre>
    <pre>rolemod -K roleauth=user myrole</pre>
    or
    <pre>passwd -r files -d myrole</pre>
    <pre>rolemod -K roleauth=role myrole</pre>
    Can't make any of these work.
    Pls help.

    Hello MrMonza,
    I do not completely understand what you are looking for. Perhaps it would help if you explained, for which purpose you want to use your new role.
    In short, a role is simply a user account, to which you cannot login directly. As to every user account, rights are assigned to each role. And as for every user account, you have to provide a password for it.
    If you want to switch to a role without password, this is nearly the same as extending the rights of your account.
    This is possible by assigning additional profiles to it via /etc/user_attr. Privileged commands, written by you, and connected to these profiles, can be defined in /etc/security/exec_attr.d/local-entries. These commands can be called via pfexec, see pfexec(1), which grants privileges (e.g. uid=0) for just the call.
    See also user_attr(4), prof_attr(4), exec_attr(4) and the "SEE ALSO" sections in there.
    Profiles can be chosen from the predefined profiles in /etc/security/prof_attr.d, or they can be self-assembled from these profiles and authorizations from /etc/security/auth_attr.d.
    New profiles should be stored in /etc/security/prof_attr.d/local-entries.

  • Disable thread

    Hai all
    I got this error :
    ORA-01623 : log string is current log for instance string (thread string) - cannot drop
    Cause
    A thread"s current log cannot be dropped even if the thread is closed. A disabled thread usually does not have a current log, but a half completed disable may need to be disabled again.
    Action
    If the database is not open then disable the thread. If the database is open and an instance has the thread open, then the instance can be requested to switch logs. If the database is closed the log can be archived or cleared to force a switch
    my DB is not open, how can I disable the thread here ?
    Kai

    Have you lost your redo log files for this database?
    You can check Support note 117481.1 but I would advise you to get in touch with Oracle Support if it is an "important" database.

  • Jumpstart: Disable user registration in Solaris 10 x86 8/07

    Earlier Solaris version let you disable the user registration screen by adding DISABLE=1 to /etc/default/solregis or not installing SUNWsregu. That doesn't work with Solaris 10 x86 8/07. There is no SUNWsregu package.
    Can this still be disabled?

    Confirmed: I just jumpstarted with Solaris 10 x86 (10/09) AKA Update 8, and touched the .nvreg file into existence with a finish script. The system no longer prompts to register at first login.
    Finish script code snipit:
    if [ -d ${BASEDIR}/usr/lib/breg/data ]; then
    touch ${BASEDIR}/usr/lib/breg/data/.nvreg
    fi

  • Disable anonymous ftp in Solaris 10

    Hello,
    I am trying to disable anonymous ftp on a solaris 10 server, but am having great difficulty.
    I have tried adding the line 'guestserver' to /etc/ftpd/ftpaccess - this did not work.
    There is no ftp account present in /etc/passwd
    The inetd.conf entry for ftp is 'ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd'
    I have even tried adding 'anonymous' to the /etc/ftpd/ftpusers file
    Anyone know how to shut anonymous ftp off, in a clean manner?

    The former. (the last field corresponds to argv[0], argv[1]...)
    Though I find it odd that if you don't have an anonymous account, you think that anonymous ftp is active. If you ftp the host, and use anonymous and a password, it lets you in? It seems that the normal behavior is that is says
    331 Guest login ok, send your complete e-mail address as password.
    REGARDLESS of whether anonymous ftp is active or not (it's just that you can't log in without an allowed password). One can argue whether or not this is a desired behavior....
    -r

  • 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

  • Another " your apple id have been disabled " thread.

    Ok, soo, i have read tons of threads about this issue and none have been resolved. And this morning i got the same message, i have searched and searched for a phone number to call apples customer support for this issue but to no avail, am i just blind or dont apple have any phone support for issues like this?
    Anyhow, here is what happened to me. When i woke up this morning and checked my email i had two emails from both apple and paypal for purchases of a game and in game purchases, i know i didnt do that because i was asleep at 3.30AM and i would never spend over $90.00 on a game!! so, i went to paypal to file a dispute with those 2 purchases. about an hour later i got 2 more emails, one from apple and one from paypal about yet another itunes purchase! i file yet another dispute with Paypal.
    Now, i was going to download 3 updates on my iphone and i got the message: your apple id have been disabled,, i tried on my ipad2 and the same message, i have reset my password several times and changed other info on my itunes account, but my id is still disabled.
    Like i said earlier, i have searched franticly for a phone number to apple but cant find anything! is it just me or does apple just dont want to deal with customers on the phone or what is going on?

    http://www.apple.com/support/itunes/contact/

  • Is there a way to disable interrupts for a Solaris 9/ sun OS 5.9 machine

    I am trying to figure out if there is a way to disable interrupts in solaris 9 on a sun 5.9 sparc9 machine, while under lock. I don't want the process to get bumped under lock. I have been looking for a way to do it and have come up empty handed. Am I just missing something? -Thanks

    Thanks for the response, I understand that using real time scheduling I can still be preempted. I also understand how to solve my problem on a multiple CPU machine. Unfortunately I only have that luxery on part of the system. There is a part of the system, 7% of the processes, that run on a single cpu machine. This is a customer requirement, I can't change it. What I want to do is possibly take advantage of the priority inheritance features of the mutex locks, however, I believe this needs to be enacted as root, since they need to run real time and it seems that you need to be root to enable the real time features. However, to propose this as an option to solve my issue, I need to show that it works. I have kicked off a process using priocntl with RT and a priority of 11, and I can see them run as real time and in a priority level of 111 using TOP, but when I put code in so I know they are in the mutex portion of the code, I don't see a priority change. I created a mutex with the protect option and a priority ceiling of 5. Does anyone know if this would be reflected anywhere. I tried opening an xterm and using a priocntl -d, but I see priority 11 even when it is in a mutex with a ceiling of 5. I would have expected it to go to five. Just in case I had the levels backwards, I also tried a ceiling of twenty and there still was no change. How can I test the priority inheritance capability? Does anyone know which call would reflect the priority change? I just need to show it does something in order to propose the change at that low of a level in our system code. Thanks again everyone who has tried to help me understand this.

  • 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

  • How do I disable email threads?

    How do I disable threads in my email?

    I am using version 8.1 of mail.  There is no "settings" on the menu.  When I look at preferences>viewing and untick "include related messages" it doesn't seem to change anything.  I still get a plethora of related messages that I don't want. When I look in the "sent" folder at an email I have just sent it shows that all the related messages have been attached to the one I sent.  Confusing and worrying.

  • Solaris 9 vs 10 wrt process/thread scheduling, from perspective of 'top'

    On a dual-processor UltraSpract Fire V240, running Solaris 9, the 'top' command shows:
    rodan%top
    load averages:  2.43,  2.23,  2.23                                 00:41:10
    39 processes:  35 sleeping, 2 running, 2 on cpu
    CPU states:     % idle,     % user,     % kernel,     % iowait,     % swap
    Memory: 2048M real, 1707M free, 160M swap in use, 2500M swap free
      PID USERNAME THR PRI NICE  SIZE   RES STATE   TIME    CPU COMMAND
    1551 ssgolsha   1   0    0   62M   61M run   324:17 46.89% vpr
    1866 ssgolsha   1   0    0   22M   20M run    41:57 45.19% vpr
    1922 mingl      4   0    0   42M   39M cpu0    1:28  6.27% messengers
    1928 mingl      1  39    0 1640K 1208K cpu1    0:00  0.12% top-sun4u-5.7
      185 root       3  59    0 4920K 3352K sleep   0:14  0.02% automountd
    1583 mingl      1  49    0 3584K 3136K sleep   0:00  0.02% tcshrodan%top
    load averages:  2.77,  2.51,  2.35                                 00:41:45
    39 processes:  35 sleeping, 2 running, 2 on cpu
    CPU states:  0.0% idle, 99.8% user,  0.2% kernel,  0.0% iowait,  0.0% swap
    Memory: 2048M real, 1707M free, 160M swap in use, 2500M swap free
      PID USERNAME THR PRI NICE  SIZE   RES STATE   TIME    CPU COMMAND
    1866 ssgolsha   1   0    0   22M   20M run    42:23 38.18% vpr
    1551 ssgolsha   1   0    0   62M   61M run   324:38 33.02% vpr
    1922 mingl      4   0    0   42M   39M cpu1    1:51 28.34% messengers
    1928 mingl      1  59    0 1640K 1280K cpu0    0:00  0.02% top-sun4u-5.7
      185 root       2  59    0 4920K 3352K sleep   0:15  0.00% automountd
      219 root      19  59    0 4760K 3552K sleep   0:03  0.00% nscd
    1583 mingl      1  59    0 3584K 3136K sleep   0:00  0.00% tcshSunOS 5.9's man page for 'top' says STATE is the current state (one of "sleep", "WAIT", "run", "idl", "zomb", or "stop")
    On a dual-processor dual-core AMD Opteron 270, running Solaris 10, the 'top' command shows:
    homer% top
    load averages:  0.11,  0.16,  0.12;                    up 7+08:19:46    17:11:47
    93 processes: 91 sleeping, 2 on cpu
    CPU states: 72.3% idle, 25.1% user,  2.5% kernel,  0.0% iowait,  0.0% swap
    Memory: 2048M phys mem, 1606M free mem, 8001M swap, 7873M free swap
       PID USERNAME LWP PRI NICE  SIZE   RES STATE    TIME    CPU COMMAND
    14685 mingl      4  30    0  112M  109M cpu      2:09   105% messengers
       258 root       1  59    0   13M 5260K sleep   74:52  0.70% Xorg
      9522 coby       1  59    0   47M 8116K sleep   22:44  0.33% mixer_applet2
      9520 coby       1  59    0   49M 8592K sleep    6:35  0.12% gnome-netstatus
       270 gdm        1  59    0   50M 6076K sleep    4:44  0.08% gdmgreeter
    14658 mingl      1  59    0 2068K 1488K cpu      0:00  0.08% top
    SunOS 5.10's man page for 'top' says
    STATE
    Current state (typically one of "sleep", "run", "idl", "zomb", or "stop").
    As seen in both cases, the 'messengers' program has 4 threads.
    On Solaris 9, its state is either cpu0 or cpu1, depending on the time I call 'top'. Does that mean it is actually running on either cpu0 or cpu1? What is the difference between the 'cpu0' state and the 'run'
    state? And does it mean all 4 threads are running/assigned to cpu0 (or cpu1)?
    On Solaris 10, the state shows 'cpu'. Does it mean it is running? And does it mean that each thread may run on a different CPU therefore the state does not show any particular CPU number? Is it correct that Solaris 9 assign the CPU on a per-process basis and Solaris 10 on a per-thread basis?

    On Solaris 9, its state is either cpu0 or cpu1,
    depending on the time I call 'top'. Does that mean
    it is actually running on either cpu0 or cpu1?Should be.
    What
    is the difference between the 'cpu0' state and the
    'run' state?A thread can be sleeping (it doesn't have anything to do), or runnable. Although it's runnable, it doesn't mean that it's running right at that instant.
    Note that it's difficult to get a good view of the situation with 'top' (or almost any other program). Because whenever 'top' looks, 'top' will always be running, even though it's only running a fraction of the time.
    And does it mean all 4 threads are
    running/assigned to cpu0 (or cpu1)? No. Each thread is independently executed. But since you only have 2 processors, and since 'top' has to be running when it runs, you'll only ever see your process on at most one other cpu.
    You might want to use 'prstat' and 'prstat -L'. The first shows one line per process, the second one line per thread.
    On Solaris 10, the state shows 'cpu'. Does it mean
    it is running? And does it mean that each thread may
    run on a different CPU therefore the state does not
    show any particular CPU number? Is it correct that
    Solaris 9 assign the CPU on a per-process basis and
    Solaris 10 on a per-thread basis?I don't know exactly what top does or doesn't do. You might try 'prstat' instead.
    There is no difference at this level between Solaris 9 and 10. All will schedule on a per-thread basis.
    Darren

  • Solaris 10 update 6 keeps generating core file (/core)

    I wonder if somebody has encountered the following issue.
    I did a fresh install of Solaris 10 update 6 on two servers (T5140 and T524) from DVD.
    I noticed that a core file was in the root filesystem (/core).
    So, I deleted it.
    As soon as I delete the core file, another one is generated.
    This is happening on both servers where I installed Solaris 10 update 6 from the DVD.
    This is not a live update install. Solaris was installed from scratch. When prompted to preserve previous data, I replied with 'do not preserve data'
    Does anybody know where the core file is coming from and how to stop it being generated?
    Found out that is coming from vold
    SunOS b1osdtsun02 5.10 Generic_137137-09 sun4v sparc SUNW,T5240
    # more /etc/release
                          Solaris 10 10/08 s10s_u6wos_07b SPARC
               Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
                            Use is subject to license terms.
                                Assembled 27 October 2008
    # mdb /core
    Loading modules: [ libsysevent.so.1 libnvpair.so.1 libc.so.1 ld.so.1 ]
    ::statusdebugging core file of vold (32-bit) from b1osdtsun02
    file: /usr/sbin/vold
    initial argv: /usr/sbin/vold -f /etc/vold.conf
    threading model: multi-threaded
    status: process terminated by SIGSEGV (Segmentation Fault)
    ::stacklibc.so.1`strlen+0x18(408450a5, 0, 0, 88b70, 600, 180)
    read_slices+0x114(874a0, b, 889a0, feeafd34, 1, 5)
    read_hsfs_partition+0x88(b, 46c00, 6d0000, 2c, 34400, 1010101)
    read_partition+0x30(874a0, 341a4, 3, 34000, 34400, 9)
    create_top_partition+0x140(7cbe0, 7cc24, 7cbe0, 874a0, ffffffff, b)
    0x265e0(800012, feeaff9c, c, 598e0, 7cbe0, ffffffff)
    create_medium+0x74(800012, feeaff9c, 20, 12, 47800, c)
    0x2232c(5d278, 0, 0, 800012, 20, 33000)
    libc.so.1`_lwp_start(0, 0, 0, 0, 0, 0)
    >
    #It seems that vold is failing to mount the DVD on both servers after Solaris was installed.
    Is this a Solaris 10 update 6 bug?
    Edited by: shen on Jan 29, 2009 8:45 PM

    Never mind.
    It is a known bug documented on manual " [Solaris 10 10/08 Release Notes, Chapter 2 Solaris Runtime Issues|http://docs.sun.com/app/docs/doc/820-5245/chapter2-1000?a=view] " as shown below.
    The solution is to apply vold patch [138130-01|http://sunsolve.sun.com/search/document.do?assetkey=1-21-138130-01-1].
    Solaris 10 10/08 DVD Media Might Not be Automatically Mounted by vold (6712352)
    The Solaris 10 10/08 DVD does not mount by default during runtime. No error message is displayed.
    Workaround: Perform the following steps:
       1. Become superuser.
       2. Disable vold:
          * On Solaris 10 Systems:
                # svcadm disable -t volfs
          * On Solaris 8 and Solaris 9 systems:
                /etc/init.d/volmgt stop
       3. Mount the media manually by using the # mount -F hsfs path to block device path to mount point command. For example:
          # mount -F hsfs /dev/rdsk/c0t2d0s2 /mnt

Maybe you are looking for

  • Applets and server scripts

    Hi, I'm trying to run a java applet with a web application I'm developing, but I'm having some trouble running it. I have a dll which generates html pages dynamically, and in one of the pages i want to call an applet, but I keep getting an error that

  • IPad gone Crazy

    Folks, I have no idea what has happened. My iPad now regularly freaks out. At least once a day one of these things happen: The icons jump back and forth, right and left, Photos launches all on its own and then picks photos, zooms in on them. Safari s

  • PH-Lumia Amber Update

    Hello there...i just got the update and it downloaded fine, it installed fine...then i'm sure the phone should restart but it has been on that screen with spinning gears for 2 hours now...is that normal?...is that too long?...i'm worried about my pho

  • Isync doesn't work under mac os 10.4.5

    Hi. My isync won't work after my recent update to 10.4.5 -- I just get the swirling colored disk of death when I click on SYNC under SYSTEM PREFERENCES and have to force quit. What's going on? Thanks. Lisa

  • "Not Enough Free Disk Space" error message, but Finder shows plenty of disk space available

    Apologies if this is a double post, but I have been searching all over and can't seem to find this issue in the forums. I have a 256GB Macbook with a fresh copy of Lion installed, am going through the process of migrating files back over, after which