Name: Shilpashree Srinivasamurthy Subject: ACS 560- Software Engineering Term: Fall 2010

advertisement
Name: Shilpashree Srinivasamurthy
Subject: ACS 560- Software Engineering
Term: Fall 2010
Chapter 14: Task Structuring
Textbook: Designing Concurrent, Distributed, and Real-Time Applications with
UML
This chapter explains about structuring the system into concurrent tasks and defining the
task interfaces which is known as task structuring.
A task is an active object also known as process or thread. The chapter talks about the
various categories of task structuring criteria namely I/O task structuring criteria, internal
task structuring criteria, task priority criteria, task clustering criteria and task merging
criteria and explains each of them in detail.
I/O Task Structuring Criteria: These criteria determine how device interface objects
are mapped to I/O tasks and when an I/O task is activated. An asynchronous I/O device
task is needed when there is an asynchronous I/O device to which the system has to
interface. An asynchronous I/O device interface task is constrained to execute at the
speed of the asynchronous I/O device with which it is interacting. A periodic I/O device
interface task deals with a passive I/O device, where the device is polled on a regular
basis. Passive I/O device interface tasks are used when dealing with passive I/O devices
that do not need periodic I/O device interface tasks. Resource monitor task is a special
passive I/O task. An input or output device that receives requests from multiple sources
have a resource monitor task that sequence the requests to maintain data integrity and
ensure that no data is corrupt or lost.
Internal Task Structuring Criteria: These criteria are used to determine how the
internal objects are mapped to internal tasks and when an internal task is activated. An
activity that needs to be executed periodically is known as periodic task. The activities
that need to be executed on demand are handled by asynchronous tasks. The task that
executes a sequential statechart is known as a control chart. The sequential set of
operations performed by the user with the system is handled using a user interface task.
Task Priority Criteria: These criteria take into account the priority considerations i.e.
the importance of executing a given task relative to others in task structuring. A timecritical task is a task that needs to meet hard deadline which needs to run on high priority.
A non-time-critical computationally intensive task is a task that runs as a low priority
background task that is preempted by high priority foreground tasks.
Task Clustering Criteria: These criteria are used to determine whether certain tasks,
determined during the first stage of task structuring, could be consolidated further to
reduce the overall number of tasks. If there is no sequential dependency between the
candidate tasks that are activated by the same event, the candidate tasks may be grouped
into the same task based on temporal clustering. When the task is activated, each
clustered activities is executed in turn. The sequentially dependent candidate tasks may
be grouped into a task based on the sequential clustering criterion. The control task
combined with other objects that execute actions triggered by or activities enabled by the
statechart is known as control clustering. Mutually exclusive clustering occurs when there
is a group of tasks, where because of constraints of the application, only one of the tasks
is eligible to be executed at any one time.
The next section describes the concept of design restructuring using task inversion
criteria which are used for merging tasks to reduce task overhead. With multiple-instance
task inversion, all identical tasks of the same type are replaced by one task that performs
the same service. In sequential task inversion the tasks are combined such that the
producer task calls an operation provided by the consumer task, rather than sending it a
message which is used where there is tightly coupled communication between two or
more tasks. In temporal task inversion two or more periodic tasks are combined into one
task.
The next section discuss about developing the task architecture in which the order of
applying the task structuring criteria to the analysis model is explained.
- The process starts with the structuring device interface objects that interact with
the outside world as device interface tasks
- This is followed by control tasks which are obtained by analyzing and structuring
each state-dependent control object.
- The internal periodic activities are analyzed and structured into periodic tasks.
- For each internal candidate task activated by an internal event, identify whether
any adjacent candidate tasks on the concurrent collaboration diagram may be
grouped into same task according to temporal, sequential or mutually exclusive
clustering criteria.
The concept of task communication and synchronization is explained in the next section
of the chapter. When the producer sends a message to the consumer and continues
without waiting for a response, then the communication is referred as asynchronous
message communication or loosely coupled message communication. In tightly coupled
(synchronous) message communication with reply the producer sends a message to the
consumer and then waits for a reply. When the message arrives, the consumer accepts the
message, processes it, generates a reply and sends the reply. The producer and the
consumer then both continue. With tightly coupled (synchronous) message
communication without reply, the producer sends a message to the consumer and then
waits for acceptance of the message by the consumer. When the massage arrives, the
consumer accepts the message thereby releasing the producer and both producer and
consumer will continue. There are three types of event synchronization namely an
external event which is an event from an external entity, a timer event which is the
periodic activation of task, and an internal event which is the internal synchronization
between a source task and a destination task.
The chapter finally explains about the task behavior specifications (TBS) which describes
a concurrent task’s interface, structure, timing characteristics, relative priority, event
sequencing logic and errors detected. A TBS is introduced with the task architecture to
specify the characteristics of each task. The concept of TBS is explained in this chapter
with the example of Bank Server Task.
Download