130 likes | 146 Views
The OOD Process - IV. The Task Management Component (TMC) [Coad/Yourdon]. The OO Co-Design Process The Task Management Component. extend. HIC. TMC. PDC. DMC. high-level Design. Miniworld. refine & map. detailed Design. TMC - What is it?. Task: A stream of activity.
E N D
The OOD Process - IV The Task Management Component (TMC) [Coad/Yourdon]
The OO Co-DesignProcessThe Task Management Component extend HIC TMC PDC DMC high-level Design Miniworld refine & map detailed Design
TMC - What is it? • Task: A stream of activity. • Support in your OOD • multitasking • concurrency • priorities • transactions • set of activities as atomic action • role-back, commit, etc. • map your needs to the infrastructure • tool-specific solutions • guided by a common architecture
TMC tasks • check the type of task(s) you need • event-driven tasks • clock-driven tasks • etc. • check priorities • identify a coordinator • define each task object
TMC tasks - types: event-driven I • life-cycle • task sleeps • triggered upon event & arrival of data • data line • data buffer • read & format data • place in an internal buffer (send messages directly) • notify objects.services • check on proper sequence • handle errors
TMC tasks - types: event-driven II • might be programmed as a “distributed“ solution • scenario as in OOA • error handling • low dependency of involved activities (services) • if any of the above conditions does not hold • centralized task object • in IS world: “transaction handler” • also called “controller”
TMC tasks - types: clock-driven I • life-cycle • task sets a wake-time and sleeps • triggered by time • read & format data (if necessary) • notify objects.services • check on proper sequence (if necessary) • handle errors • set a new wake-time • go to sleep
TMC tasks - types: clock-driven II • might be programmed as a “distributed“ solution or • centralized task object • less usual than for event-driven • complements event-driven tasks • in principal equivalent
TMC tasks - check priorities • priorities help to manage resources • not easy to design and implement • use existing task managers and priority schemata • indicates need for a coordinator • identify and isolate critical tasks • stringent reliability constraints • critical to the success or failure of the system
TMC tasks - identify a coordinator • task of tasks manager • three or more tasks • priorities and interrupts • complex transactions • adds overhead • encapsulates task-management • only trigger services, do not implement them in the coordinator
TMC tasks - define task objects • name • description • priority • services included • sequence of call • error handling • coordinates by • trigger or time (interval) • communicates via • data comes where from, goes where to
Task Coordinator A Task-Object Pattern coordinate 1,m 1,1 task name description priority services_included coordinates_by communicates_via initialize start terminate
Keep tasks to a minimum. • Use existing solutions. • Think in Architectures!