Sponsored Content
Full Discussion: For Kelam_Magnus
Contact Us Post Here to Contact Site Administrators and Moderators For Kelam_Magnus Post 57852 by chekeitout on Monday 8th of November 2004 07:43:33 PM
Old 11-08-2004
For Kelam_Magnus

It is not my intention to cheat the system. yes, you are correct that it is a homework question, on attempting the problem , i read through 6 chapters of my book and put in an entire saturday, 10 hrs trying to figure tthis out and I still got no where. Just like any language i have been through c++ and java, to know how to code you must be taught and shown some example to understand how to do the code correctly, as in can i use c++ in my unix, i didnt even know until i asked someone out of class. Im taking an intro course, and the assigment is 7 scripts , this one is one of them in which i have already finished 5 on my own, i have this one and another. So please do not judge someone before you know, and actually it would be nice if you left that thread open so i could see other example and learn.

another unix learner, cam , but yes I do see your concern. ohh and i had to do it this way, cause i couldnt post a reply to my thread, im not sure why. have a good night
 

We Also Found This Discussion For You

1. Post Here to Contact Site Administrators and Moderators

Kelam_Magnus

Why did you close all my threads? I undstand that since you may be an advanced unix user, that my questions seem dumb. Hey, they probably are. But the title of the forum is " UNIX for Dummies Questions & Answers" and it says "All UNIX Newbies Welcome !!" So what is the prob? I dont think... (7 Replies)
Discussion started by: LANSTARR.COM
7 Replies
pthread_get_nice_np(3T) 												   pthread_get_nice_np(3T)

NAME
pthread_get_nice_np(), pthread_set_nice_np() - get or set the nice value of a thread SYNOPSIS
PARAMETERS
thread The thread whose nice value is to be set/retrieved. nice_val Value of nice to be applied to the target thread is returned (get function) or it specifies the new value of nice for thread (set function). DESCRIPTION
These functions are used to set and retrieve the nice value of an individual thread. returns the current nice value setting of the target thread and stores it in nice_val. adds the value of nice_val to the current nice value of the target thread. A thread's nice value is a non-negative number. The system imposes a minimum nice value of 0 and a maximum of 39 with lower nice values providing more favorable scheduling. If calling results in a nice value outside the range of 0 to 39, the value will be set to the nearest limit. A process must have appropriate privileges to lower a thread's nice value. The function allows individual threads in the process to have different nice values. returns the current nice value less 20 and will be in the range -20 to +19. The nice value of only system scope threads can be changed. An attempt to change the nice value of a process-scope thread will result in a return value of Calling on a thread that has a scheduling policy other than will have an effect only when the thread's scheduling policy changes to If a thread calls the system call to create a new process, the new process inherits the process-level nice value. Calling to create a new thread will result in the new thread inheriting the creating thread's nice value. Note If the nice value of the entire process is changed through or all the threads in the process will have their nice values reset to the new process-level nice value. The new process's nice value setting overwrites the old thread's setting. Thus its possible that a thread whose nice value had been set higher than the process-level nice value have its nice value lowered as a result of the process-level re-nicing. RETURN VALUE
Upon successful completion, and return zero. Otherwise, an error number is returned to indicate the error (the variable is not set). ERRORS
If any of the following occur, the and functions return the corresponding error: A process-scope thread was specified. The caller does not have permission to lower the nice value specified in nice_val. No thread could be found corresponding to thread. AUTHOR
and were developed by HP. SEE ALSO
fork(2), nice(2), setpriority(2), pthread_attr_getschedpolicy(3T), pthread_setschedparam(3T). Pthread Library pthread_get_nice_np(3T)
All times are GMT -4. The time now is 06:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy