Home

timeslicing

Timeslicing, also known as time slicing, is a CPU scheduling technique in which the available processing time is divided into small, fixed-length intervals called time slices or quanta. The operating system’s scheduler allocates each ready process a slice in turn. When a process uses up its slice, a context switch occurs and the CPU is given to the next process, enabling multiple tasks to share CPU time.

This preemptive multitasking approach aims to improve responsiveness in interactive and multi-user systems by preventing any

Implementation typically relies on a timer interrupt to enforce preemption. The system maintains a ready queue

History and scope: timeslicing emerged with early time-sharing and multi-user systems in the 1960s and 1970s

single
process
from
monopolizing
the
processor.
The
length
of
the
time
slice,
or
quantum,
is
a
key
parameter:
short
quanta
improve
system
responsiveness
and
UI
feel
but
increase
the
overhead
from
more
frequent
context
switches;
longer
quanta
reduce
switching
overhead
but
can
lead
to
longer
wait
times
for
other
tasks
and
decreased
interactivity.
of
processes
and
selects
the
next
candidate
according
to
a
scheduling
policy,
commonly
round-robin
or
a
priority-based
scheme
with
per-task
quanta.
Some
systems
employ
aging
to
prevent
starvation,
gradually
increasing
a
waiting
task’s
priority.
In
real-time
environments,
time
slicing
may
be
minimized
or
disabled
for
high-priority
tasks
to
meet
timing
requirements.
and
remains
a
foundational
concept
in
operating
system
design.
Modern
general-purpose
schedulers
often
use
more
sophisticated
policies,
but
the
basic
idea
of
dividing
CPU
time
into
slices
to
share
compute
resources
continues
to
influence
contemporary
scheduling
strategies
in
desktops,
servers,
and
embedded
systems.