Sponsored Content
Top Forums UNIX for Advanced & Expert Users Pthread attr setting doesn't work before thread create? Post 302526365 by DGPickett on Tuesday 31st of May 2011 10:26:35 AM
Old 05-31-2011
The policy SCHED_FIFO or SCHED_RR seems to be for multiple threads within a LWP, and the nice of that LWP would affect them all. If such threads have different numerical priorities like the nice, I wonder how you could set the LWP niceness. I would expect it must reflect the highest thread's priority, as the lower need to not take long else the priority on the higher cannot be honored/recognized.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Why doesn't this work?

cat .servers | while read LINE; do ssh jason@$LINE $1 done exit 1 ./command.ksh "ls -l ~jason" Why does this ONLY iterate on the first server in the list? It's not doing the command on all the servers in the list, what am I missing? Thanks! JP (2 Replies)
Discussion started by: jpeery
2 Replies

2. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

Howdie everyone... I have a shell script RemoveFiles.sh Inside this file, it only has two commands as below: rm -f ../../reportToday/temp/* rm -f ../../report/* My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies

3. Shell Programming and Scripting

ls -d doesn't work on Solaris

Hello, the ls -d command to only list directories in a directory doesn't seem to work on Solaris and the man command says to use that combination: ls -d Anyone have the same problem and find a resolve? Thanks BobK (9 Replies)
Discussion started by: bobk544
9 Replies

4. UNIX for Advanced & Expert Users

remsh doesn't work

Hi, I need to use remsh inside a ksh script. The script would remsh to another machine (maybe different OS) and then execute commands. A Simple Script: #!/usr/bin/ksh remsh sun7656 -l myuser "cd /user.3/MyFolder; ls -lart" But this gives me the error: permission denied I also... (4 Replies)
Discussion started by: som.nitk
4 Replies

5. Shell Programming and Scripting

Help with script.. it Just doesn't work

Hello,, Im verry new to scripting and have some problems with this script i made.. What it does: It checks a directory for a new directory and then issues a couple of commands. checks sfv - not doing right now checks rar - it checks if theres a rar file and when there is it skips to... (1 Reply)
Discussion started by: atmosroll
1 Replies

6. Shell Programming and Scripting

echo doesn't work right

Hi,when I run my first shell script,I got something that doesn't work right. I wrote this code in the script. echo -e "Hello,World\a\n"But the screen print like this: -e Hello,World The "-e" wasn't supposed to be printed out. Can anyone help me out?:wall: Many thanks!:) (25 Replies)
Discussion started by: Demon
25 Replies

7. UNIX for Dummies Questions & Answers

Why doesn't this work?

find . -name "05_scripts" -type d -exec mv -f {}/'*.aep\ Logs' {}/.LogFiles \; Returns this failure: mv: rename ./019_0120_WS_WH_gate_insideTEST/05_scripts/*.aep\ Logs to ./019_0120_WS_WH_gate_insideTEST/05_scripts/.LogFiles/*.aep\ Logs: No such file or directory I don't know why it's trying... (4 Replies)
Discussion started by: scribling
4 Replies

8. Shell Programming and Scripting

-ne 0 doesn't work -le does

Hi, I am using korn shell. until ] do echo "\$# = " $# echo "$1" shift done To the above script, I passed 2 parameters and the program control doesn't enter inside "until" loop. If I change it to until ] then it does work. Why numeric comparison is not working with -ne and works... (3 Replies)
Discussion started by: ab_2010
3 Replies

9. Shell Programming and Scripting

Timeout doesn't work, please help me

#!/bin/sh trap "cleanup" TERM timeout=5 mainpid=$$ cleanup() { echo "at $i interupt" kill -9 0 } watchdog() { sleep $1 } (watchdog $timeout && kill -TERM $mainpid) & run_test() (10 Replies)
Discussion started by: yanglei_fage
10 Replies

10. Post Here to Contact Site Administrators and Moderators

Thread / post doesn't open

Dear colleagues, this post doesn't open; error message: Anything we / I can do? Rgds Rüdiger (0 Replies)
Discussion started by: RudiC
0 Replies
rtsched(1)						      General Commands Manual							rtsched(1)

NAME
rtsched - execute process/lightweight process (LWP) with real-time priority SYNOPSIS
scheduler priority command [arguments] scheduler] priority scheduler] priority scheduler] priority DESCRIPTION
executes command with POSIX or HP-UX real-time priority, or changes the real-time priority of currently executing process (pid) or light- weight process (lwpid). All POSIX real-time priority processes or LWPs are of greater scheduling importance than processes/LWPs with HP-UX real-time or HP-UX time- share priority. All HP-UX real-time priority processes/LWPs are of greater scheduling importance than HP-UX timeshare priority pro- cesses/LWPs, but are of lesser importance than POSIX real-time processes/LWPs. Neither POSIX nor HP-UX real-time processes/LWPs are subject to degradation. POSIX real-time processes/LWPs may be scheduled with one of three different POSIX real-time schedulers: SCHED_FIFO, SCHED_RR, or SCHED_RR2. See rtsched(2) for details. is a superset of See rtprio(1). Options Specify the desired scheduler: POSIX real-time schedulers: SCHED_FIFO SCHED_RR SCHED_RR2 HP-UX real-time scheduler: SCHED_RTPRIO HP-UX timeshare scheduler: SCHED_HPUX SCHED_NOAGE Specify priority range; any integer within the inclusive priority range of the corresponding scheduler. is required for all schedulers except SCHED_HPUX. If scheduler is SCHED_HPUX, the priority argument is ignored. The default priority range of each scheduler is as follows: scheduler highest priority lowest priority -------------------------------------------------- SCHED_FIFO 31 0 SCHED_RR 31 0 SCHED_RR2 31 0 SCHED_RTPRIO 0 127 SCHED_NOAGE 178 255 SCHED_HPUX N/A N/A Higher numerical values for the priority represent higher priorities under POSIX real-time schedulers, whereas lower numeri- cal values for the priority represent higher priorities under HP-UX real-time and timeshare schedulers. Specify an already executing process ID (pid). Specify an already executing lightweight process ID (lwpid). The target LWP (lwpid) can be in any process. Select all the LWPs in an already executing process (specified with When scheduling policy is not specified explicitly using the option, the process's current schedul- ing policy will be used. If the requested priority value is in the range for this scheduling policy, the scheduling policy and priority of the process and all its LWPs will be changed to these values. Please note that it may cause the scheduling policy to be changed for some LWPs. If the user is not a member of a group having access and is not the user with appropriate privileges, command is not scheduled, or pid's/ lwpid's real-time priority is not changed. When changing the real-time priority of a currently executing process/LWP, the effective user ID of the calling process must be the user with appropriate privileges, or the real or effective user ID must match the real or saved user ID of the process to be modified. In presence of processor sets (see pset_create(2) for details), the application execution is restricted to processors in the application's processor set. The threads in different processor sets do not compete with one another for processors based on their scheduling policy and priority values. The scheduler looks only at threads assigned to a processor's processor set to choose the next thread to run. RETURN VALUE
returns exit status: if command is successfully scheduled or if pid's or lwpid's real-time priority is successfully changed; if command is not executable, pid or lwpid does not exist, or priority is not within the priority range for the corresponding scheduler; if command (pid/lwpid) lacks real-time capability, or the invoker's effective user ID is not a user who has appropriate privi- leges, or the real or effective user or the real or effective user ID does not match the real or saved user ID of the process being changed; or if rtsched encountered an internal error or if rtsched is not supported by this release. EXAMPLES
Execute file with SCHED_FIFO at a priority of 10: Execute file with SCHED_RTPRIO at a priority of 127 (this is synonymous to Execute file with the SCHED_HPUX scheduler: This is useful to spawn a timeshare priority command from a real-time priority shell. Set the currently running process, pid 24217, to execute with SCHED_RR2 at a priority of 20: Now change its priority to 10 using the same scheduler: Set the currently running LWP, lwpid 987312, to execute with SCHED_RR at a priority of 10: Set all currently executing LWPs in a process pid 21342 to execute with SCHED_FIFO at a priority of 25: WARNINGS
The priority values used by may differ from those used by other commands. For example, ps(1) displays the internal representation of pri- ority values. AUTHOR
was developed by HP. SEE ALSO
rtprio(1), setprivgrp(1M), getprivgrp(2), pset_create(2), rtprio(2), rtsched(2), _lwp_getscheduler(2), _lwp_setscheduler(2), pstat_getlwp(2). rtsched(1)
All times are GMT -4. The time now is 02:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy