slovo | definícia |
multitasking (encz) | multitasking,běh více úloh Zdeněk Brož |
multitasking (foldoc) | multitasking
concurrency
concurrent processing
multiprogramming
process scheduling
(Or "multi-tasking", "multiprogramming",
"concurrent processing", "concurrency", "process scheduling")
A technique used in an operating system for sharing a single
processor between several independent jobs. The first
multitasking operating systems were designed in the early
1960s.
Under "cooperative multitasking" the running task decides
when to give up the CPU and under "pre-emptive multitasking"
(probably more common) a system process called the
"scheduler" suspends the currently running task after it has
run for a fixed period known as a "time-slice". In both
cases the scheduler is responsible for selecting the next task
to run and (re)starting it.
The running task may relinquish control voluntarily even in a
pre-emptive system if it is waiting for some external event.
In either system a task may be suspended prematurely if a
hardware interrupt occurs, especially if a higher priority
task was waiting for this event and has therefore become
runnable.
The scheduling algorithm used by the scheduler determines
which task will run next. Some common examples are
round-robin scheduling, priority scheduling, {shortest job
first} and guaranteed scheduling.
Multitasking introduces overheads because the processor
spends some time in choosing the next job to run and in saving
and restoring tasks' state, but it reduces the worst-case time
from job submission to completion compared with a simple
batch system where each job must finish before the next one
starts. Multitasking also means that while one task is
waiting for some external event, the CPU to do useful work
on other tasks.
A multitasking operating system should provide some degree of
protection of one task from another to prevent tasks from
interacting in unexpected ways such as accidentally modifying
the contents of each other's memory areas.
The jobs in a multitasking system may belong to one or many
users. This is distinct from parallel processing where one
user runs several tasks on several processors. Time-sharing
is almost synonymous but implies that there is more than one
user.
Multithreading is a kind of multitasking with low
overheads and no protection of tasks from each other, all
threads share the same memory.
(1998-04-24)
|
| podobné slovo | definícia |
cooperative multitasking (foldoc) | cooperative multitasking
A form of multitasking where it
is the responsibility of the currently running task to give up
the processor to allow other tasks to run. This contrasts
with pre-emptive multitasking where the task scheduler
periodically suspends the running task and restarts another.
Cooperative multitasking requires the programmer to place
calls at suitable points in his code to allow his task to be
descheduled which is not always easy if there is no obvious
top-level main loop or some routines run for a long time.
If a task does not allow itself to be descheduled all other
tasks on the system will appear to "freeze" and will not
respond to user action.
The advantage of cooperative multitasking is that the
programmer knows where the program will be descheduled and can
make sure that this will not cause unwanted interaction with
other processes. Under pre-emptive multitasking, the
scheduler must ensure that sufficient state for each process
is saved and restored that they will not interfere. Thus
cooperative multitasking can have lower overheads than
pre-emptive multitasking because of the greater control it
offers over when a task may be descheduled.
Cooperative multitasking is used in RISC OS, {Microsoft
Windows} and Macintosh System 7.
(1995-03-20)
|
pre-emptive multitasking (foldoc) | pre-emptive multitasking
A type of multitasking where
the scheduler can interrupt and suspend ("swap out") the
currently running task in order to start or continue running
("swap in") another task. The tasks under pre-emptive
multitasking can be written as though they were the only task
and the scheduler decides when to swap them. The scheduler
must ensure that when swapping tasks, sufficient state is
saved and restored that tasks do not interfere.
The length of time for which a process runs is known as its
"time slice" and may depend on the task's priority or its
use of resources such as memory and I/O.
OS/2, Unix and the Amiga use pre-emptive multitasking.
This contrasts with cooperative multitasking where each task
must include calls to allow it to be descheduled
periodically.
(1995-03-20)
|
|