o3s1
-
Upload
vidhyabineesh -
Category
Documents
-
view
220 -
download
0
Transcript of o3s1
-
8/8/2019 o3s1
1/151
ObjectObject--OrientedOrientedModeling and DesignModeling and Design
-
8/8/2019 o3s1
2/151
understanding problems
communicating with application experts
modeling enterprises
preparing documentation
Object-Oriented models are useful for :
-
8/8/2019 o3s1
3/151
Emphasis is on doing things (algorithms)Large programs are divided into smaller programs
(functions)
Most of the functions share global data
Data move openly around the system from fn.. to fnFunctions transforms data from one form to
anotherEmploys top-down approach in program design
What is Procedure-OrientedProgramming ?
-
8/8/2019 o3s1
4/151
Relationship of data and functionsin Procedural Programming
-
8/8/2019 o3s1
5/151
What is Object-Oriented Programming ?
Emphasis is on data rather than procedurePrograms are divided into Objects
(Abstracted into classes)
Data is encapsulated in the objects
Objects communicate with each other
through functions
Follows bottom-up approach in program
design.
-
8/8/2019 o3s1
6/151
What is Object-Oriented Programming ?
-
8/8/2019 o3s1
7/151
Characteristics of Object-Oriented Model
Abstraction
Encapsulation
PolymorphismInheritance
-
8/8/2019 o3s1
8/151
Abstraction
Focus is an what an Object is and does
before deciding how it should be implemented.
Use of abstraction preserves the freedom
to make decisions as long as possible byavoiding premature commitments to details.
-
8/8/2019 o3s1
9/151
Encapsulation
Separates the external aspects of an object,which are accessible to other objects, from
the internal
implementation details of the object.
Prevents a program from becoming so
inter-dependent that a small change has
massive ripple effects.
-
8/8/2019 o3s1
10/151
Polymorphism
The same operation may behave
differently on different classes.
An operation is an action or transformation
that an object performs or is subject to.
Example : 'move' operation may behavedifferently on the Window andChess Piece Classes.
-
8/8/2019 o3s1
11/151
Inheritance
Is the sharing of attributes and operations
among classes based on a hierarchicalrelationship.
The properties of a Superclass need not
be repeated in the subclass.Example : Scrolling Window and
Fixed Window are subclasses ofSuperclass Window.
-
8/8/2019 o3s1
12/151
OBJECT MODELINGCONCEPTS
-
8/8/2019 o3s1
13/151
An Object Model
captures the static structure of the system
shows the objects, the relationship
between them,
and
the attributes and operations thatcharacterize each class of objects.
-
8/8/2019 o3s1
14/151
Objects
is a concept, abstraction, or thing with crisp
boundaries and meaning for an application.Purpose
promotes understanding of the real
world provides a practical basis for computer
information.Objects have identity and are
distinguishable.Example : Two apples with the same color,
shape and texture are still individual entities.
-
8/8/2019 o3s1
15/151
Classes
It describes a group of objects, with common
attributes, operations and semantics.Example : Fruit is a class.
Objects in a class have the same attributes
and behaviour patterns.A object's class is an implicit propertyof the object.
-
8/8/2019 o3s1
16/151
-
8/8/2019 o3s1
17/151
OBJECT DIAGRAMS
OMT symbol for a class in a box.
CLASS Person
-
8/8/2019 o3s1
18/151
ATTRIBUTES
is a property of the objects in a class
is a data value held by the objects in a class
different Object instances may have the sameor different values for a given attribute.
-
8/8/2019 o3s1
19/151
ATTRIBUTES
Each attribute name is unique within a class.
An attribute should be a pure data value, not anobject.
-
8/8/2019 o3s1
20/151
OPERATIONS
An operation is a function or transformation that
may be applied to or by objects in a class. Same operations may apply to many differentclasses (Polymorphic Operation).
-
8/8/2019 o3s1
21/151
Methods
is the implementation of an operation for a class.
Example : Operation 'Print' in class 'File'
can be implemented for printing ASCII
files, printing binary files are for printingdigitized picture files.
-
8/8/2019 o3s1
22/151
Links and Associations
A link is a physical or conceptual connectionobject instances i.e. represents the relationship
between them.
Example : Joe Smith works for Simplex Company
-
8/8/2019 o3s1
23/151
Links and Associations
An association describes a group of links with
common structure and common semantics.
Example : A persons works for a company.
Association and links often appear as verbs in theproblem statement.
-
8/8/2019 o3s1
24/151
Representation ofLinks / Associations
Associations may be binary, ternary or higher order.
-
8/8/2019 o3s1
25/151
Representation ofLinks / Associations
used to represent ternary and n-ary association.
-
8/8/2019 o3s1
26/151
Multiplicity of an Associations
Specifies how many instances of one classmay to a single instance of an associated class.
Usually described as "one" or "many".
-
8/8/2019 o3s1
27/151
Multiplicity of an Associations
In OMT notation,
* Solid Ball => "many" meaning zero
or more
* Hollow ball => "optional" meaning
zero or one* A line without balls => one-to-one association.
-
8/8/2019 o3s1
28/151
Multiplicity of an Associations
-
8/8/2019 o3s1
29/151
Link and Association Concepts
LinkAttribute is a property of the links in an
association.In OMT notation, it is represented by abox attached to the association by a loop.
-
8/8/2019 o3s1
30/151
Link and Association Concepts
Role Names
* Role is one end of an association.
* Role name is a name that uniquely
identifies one end of an association.
-
8/8/2019 o3s1
31/151
Qualified Association
Qualifier is a special attribute that reduces the
effective multiplicity of an association.
This reduces the effective multiplicity of thisassociation from one-to-many to one-to-one.
-
8/8/2019 o3s1
32/151
Generalization
* Is the relationship between a class and one
or more refined versions of it. The class being refined is called the Super Class.
Each refined version is called the Sub Class.
Is also called the "is-a" relationship.
In OMT notation, generalization is represented by atriangle connection a superclass to its subclass.
-
8/8/2019 o3s1
33/151
Generalization
-
8/8/2019 o3s1
34/151
Inheritance
Each subclass is said to inherit the
features of its superclass.
-
8/8/2019 o3s1
35/151
Inheritance
Each subclass not only inherits all the features
of its ancestors but adds its own specific
attributes and operations as well.
-
8/8/2019 o3s1
36/151
-
8/8/2019 o3s1
37/151
Multiple Inheritance
A class may have more than one superclass
and inherits features from all panels
Such a class is called a "Join Class".
-
8/8/2019 o3s1
38/151
Multiple Inheritance
Example:
-
8/8/2019 o3s1
39/151
Generalization as Extension and Restriction
Extension : When a subclass adds new
features.
-
8/8/2019 o3s1
40/151
Generalization as Extension and Restriction
Restriction : When a Subclass constrainsthe ancestor attributes.
Example:
-
8/8/2019 o3s1
41/151
Generalization, Inheritance andSpecialization
Generalization is the relationship among
classes.
Inheritance is the mechanism of sharingattributes and operations using the
generalization relationship.
Generalization and Inheritance:
-
8/8/2019 o3s1
42/151
-
8/8/2019 o3s1
43/151
Aggregation:
Is the "part-whole" or "a-part-of" relationship
Objects representing the components are
associated with an object representing the entire
assembly.
Aggregation is a special form of association.
-
8/8/2019 o3s1
44/151
Aggregation:
In OMT notation, aggregation is represented by a
small diamond at the assembly end of the
relationship.
Example:
-
8/8/2019 o3s1
45/151
Aggregation Versus Generalization
Aggregation relates instances
two distinct parts are involved, one is a part of
the other.
Generalization relates classes
Subclass inherits the properties of the
Superclass.
-
8/8/2019 o3s1
46/151
Aggregation Versus Generalization
Aggregation and Generalization
-
8/8/2019 o3s1
47/151
ABSTRACT CLASSES
An abstract class is a class that has no direct
instances but whose descendent classes have direct
instances.
-
8/8/2019 o3s1
48/151
CONCRETE CLASSES
A Concrete class is a class that is instantiable.Example:
-
8/8/2019 o3s1
49/151
-
8/8/2019 o3s1
50/151
META DATA
In RDBMS, a data table may store information
such as capital of India is New Delhi.
Capital of Japan is Tokyo. And so on .
A meta table will store the fact that acountry has a Capital City.
-
8/8/2019 o3s1
51/151
Homomorphisms
Is the mapping between two associations.
A frequent usage is the mapping between
a descriptor and a part tree
-
8/8/2019 o3s1
52/151
Homomorphisms Contd..
Homomorphisms mostly occur for complex
applications that deal with meta data
It is an special type of relationship between
relationships.
-
8/8/2019 o3s1
53/151
Dynamic Modeling
examines changes to the objects
and their relationships overtime.
represents control information : The sequence of
events, states and operations that occur within
a system of objects.
describes the sequences of operations that occur in
response to external stimuli.
represents the control structure of a system.
-
8/8/2019 o3s1
54/151
Events and States
State is the attribute values and links held by an object
An event results in a series of changes to the
object states.
The pattern of events, states and state
transitions for a given class can be abstracted
and represented as a state diagram.
-
8/8/2019 o3s1
55/151
-
8/8/2019 o3s1
56/151
Events Contd..
Example:
airplane flight departs
mouse button pushed
input string entered
phone receiver lifted
-
8/8/2019 o3s1
57/151
Scenarios
Scenario is a sequence of events that
occurs during one particular execution
of a system.
Scenario can be the historical record of executing
a system.
Scenario can be a thought experiment of
executing a proposed system.
-
8/8/2019 o3s1
58/151
Scenarios Contd..
Example : Scenario for making a telephone call.
caller lifts receiverdial tone begins
caller dials digits
called phone begins ringing
called party picks up the receiverphones are connected
caller hangs upphones are disconnected.
-
8/8/2019 o3s1
59/151
Events and Traces:
Event trace is the representation of the sequence
of events and the objects exchanging events as an
augmented scenario.
Sender and Receiver objects of each event is
identified
Object is represented as a vertical line and eachevent as a horizontal arrow from the sender to the
receiver object.
Sequence of events is important.
-
8/8/2019 o3s1
60/151
Events and Traces:Contd..
Event Trace Fora Phone Call
-
8/8/2019 o3s1
61/151
State:
Is an abstraction of the attribute values and
links of an object.
A state specifies the response of the object to
input events.
The response of an object to an event may include
an action or a change of state by the objects.
Example : After the receiver is lifted and before the first
digit is dialed, the phone line is in state Dial
tone.
-
8/8/2019 o3s1
62/151
State Diagrams
It relates events and states
It is a graph whose nodes are statesand whose directed arcs are transitions
labelled by event names.
Describes the behaviour of a single
class of objects
Example : State diagram for phone line
Figure 5.5 Page 90 (R
ambaugh)
-
8/8/2019 o3s1
63/151
Relationship between Object and Dynamic
Models
The dynamic model structure is related
to and constrained by Object model structure.
A sub-state refines the attribute and link
values that the object can have.
The dynamic model specifies allowable
sequences of changes to objects from the
object model.
-
8/8/2019 o3s1
64/151
Relationship between Object and Dynamic
Models
The dynamic model structure is related
to and constrained by Object model structure.
A sub-state refines the attribute and link
values that the object can have.
The dynamic model specifies allowable
sequences of changes to objects from the
object model.
-
8/8/2019 o3s1
65/151
Functional Modeling
Describes computations within a system.
It shows how output values in a computation are
derived from input values, without regard for the
order in which the values are computed.
Consists of multiple DFD's, which show the flow of
values from external inputs, through operations
and internal data stores, to external outputs.
-
8/8/2019 o3s1
66/151
Data Flow Diagrams (DFD's)
Shows the functional relationships of values
computed by a system, including input values and
output values and internal data stores.
A data flow diagram is a graph showing the flow
of data values from their sources in objects
through processes that transform them to
their destinations in other objects.
It does not show central information.
-
8/8/2019 o3s1
67/151
DFD's Contd..
A DFD contains
processes, that transform data
data flows, that move data
actor objects, that produce and consume data
data store objects that store data passively.
-
8/8/2019 o3s1
68/151
Processes
A process transforms data values.
The final model only indicates the possible
functional paths, it does not show which path will
actually occur.
-
8/8/2019 o3s1
69/151
Processes
The results of such a process depends on the
behaviour of the system, as specified by the
dynamic model.
Process may or may not have side effects on the
non-functional components such as data stores and
external objects.
-
8/8/2019 o3s1
70/151
Processes Contd..
Representation in DFD is as an ellipse, containing
a description of the transformation.
Each process has a fixed number of input and
output data arrows.
Input and Outputs are labeled.
-
8/8/2019 o3s1
71/151
Processes Contd..
Example:
-
8/8/2019 o3s1
72/151
Data Flows
A data flow connects the output of an object or
process to the input of another object or process.
It represents an intermediate data value within a
computation.
The value is not changed by the data flow.
-
8/8/2019 o3s1
73/151
Data Flows Contd..
Representation in DFD's is by an arrow between
the procedure and consumer of the data value.
The arrow is labeled with a description of the
data.
The same value can be sent to several objects,
this is indicated by a fork.
Output arrows if not split into its components,
may be unlabeled.
-
8/8/2019 o3s1
74/151
Data Flows Contd..
Example:
-
8/8/2019 o3s1
75/151
Actors
An actor is an active object that drives the data
flow graph by producing or consuming values.
Actors are attached to the inputs and outputs of a
data flow graph.
Actors act as sources and sinks of data, so also
called as terminators.
Actors lie on the boundary of the data flow graph
but terminate the flow of data.
-
8/8/2019 o3s1
76/151
Actors Contd..
Representation in DFD's is by a rectangle
Arrows between the actor and the diagram are
inputs and outputs of the diagram.
Actions of actors are a part of the Dynamic Model.
-
8/8/2019 o3s1
77/151
-
8/8/2019 o3s1
78/151
Actors Contd..
Example:
-
8/8/2019 o3s1
79/151
Data Stores
A data store is a passive object within a data
flow diagram, that stores data for later access.
A data store does not generate any operations on
its own but merely responds to requests to store
and access data.
-
8/8/2019 o3s1
80/151
Data Stores Contd..
A data store allows values to be accessed in a
different order, than they are generated.
Aggregate data stores, such as lists and labels,
provide access of data by insertion order or index
keys.
Representation of a data store is by a pair of
parallel lines containing the name of the store.
-
8/8/2019 o3s1
81/151
Data Stores Contd..
Input arrows indicate information or operations
that modify the stored data (like adding,
modifying, deleting elements)
Output arrows indicate information retrieved from
the data store the data store
-
8/8/2019 o3s1
82/151
Data Stores Contd..
Example:
-
8/8/2019 o3s1
83/151
Relationship between Object, Dynamic and
Functional Models
Functional model shows what "has to be done" by a
system
Object model shows the "doer" - the objects of the
system.
Dynamic model shows the sequence in which theoperations are performed.
Processes in the final model shows objects that
are related by functions.
-
8/8/2019 o3s1
84/151
Relative to the Functional Model
The Object Model shows the structure of the
actors, data stores, and flows in the functionalmodel.
The Dynamic Model shows the sequence in
which processes are performed.
-
8/8/2019 o3s1
85/151
Relative to the Object Model
The final model shows the operations in the
classes and the arguments of each operation.
The Dynamic Model shows the states of each
object and the operations that are performed
as it receives events and changes state.
-
8/8/2019 o3s1
86/151
Relative to Dynamic Model
The final Model shows the definitions of the leaf
actions and activities that are undefined with thedynamic model.
The Object Model shows what changes state
and undergoes operations.
-
8/8/2019 o3s1
87/151
OBJECT ORIENTED ANALYSIS (OOA)
Stages in OOA
Problem / Requirement is stated
Problem / Requirement is understood
Essential features are abstracted
into an analysis model (Object,Dynamic
and functional Models)
-
8/8/2019 o3s1
88/151
OOA Contd..
Iterate the analysis, refine the analysis model
and Restate the requirements if required.
-
8/8/2019 o3s1
89/151
Goal of OOA
Is to fully specify the problem and application
domain without introducing a bias to any particular
implementation.
-
8/8/2019 o3s1
90/151
Goal of OOA Contd..
-
8/8/2019 o3s1
91/151
Problem orRequirements Statements
Problem scope
What is needed
Application context
Assumptions
Performance needs
-
8/8/2019 o3s1
92/151
Problem orRequirements Statements
Contd..
The analyst must work with the requestto refine the requirements, so they
represent the requestor's true intent.
Page 151 include Fig. 8.3 + explanation of paragraph.
-
8/8/2019 o3s1
93/151
Object Modeling
Object Model shows the static data structure of
the real-world system, as object classes and
relationship between classes.
-
8/8/2019 o3s1
94/151
Object Modeling Contd..
Information for the Object Model comes from
the problem statement
the expert knowledge of the application
domain, and
the general knowledge of the real world.
-
8/8/2019 o3s1
95/151
Steps for construction of an Object Model
Identify all possible Objects and classes
Eliminate Redundant classes
Eliminate irrelevant classes
Eliminate operations that are applied toobjects
Eliminate Implmentation Constructs.
1. Identify Objects and Classes
-
8/8/2019 o3s1
96/151
ATM ExampleATM classes identified from knowledge of
problem domain :
-
8/8/2019 o3s1
97/151
iminating unnecessary Classes.BAD CLASSES
-
8/8/2019 o3s1
98/151
Good Classes
-
8/8/2019 o3s1
99/151
2. Preparing a Data DictionaryWrite a paragraph precisely describing
each object class
Describe the scope of the class withinthe current problem
Mention any assumptions or restrictions
on its membership or use
Briefly describe associations, attributes
and operations
-
8/8/2019 o3s1
100/151
3. Identifying AssociationsIdentify all possible associations between the
classes.
Eliminate associations between eliminated classes.
Eliminate Irrelevant orImplementation associations
EliminateActions that describe a transient event.
Convert Ternary associations into Binaryassociations (But without loss of information)
Eliminate Derived associations.
-
8/8/2019 o3s1
101/151
ATM Example
Some possible Associations from ATM
problem Statement
Banking network includes Cashiers and ATMsConsortium shares ATMs
Cashier enters transaction for account
Bank provides Bank Computer
Bank owns Cashier station
-
8/8/2019 o3s1
102/151
ATM Example Contd..
ATMs communicate with Central Computer
about transaction
Central Computer clear transaction with bank
ATM accepts Cash Card
ATM interact with user
ATM dispenses Cash
-
8/8/2019 o3s1
103/151
ATM Example Contd..
ATM prints receipts
System handles concurrent access
Consortium consists of banks
Bank holds account
Consortium owns Central Computer
-
8/8/2019 o3s1
104/151
-
8/8/2019 o3s1
105/151
-
8/8/2019 o3s1
106/151
4. Identifying Object Attributes
should describe the properties of
individual objects
Identify link attributes too.
Eliminate unnecessary and incorrectattributes.
-
8/8/2019 o3s1
107/151
ATM ExampleSome classes in ATM object model with attributes
-
8/8/2019 o3s1
108/151
-
8/8/2019 o3s1
109/151
ATM Example
-
8/8/2019 o3s1
110/151
6. Grouping Classes into Modules
Group classes into sheets and modules
T
ightly coupled classes should be groupedtogether
Diagrams may be divided into sheets of uniform
size for convenience in drawing, printing and
viewing...
ATM example for grouping classes into
Modules.
-
8/8/2019 o3s1
111/151
6. Grouping Classes into Modules Contd..
Possible Modules :
Tellers - Cashier, entry station, Cashier Station, ATM
Account - account, Cash Card, Customer, Cashier,
Transaction
Banks - Consortium, Bank.
-
8/8/2019 o3s1
112/151
Dynamic Modeling
It shows the time-dependent behaviour of the
system and objects
This model is important for interactive systems
only.
Look for externally visible stimuli and responses.
Summarize permissible event sequences for
each object with a state diagram.
-
8/8/2019 o3s1
113/151
Steps for construction of an Dynamic Model1. Preparation of a Scenario
Scenarios show the major interactions, externaldisplay formats and information exchanges
Scenario is a sequence of events
Event occurs whenever information is exchanged
between an object in the system and an outside
agent, such as a user, a sensor or another task.
-
8/8/2019 o3s1
114/151
Contd..ATM Example : Possible Scenario
The ATM asks the user to insert a Card
The user inserts a CashCard.
The ATM accepts the Card and reads serial number
The ATM requests the password
The user enters the 'password
The ATM verifies the serial number and password
with the consortium and so on .........
-
8/8/2019 o3s1
115/151
2. Identifying Events betwwn Objects
Events include all signals, inputs, decisions,
interrupts, transitions and action to or from useror external devices.
Show each scenario as a event-trace or event-flow
diagram.
-
8/8/2019 o3s1
116/151
Contd..
ATM Example:
"Enter Password" is an event sent from
external agent User to application object ATM.
-
8/8/2019 o3s1
117/151
3. Prepare a State Diagram
for each Object class with retrieval
dynamic behaviour
showing the events the objects receives and sends
Early scenario or event trace corresponds to apath through the state diagram.
-
8/8/2019 o3s1
118/151
ATM Example :
-
8/8/2019 o3s1
119/151
4. Matching Events between Objects
Check for completeness and consistency at
the system level
Every event should have a sender and a receiver
-
8/8/2019 o3s1
120/151
4.Matching Events between Objects Contd..
ATM Example:
An "account" can potentially be accessed
concurrently by more than one machine.
Access to account needs to be controlled
to ensure that only one update at a timeis applied.
-
8/8/2019 o3s1
121/151
Steps for Construction of Functional Model
1. Identify Input and Output Values
List all the input and output values.
It is the interaction between the system and the
outside world.
-
8/8/2019 o3s1
122/151
Contd..
-
8/8/2019 o3s1
123/151
2. Building Data Flow Diagrams
Show how each output value is computed from
input values.
Construct the DFD's in layers.
DFD's specify only dependencies amongoperations.
-
8/8/2019 o3s1
124/151
-
8/8/2019 o3s1
125/151
3. Describng Functions
Refine the DFD's
Describe each function
What it does
Not flow to implement it
Description can be declarative or procedural.
-
8/8/2019 o3s1
126/151
ATM Example
Update-account-function ()
If amount on withdrawal > the current account balance
reject transaction.
If amount on withdrawal < the current account balance
debit the account and dispence the
amount request and so on ......
-
8/8/2019 o3s1
127/151
4. Identify Constraints between Objects
Constraints are functional dependencies
between objects that are not related by an
input-output dependency.
Constraints can be on two objects at
the same time.
or between instances of the same
object and different times
-
8/8/2019 o3s1
128/151
4. Identify Constraints between Objects
or between instances of different objects and
different hours.
Constraints are the preconditions on the
functions.
ATM Example:
A possible constraint
'No account balance may ever be negative'
-
8/8/2019 o3s1
129/151
5. Specifying Optimization Criteria
Specify values to be maximized, minimized or
optimized
In case of conflict, indicate the trade-off.
-
8/8/2019 o3s1
130/151
5. Specifying Optimization CriteriaATM Example:
Possible Optimization Criteria
Minimize the number of physical messages
sent between different sites.
Minimize the time an account is locked for
concurrency reason.
-
8/8/2019 o3s1
131/151
Final Stage :
Refine the analysis model
Restate the Requirements if required.
Verify the analysis model.
Final verified analysis model serves as the basisfor system architecture, design and
implementation.
-
8/8/2019 o3s1
132/151
Summary
Purpose of OOA is to state and understand the
problem and application domain, so that a correct
design can be constructed
A good analysis captures the essential features of
the problem without introducing implementation
artifacts.
-
8/8/2019 o3s1
133/151
SYSTEM DESIGN
During analysis, the focus is on what is to be
done, independent of how it is done. During design,
decisions are made about how the problem will be
solved, first at high level, then at increasingly
detailed levels.
-
8/8/2019 o3s1
134/151
SYSTEM DESIGN
System Design is the high level strategy for
solving the problem and building a solution.
The overall organization of a system into
components is called the System Architecture.
-
8/8/2019 o3s1
135/151
SYSTEM DESIGN
The system designee must make the following
decisions :
Organise the system into sub-systems
Identify concurrency inherent in the problem
Allocate sub-system to processor and tasks
Choose an approach for management of
data stores
-
8/8/2019 o3s1
136/151
SYSTEM DESIGN
The system designee must make the following
decisions : Contd..
Handle access to global resources
Choose the implementation of control in software
Handle boundary conditions
Set trade off priorities
-
8/8/2019 o3s1
137/151
Contd..
There are a number of architectural styles suitable
for various applications. They differ in placing
emphasis on the three models - Object, Dynamic and
Functional.
-
8/8/2019 o3s1
138/151
Breaking System into sub-systems
The first step in system design is to divide the system
into a small number of components called subsystem.
A subsystem is not an object nor a function but a
package of classes, associations, operations, events
and constraints that are inter-related and that have
a reasonably well-defined and small interface withother systems. It defines a coherent way of looking at
one aspect of the problem.
-
8/8/2019 o3s1
139/151
-
8/8/2019 o3s1
140/151
Breaking System into sub-systems
Subsystem can be identified by the services it
provide. A service is a group of related functions
that share some common purpose.
Each subsystem should have well-defined interface
to the rest of the system.
S
ubsystem should be defined so that mostinteractions are within subsystems, rather than
across the subsystem boundaries, in order to
reduce the dependencies among the subsystem.
-
8/8/2019 o3s1
141/151
contd..A system should be divided into small (reasonable)
number of subsystems. The lowest level subsystems
are called modules.
The relationship between two subsystems can be
client-supplier or peer-to-peer.
The subsystem should have simple topology
(pipeline as preferred to star)
The decomposition of system into subsystem can be
organized as a sequence ofhorizontal layers or
vertical partitions.
-
8/8/2019 o3s1
142/151
contd..
-
8/8/2019 o3s1
143/151
Layers
The system is divided into subsystems as a
horizontal layer where each layer knows about
the layers below it but has no knowledge of
layers above it. A supplier client relationship
exists between lower layers and upper layers.
-
8/8/2019 o3s1
144/151
Layers Contd..
closed open
Layer architecture comes in two forms;
a layer uses features
only of immediately lower
layer
reduces dependencies
layers and allows easier
changes
can use features of any
lower layer to any depth
reduces need to redefineoperations at each level
and results in more
efficient and compact
code
-
8/8/2019 o3s1
145/151
Layers Contd..
closed open
Layer architecture comes in two forms;
does not observe
information hiding so it
is less robust.
-
8/8/2019 o3s1
146/151
Partitions
Partitions vertically divide a system into several
independent or weakly-coupled subsystems,
each providing one kind of service
e.g. Subsystems in OS.
-
8/8/2019 o3s1
147/151
Hybrid
Layers and partitions can be used in combination.
Layers can be partitioned
Partitions can be layered
For example, simulation of applicationand interactive graphics
-
8/8/2019 o3s1
148/151
Hybrid Contd..
-
8/8/2019 o3s1
149/151
Identifying Concurrency
System design needs to identify which objects
must be active concurrently and which objects
have activity that in mutually exclusive.
The later objects can be folded together
into a single thread of control or task.
-
8/8/2019 o3s1
150/151
Identifying Concurrency Contd..There are two ways of identifying concurrency.
1. Identify inherent concurrency
The dynamic model is the guide to identifying
concurrency. Two objects are inherently concurrent
if they can receive events at the same time without
interacting. If the events are unsynchronized, the
objects can not be folded into a single threadof control.
-
8/8/2019 o3s1
151/151
Identifying Concurrency Contd..
2. Defining Concurrent tasks
By examining the state diagrams of individualobjects and the exchange of events among them,
many objects can be folded together onto a single
thread of control. On each thread of control, only
a single object at a time is active. Thread of control
are implemented as tasks in computer
systems.