Sponsored Content
Top Forums UNIX for Advanced & Expert Users Can someone describe the process of pre-emption in UNIX? Post 302950309 by Ultrix on Thursday 23rd of July 2015 08:24:19 AM
Old 07-23-2015
So does Unix do any preemption with fork(), or is it just round-robin scheduling with timer interrupts?
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

describe unix commands in english

the following unix command ls | grep'?cw1' | wc -l converting it to english is it going to be like list the result of the search '?cw1' in number of lines is that correct ? (4 Replies)
Discussion started by: props
4 Replies

2. UNIX for Dummies Questions & Answers

Describe what this line of code would do

I am confused about what this line of code would do. I understand all the pieces but not the final outcome. Anyone that could help? find / -type f -xdev -mtime 0 -size 100000 -exec ls -lht {} /; 2>/dev/null (4 Replies)
Discussion started by: NickNine
4 Replies

3. Solaris

Describe the parameters of iostat,vmstat and mpstat

Hi, I am trying to take the Statistics of the machine during load.Can someone explian the parameters of iostat: tty sd1 sd2 sd3 sd4 cpu tin tout kps tps serv kps tps serv kps tps serv kps tps serv us sy wt id vmstat: kthr ... (1 Reply)
Discussion started by: grrajeish
1 Replies

4. Shell Programming and Scripting

I'm not sure how I would describe this

Some software, when you install it, prompts you for variables, such as the username for the software, or the password you are setting for the software's root account. I would like to know if it is possible to do such a thing, and if yes, how? basically, I would like my installer script to prompt... (3 Replies)
Discussion started by: Bakes
3 Replies

5. Shell Programming and Scripting

special question, hard to describe in few words...

dear coders, i need some inspiration again... there is something what i always wanted to know... how to code following: value 1: __________ value 2: __________ important: when my "script" starts the display has to be cleared and two lines are shown (see above), the cursor has to be... (2 Replies)
Discussion started by: pseudocoder
2 Replies

6. UNIX for Advanced & Expert Users

DEscribe this command

Hi all. can you please tell me (root) NOPASSWD: ALL what this command means (1 Reply)
Discussion started by: mindtee_abhi
1 Replies

7. Solaris

can someone describe

What is openboot prompt is this some kind of shell , and where is located :p (2 Replies)
Discussion started by: solaris_user
2 Replies

8. Shell Programming and Scripting

Shell Script to Kill Process(number of process) Unix/Solaris

Hi Experts, we do have a shell script for Unix Solaris, which will kill all the process manullay, it used to work in my previous env, but now it is throwing this error.. could some one please help me to resolve it This is how we execute the script (and this is the requirement) ... (2 Replies)
Discussion started by: jonnyvic
2 Replies

9. Shell Programming and Scripting

please describe me some simple command

Hi everyone I'm new here and I don't know some command of unix, please help by describe me how it work, I study unix command by myself and can't search exactly means so...Thanks :D sqlplus -s /nolog @${SQLFILE} ${file_type} >> ${OUTPUT_FILE} date "+%Y%m%d%H%M%S" $/usr/bin/echo "INFO : $1"... (2 Replies)
Discussion started by: zound617
2 Replies
schedctl_init(3C)					   Standard C Library Functions 					 schedctl_init(3C)

NAME
schedctl_init, schedctl_lookup, schedctl_exit, schedctl_start, schedctl_stop - preemption control SYNOPSIS
cc [ flag... ] file... [ library... ] #include <schedctl.h> schedctl_t *schedctl_init(void); schedctl_t *schedctl_lookup(void); void schedctl_exit(void); void schedctl_start(schedctl_t *ptr); void schedctl_stop(schedctl_t *ptr); DESCRIPTION
These functions provide limited control over the scheduling of a thread (see threads(5)). They allow a running thread to give a hint to the kernel that preemptions of that thread should be avoided. The most likely use for these functions is to block preemption while holding a spinlock. Improper use of this facility, including attempts to block preemption for sustained periods of time, may result in reduced per- formance. The schedctl_init() function initializes preemption control for the calling thread and returns a pointer used to refer to the data. If schedctl_init() is called more than once by the same thread, the most recently returned pointer is the only valid one. The schedctl_lookup() function returns the currently allocated preemption control data associated with the calling thread that was previ- ously returned by schedctl_init(). This can be useful in programs where it is difficult to maintain local state for each thread. The schedctl_exit() function removes the preemption control data associated with the calling thread. The schedctl_start() macro gives a hint to the kernel scheduler that preemption should be avoided on the current thread. The pointer passed to the macro must be the same as the pointer returned by the call to schedctl_init() by the current thread. The behavior of the program when other values are passed is undefined. The schedctl_stop() macro removes the hint that was set by schedctl_start(). As with schedctl_start(), the pointer passed to the macro must be the same as the pointer returned by the call to schedctl_init() by the current thread. The schedctl_start() and schedctl_stop() macros are intended to be used to bracket short critical sections, such as the time spent holding a spinlock. Other uses, including the failure to call schedctl_stop() soon after calling schedctl_start(), might result in poor perfor- mance. RETURN VALUES
The schedctl_init() function returns a pointer to a schedctl_t structure if the initialization was successful, or NULL otherwise. The schedctl_lookup() function returns a pointer to a schedctl_t structure if the data for that thread was found, or NULL otherwise. ERRORS
No errors are returned. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
priocntl(1), exec(2), fork(2), priocntl(2), attributes(5), threads(5) NOTES
Preemption control is intended for use by threads belonging to the time-sharing (TS), interactive (IA), fair-share (FSS), and fixed-prior- ity (FX) scheduling classes. If used by threads in other scheduling classes, such as real-time (RT), no errors will be returned but sched- ctl_start() and schedctl_stop() will not have any effect. The data used for preemption control are not copied in the child of a fork(2). Thus, if a process containing threads using preemption con- trol calls fork and the child does not immediately call exec(2), each thread in the child must call schedctl_init() again prior to any future uses of schedctl_start() and schedctl_stop(). Failure to do so will result in undefined behavior. SunOS 5.10 28 May 2003 schedctl_init(3C)
All times are GMT -4. The time now is 04:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy