Presentation is loading. Please wait.

Presentation is loading. Please wait.

OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 1 R Thread Process X Thread Process ZProcess.

Similar presentations


Presentation on theme: "OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 1 R Thread Process X Thread Process ZProcess."— Presentation transcript:

1 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 1 R Thread Process X Thread Process ZProcess Y Inter-process communication Intra-process communication Intra-process communication Describe Concurrency

2 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 2 R Objectives: Describe Concurrency  Understand the purpose of Describe Concurrency and where in the lifecycle it is performed  Understand what a thread of control is for a system  Understand how classes and subsystems are mapped to identified processes  Model the concurrency requirements of the system in the Process View

3 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 3 R Architect Architectural Analysis Architectural Design Describe Concurrency Describe Distribution Review the Architecture Database Design Use-Case Analysis Subsystem Design Class Design Use-Case Design Review the Design Designer Database Designer Design Reviewer Architecture Reviewer So Where Are We?

4 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 4 R Describe Concurrency Overview Process Model Describe Concurrency Supplementary Specifications

5 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 5 R Describe Concurrency Topics  Concurrency Requirements  Modeling Processes  Mapping Processes onto the Implementation Environment  Distributing Model Elements Among Processes

6 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 6 R Process ViewDeployment View Logical View Use-Case View Implementation View End-user Functionality Programmers Software management Performance Scalability Throughput System integrators System topology Delivery, installation communication System engineering Analysts/Designers Structure Key Concepts: The Process View

7 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 7 R Describe Concurrency Topics  Concurrency Requirements  Modeling Processes  Mapping Processes onto the Implementation Environment  Distributing Model Elements Among Processes

8 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 8 R Concurrency Requirements  Concurrency requirements are driven by:  The degree to which the system must be distributed  The degree to which the system is event-driven  The computational intensity of key algorithms  The degree of parallel execution supported by the environment  Concurrency requirements are ranked in terms of importance to resolve conflicts

9 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 9 R Concurrency Approaches

10 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 10 R Example: Concurrency Requirements  In the Course Registration System, the requirements for concurrency come from the requirements and the architecture:  Multiple users must be able to perform their work concurrently  If a course offering becomes full while a student is building a schedule including that offering, the student must be notified.  Risk-based prototypes have found that the legacy registration system cannot meet our performance needs without some creative use of mid-tier processing power.

11 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 11 R Describe Concurrency Topics  Concurrency Requirements  Modeling Processes  Mapping Processes onto the Implementation Environment  Distributing Model Elements Among Processes

12 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 12 R Key Concepts: Process and Thread  Process  Heavyweight flow of control  Processes are stand-alone  May be divided into individual threads  Thread  Lightweight flow of control  Threads run in the context of an enclosing process

13 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 13 R Process Identification Considerations Separate threads of control may be needed to:  Take advantage of multiple CPUs and/or multiple nodes  Increase CPU utilization  Prioritize activities  Support load sharing  Separate concerns between different areas of the software  Improve system availability  Support major subsystems

14 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 14 R > Name > Component Name > can be > or > Process1.exe Modeling Processes  Processes may be modeled using  Active classes (Class Diagrams) and Objects (Interaction Diagrams)  Components (Component Diagrams)  Relationships > Name > Name

15 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 15 R Example: Modeling Processes: Class Diagram (stay tuned for composition) composition > CourseCatalogSystemAccess > CourseCache > CourseRegistrationProcess > OfferingCache dependency 1 1 1 1 > StudentApplication

16 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 16 R Example: Modeling Processes: Component Diagram > CourseCatalogSystemAccess > OfferingCache > CourseCache > CourseRegistrationProcess dependency > StudentApplication

17 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 17 R Describe Concurrency Topics  Concurrency Requirements  Modeling Processes  Mapping Processes onto the Implementation Environment  Distributing Model Elements Among Processes

18 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 18 R Mapping Processes onto the Implementation  Conceptual processes must be mapped onto specific implementation constructs  Process  Threads  Considerations  Process coupling  Performance requirements  System process and thread limits  Existing threads and processes  IPC resource availability

19 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 19 R Example: Mapping Processes to the Implementation CourseCatalogSystemAccess Remote (from java.rmi) CourseRegistrationProcess Runnable (from java.lang) OfferingCache Thread (from java.lang) 1 CourseCache 1 1 1

20 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 20 R Describe Concurrency Topics  Concurrency Requirements  Modeling Processes  Mapping Processes onto the Implementation Environment  Distributing Model Elements Among Processes

21 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 21 R Design Elements-to-Processes Considerations  Based on:  Performance and concurrency requirements  Distribution requirements and support for parallel execution  Redundancy and availability requirements  Class/subsystem characteristics to consider:  Autonomy  Subordination  Persistence  Distribution

22 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 22 R Design Elements-to-Processes Strategies Two Strategies (used simultaneously)  Inside-Out  Group elements that closely cooperate, and must execute in the same thread of control  Separate elements which do not interact  Repeat until minimum number of processes reached that still provides required distribution and effective resource utilization  Outside-In  Define a separate thread of control for each external stimuli  Define a separate server thread of control for each service  Reduce number of threads to what can be supported

23 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 23 R  Class diagrams  Active classes as processes  Composition relationships from processes to classes  Composition relationships from processes to subsystem interfaces Class Name Process Name > Interface Name Process Name > Process Name > Modeling the Mapping of Elements to Processes (stay tuned for Composition)

24 OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 24 R Example: Mapping Design Elements to Processes StudentApplication > MainStudentForm (from Student Interface) > 11 CourseRegistrationProcess > RegistrationController (from Registration) > 11 CourseCatalogSystemAccess > CourseCatalog (from CourseCatalog) > 11 CourseCache > 1 1 Course (from University Artifacts) >0..* 1 OfferingCache > 1 1 CourseOffering (from University Artifacts) > 0..* 1


Download ppt "OOAD Using the UML - Describe Concurrency, v 4.0 Copyright  1994-1998 Rational Software, all rights reserved 1 R Thread Process X Thread Process ZProcess."

Similar presentations


Ads by Google