xref: /freebsd/share/man/man4/sched_4bsd.4 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
19b99e9b9SRobert Watson.\" Copyright (c) 2005 Robert N. M. Watson
29b99e9b9SRobert Watson.\" All rights reserved.
39b99e9b9SRobert Watson.\"
49b99e9b9SRobert Watson.\" Redistribution and use in source and binary forms, with or without
59b99e9b9SRobert Watson.\" modification, are permitted provided that the following conditions
69b99e9b9SRobert Watson.\" are met:
79b99e9b9SRobert Watson.\" 1. Redistributions of source code must retain the above copyright
89b99e9b9SRobert Watson.\"    notice, this list of conditions and the following disclaimer.
99b99e9b9SRobert Watson.\" 2. Redistributions in binary form must reproduce the above copyright
109b99e9b9SRobert Watson.\"    notice, this list of conditions and the following disclaimer in the
119b99e9b9SRobert Watson.\"    documentation and/or other materials provided with the distribution.
129b99e9b9SRobert Watson.\"
139b99e9b9SRobert Watson.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
149b99e9b9SRobert Watson.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
159b99e9b9SRobert Watson.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
169b99e9b9SRobert Watson.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
179b99e9b9SRobert Watson.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
189b99e9b9SRobert Watson.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
199b99e9b9SRobert Watson.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
209b99e9b9SRobert Watson.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
219b99e9b9SRobert Watson.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
229b99e9b9SRobert Watson.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
239b99e9b9SRobert Watson.\" SUCH DAMAGE.
249b99e9b9SRobert Watson.\"
255ac818f6SRuslan Ermilov.Dd January 21, 2008
269b99e9b9SRobert Watson.Dt SCHED_4BSD 4
27*aa12cea2SUlrich Spörlein.Os
289b99e9b9SRobert Watson.Sh NAME
299b99e9b9SRobert Watson.Nm sched_4bsd
30a4be0b3cSRuslan Ermilov.Nd "4.4BSD scheduler"
319b99e9b9SRobert Watson.Sh SYNOPSIS
329b99e9b9SRobert Watson.Cd "options SCHED_4BSD"
339b99e9b9SRobert Watson.Sh DESCRIPTION
34a4be0b3cSRuslan ErmilovThe
359b99e9b9SRobert Watson.Nm
36a4be0b3cSRuslan Ermilovscheduler
375ac818f6SRuslan Ermilovis the traditional system scheduler, providing both high throughput and solid
389b99e9b9SRobert Watsoninteractive response in the presence of load.
399b99e9b9SRobert Watson.Pp
409b99e9b9SRobert WatsonThe following sysctls are relevant to the operation of
419b99e9b9SRobert Watson.Nm :
429b99e9b9SRobert Watson.Bl -tag -width indent
43a4be0b3cSRuslan Ermilov.It Va kern.sched.name
449b99e9b9SRobert WatsonThis read-only sysctl reports the name of the active scheduler.
45a4be0b3cSRuslan Ermilov.It Va kern.sched.quantum
469b99e9b9SRobert WatsonThis read-write sysctl reports or sets the length of the quantum (in
479b99e9b9SRobert Watsonmicro-seconds) granted to a thread.
48a4be0b3cSRuslan Ermilov.It Va kern.sched.ipiwakeup.enabled
499b99e9b9SRobert WatsonThis read-write sysctl sets whether or not the scheduler will generate an
509b99e9b9SRobert Watsoninter-processor interrupt (IPI) to an idle CPU when a thread is woken up.
519b99e9b9SRobert WatsonOtherwise, idle CPUs will wait until the next clock tick before looking for
529b99e9b9SRobert Watsonnew work.
53a4be0b3cSRuslan Ermilov.It Va kern.sched.preemption
549b99e9b9SRobert WatsonThis read-only sysctl reports whether or not the kernel is configured to
559b99e9b9SRobert Watsonsupport preemption, which reduces the latency to run lower priority threads
569b99e9b9SRobert Watsonon wakeup.
579b99e9b9SRobert Watson.El
589b99e9b9SRobert Watson.Pp
599b99e9b9SRobert WatsonSome sysctls will be available only on systems supporting SMP.
609b99e9b9SRobert Watson.Sh SEE ALSO
619b99e9b9SRobert Watson.Xr sched_ule 4 ,
629b99e9b9SRobert Watson.Xr sysctl 8
639b99e9b9SRobert Watson.Sh HISTORY
649b99e9b9SRobert WatsonThe
659b99e9b9SRobert Watson.Nm
669b99e9b9SRobert Watsonscheduler has been present, in various forms, since the inception of
679b99e9b9SRobert Watson.Bx .
689b99e9b9SRobert Watson.Sh BUGS
699b99e9b9SRobert WatsonWhile a highly robust and time-tested scheduler,
709b99e9b9SRobert Watson.Nm
714953b2fbSJoel Dahllacks specific knowledge of how to schedule advantageously in non-symmetric
729b99e9b9SRobert Watsonprocessor configurations, such as hyper-threading.
73