Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sched_4bsd(9) [netbsd man page]

SCHED_4BSD(9)						   BSD Kernel Developer's Manual					     SCHED_4BSD(9)

NAME
sched_4bsd -- The 4.4BSD thread scheduler SYNOPSIS
#include <sys/sched.h> void resetpriority(lwp_t *l); void sched_tick(struct cpu_info *ci); void sched_schedclock(lwp_t *l); void sched_pstats_hook(struct proc *p, int minslp); void sched_setrunnable(lwp_t *l); void updatepri(lwp_t *l); DESCRIPTION
The traditional 4.4BSD scheduler employs a ``multilevel feedback queues'' algorithm, favouring interactive, short-running threads to CPU- bound ones. resetpriority() recomputes the priority of a thread running in user mode. If the resulting priority is higher than that of the current thread, a reschedule is arranged. sched_tick() gets called from hardclock(9) every 100ms to force a switch between equal priority threads. The priority of the current thread is adjusted through sched_schedclock(). The priority of a thread gets worse as it accumulates CPU time. sched_pstats_hook() gets called from sched_pstats() every Hz ticks in order to recompute the priorities of all threads. sched_setrunnable() checks if an LWP has slept for more than one second. If so, its priority is updated by updatepri(). CODE REFERENCES
The 4.4BSD scheduler subsystem is implemented within the file sys/kern/sched_4bsd.c. SEE ALSO
csf(9), hardclock(9), mi_switch(9), sched_m2(9), userret(9) Marshall Kirk McKusick, Keith Bostic, Michael J. Karels, and John S. Quarterman, The Design and Implementation of the 4.4BSD Operating System, Addison Wesley, 1996. BSD
July 14, 2007 BSD

Check Out this Related Man Page

SCHED_4BSD(4)						   BSD Kernel Interfaces Manual 					     SCHED_4BSD(4)

NAME
sched_4bsd -- 4.4BSD scheduler SYNOPSIS
options SCHED_4BSD DESCRIPTION
The sched_4bsd scheduler is the traditional system scheduler, providing both high throughput and solid interactive response in the presence of load. The following sysctls are relevant to the operation of sched_4bsd: kern.sched.name This read-only sysctl reports the name of the active scheduler. kern.sched.quantum This read-write sysctl reports or sets the length of the quantum (in micro-seconds) granted to a thread. kern.sched.ipiwakeup.enabled This read-write sysctl sets whether or not the scheduler will generate an inter-processor interrupt (IPI) to an idle CPU when a thread is woken up. Otherwise, idle CPUs will wait until the next clock tick before looking for new work. kern.sched.preemption This read-only sysctl reports whether or not the kernel is configured to support preemption, which reduces the latency to run lower priority threads on wakeup. Some sysctls will be available only on systems supporting SMP. SEE ALSO
sched_ule(4), sysctl(8) HISTORY
The sched_4bsd scheduler has been present, in various forms, since the inception of BSD. BUGS
While a highly robust and time-tested scheduler, sched_4bsd lacks specific knowledge of how to schedule advantageously in non-symmetric pro- cessor configurations, such as hyper-threading. BSD
January 21, 2008 BSD
Man Page