Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to Decrease priority of a particular process in time of process creation Post 302221331 by matrixmadhan on Monday 4th of August 2008 09:04:27 AM
Old 08-04-2008
you can "renice" a running process provided you are root
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Backgrounding process with higher priority

I have been troubleshooting a mysterious performance problem with the nightly batch programs on our primary system for quite some time and just found something very interesting. All batch processes are running with a nice value of 24. I don't know what the default is on other systems but I do know... (3 Replies)
Discussion started by: keelba
3 Replies

2. UNIX for Advanced & Expert Users

Increasing priority of a process

Hi! Experts, Is there anyway to incerase the priority of a process which is already started and running??.. I think nice can used for increase priority when we start the process.. But donno how to do when its already running.. Any help would be apreciated.. Jyoti (2 Replies)
Discussion started by: jyotipg
2 Replies

3. HP-UX

urgent help required on changing process priority using nice

Hi folks, Hope you can help me. I have a process that is currently running at nice 20 and need it to run faster (-10?). How do I change the process using nice? I have the process number and thought it would be along the lines of; nice -10 process_id but it doesn't seem to like that. (1 Reply)
Discussion started by: gshuttleworth
1 Replies

4. Solaris

start a process with the highest priority

hello, I have a process lauched by non-root user. how to lauch this process with a very high priority? I know this has to do with nice command but how to allow a user to lauch his process with a very high priority and without ROOT intervention? PS: this process is always lauched from a... (2 Replies)
Discussion started by: melanie_pfefer
2 Replies

5. UNIX for Advanced & Expert Users

Process accounting and Shell process time

Hi All, I am running the following accounting on one of my executable, $ accton /home/myexe-acct $ ./myexe $ accton When I check the process timings I get the below result, Shell process time: 300ms myexe time: 100ms I want to know on why the shell(sh) process is taking so much time... (1 Reply)
Discussion started by: santoshbr4
1 Replies

6. AIX

priority for process

hi how to change the priority of a process for eg.if a,b,c these there process are running and if i have to give the b process as high priority and high severe level what should i do (3 Replies)
Discussion started by: senmak
3 Replies

7. AIX

Adjust disk scheduling priority for a process?

Hi all! Some dumb administrator run the weekly backup "by hand" on our AIX 5.3 server, which we use to deploy Websphere applications, during work hours. Using the server while the backup is taking place is almost imposible. Both the disks are working at 100% and it's almost unusable. Asking the... (2 Replies)
Discussion started by: shandrio
2 Replies

8. Shell Programming and Scripting

Process Creation

how the fork function creats the child process????? what the things it will take from parent process nd what it will give to child process? (4 Replies)
Discussion started by: Mac91
4 Replies

9. Programming

How to decrease virtual size of a process after cleaning all containers and using malloc_trim (0)?

Hello all i have simple server running on linux redhat 6.1 it is build with c++ in the server i have huge std vector that holds pointers to cache objects those cache objects holds allot of data from the DB any way ... in some point in time there is simple API that suppose to clean the... (2 Replies)
Discussion started by: umen
2 Replies
sched_setparam(3)					     Library Functions Manual						 sched_setparam(3)

NAME
sched_setparam - Sets the scheduling parameters of the specified process (P1003.1b) LIBRARY
Realtime Library (librt.so, librt.a) SYNOPSIS
#include <sched.h> int sched_setparam ( pid_t pid, const struct sched_param *param); PARAMETERS
pid Specifies the ID of the process whose scheduling parameters are set. If pid is zero, the scheduling parameters of the calling process are set. *param Specifies a pointer to a sched_param structure, which contains the scheduling parameters of the specified process. Currently, the sched_param structure contains only a priority field. The value of the priority value is any integer within the priority range for the current scheduling policy of the process specified by pid. DESCRIPTION
The sched_setparam function changes the scheduling parameters of a process. Setting priorities such that the most critical process has the highest priority allows applications to determine more effectively when a process will run. At run time, a process starts out with an initial priority of SCHED_PRIO_USER_MAX. A call to the sched_setparam function that raises the priority of a process also raises the maximum priority for the process. This higher maximum priority exists for the life of the process or until the priority is set to a new, higher priority through another call to the sched_setparam function. The maximum priority cannot be adjusted downward, but subsequent calls to the sched_setparam or sched_setscheduler functions can specify that a process run at a lower priority. You must have superuser privileges to set the priority above the user maximum, SCHED_PRIO_USER_MAX. A superuser can set the priority out- side the range of the specified pid's scheduling policy. When the function completes, the target process resumes execution after all other runnable processes of equal or greater priority are scheduled to run. If the priority of the target process is set higher than that of the calling process, and if the target process is ready to run, then the target process will preempt the calling process. If the calling process set its own priority lower than some other process, then the other process will preempt the calling process. In either situation, the calling process might not receive notification of the completion of the requested priority change until the target process has executed. The scheduling parameters of the process as indicated by pid are obtained with a call to the sched_getparam function. The priority of a process is inherited across fork and exec calls. RETURN VALUES
On a successful call to the sched_setparam function, the scheduling parameters are set and a value of 0 (zero) is returned. On an unsuc- cessful call, a value of -1 is returned and errno is set to indicate that an error occurred and the priority is unchanged. ERRORS
The sched_setparam function fails under the following conditions: [EINVAL] One or more of the requested scheduling parameters is outside the range defined for the specified pid's scheduling policy. This error does not apply for superusers. [EPERM] The requesting process does not have permission to set the scheduling parameters for the specified process, nor does it have appropriate privilege to invoke the sched_setparam function. [ESRCH] No process can be found corresponding to that specified by pid. RELATED INFORMATION
Functions: getpid(2), sched_getparam(3), sched_getscheduler(3), sched_setscheduler(3) Guide to Realtime Programming delim off sched_setparam(3)
All times are GMT -4. The time now is 09:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy