Information Technology Reference
In-Depth Information
TABLE 3.3
Task Management Design Options and Comparison
Purpose
Advantages
Disadvantages
Efficiency
Implementation
Ta s k S t a t e s
Organizes tasks for the
operating system
The operating system
is aware of the state
of each task so they
can be scheduled
appropriately
Requires additional
complexity on the
operating system
Improves efficiency
because the
operating system
only schedules tasks
that are ready to run
Adds complexity in the
operating system
because it must assign,
read, and keep track of
task states
Reentrancy
Allows tasks to be
reexecuted
concurrently
Allows reuse of
existing code
Each instance of the
task or process
requires its own data
structure and
run-time stack
The code is more
efficient, because it
can be used multiple
times
Adds complexity to the
operating system and
application
Context Switching
Provides a method of
saving of data from
the current task so a
new task can be
executed
Allows for preemption
in a multitasking
environment
Takes time to switch
between tasks
Can improve overall
efficiency by
allowing higher
priority tasks to run
first, but takes time
to switch in and out
of task-specific data
Is complex to implement
in operating system; the
operating system must
support multitasking,
preemption, and
provide a method to
save and retrieve data
TCB (Task
Control Block)
Saves data specific to
task, such as
registers and
program counter
Keeps all data specific
to a tasks together in
a structure
A predetermined size
of memory must be
set aside for each
task
Can improve efficiency
because all task data
are kept together
The operating system
must include data
structures for tasks
 
Search WWH ::




Custom Search