2.9 Questions - Multitasking and Multithreading Concepts
Read the Introduction to Computer Data Processing and Processor Architecture document
Provide a detailed definition of the following Multitasking, Multiprogramming, or Time Sharing concepts.
Multitasking and Multiuser
Time-sharing is the sharing of a computing resource among many
users by means of multiprogramming and multi-tasking at the same
Multitasking is the ability of a computer to manage more than one
program, or task, in memory at the same time. However, only one task
can be executed at a time.
Multiprogramming is a rudimentary form of parallel processing in
which several programs are run at the same time on a uniprocessor.
Since there is only one processor, there can be no true simultaneous
execution of different programs.
At any given time, a processor (CPU) is executing in a specific context.
This context is made up of the contents of its registers and the memory
(including stack, data, and code) that it is addressing. When the
processor needs to switch to a different task, it must save its current
context (so it can later restore the context and continue execution
where it left off) and switch to the context of the new task.
Cooperative multitasking use of the processor is never taken from a
task; rather, a task must voluntarily yield control of the processor
before any other task can run. Programs running under a non-
preemptive operating system must be specially written to cooperate in
multitasking by yielding control of the processor at frequent intervals.