Upload
vidhyabineesh
View
229
Download
0
Embed Size (px)
Citation preview
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 1/21
Chapter14
System Design
Michael Blaha
James Rumbaugh
2005.5.17
Kim, Suhyun
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 2/21
2/212005-05-17
Contents Introduction
System design decisions Estimating performance
Reuse plan
Organizing and allocating subsystems
Handling global resources
Software control strategy
Architectural style
Summary
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 3/21
3/212005-05-17
Introduction System design
Organization of the system into subsystems Allocation of subsystems to H/W or S/W
Major policy decisions for class design
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 4/214/212005-05-17
Estimating performance Purpose
To determine if the system is feasible Rough performance estimation
Fast calculation, common sense
Getting within small factors Examples
Bank : data storage
Satellite-based ground imaging system : bandwidth,storage
Nuclear power plant : respond time
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 5/21
5/212005-05-17
Making reuse plan (1/ 2) Libraries
Collection of classes Organized about a few, well-focused themes
Complete behavior for the chosen themes
Extensibility to be defined subclass
Problems
Incompatibility with other class libraries
Impossibility to fix inconsistencies by inheritance
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 6/21
6/212005-05-17
Making reuse plan (2/ 2) Frameworks
Skeletal structure of a program Frameworks tend to be specific to a category of app.
User can choose the appropriate subclasses
Patterns Proven solution to a general problem
Achieving reuse by using existing patterns
Small number of classes and relationships
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 7/21
7/212005-05-17
Dividing into subsystem (1/ 2) Layered system
Providing implementation basis for above Reducing conceptual gap between adjoining layers
Desired system
Intermediate layer
Intermediate layer
Available resource
< open architecture > < closed architecture >
Desired system
Intermediate layer
Intermediate layer
Available resource
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 8/21
8/212005-05-17
Partitions
Independent or weakly coupled subsystem Similar level of abstraction
Combining layers and partitions
Application package
Computer hardware
Operating system
Window graphics
Screen graphics
Pixel
User
dialog
control
Simulation
package
Dividing into subsystem (2/ 2)
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 9/21
9/212005-05-17
Identifying concurrency Concurrent objects
Receive events at the same time without interaction ex. Engine and wing controls on an airplane
Be assigned to different hardware units
Defining concurrent tasks Examining state diagrams
Fold many objects onto a single thread of control
Implement threads of control as tasks
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 10/21
10/212005-05-17
Allocation of subsystems Steps
Estimate performance and resource Estimating required CPU processing power
Choose H/W or S/W implementation
Cost, performance Allocate S/W subsystems to processors
Logistics, communication limits, computation limits
Determine the connectivity Connection topology, repeated unit, communications
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 11/21
11/212005-05-17
Management of data storage
File
High volume and low information density Data that accessed sequentially
Data that can be fully read into memory
Database Accessed by multiple application programs
Require coordinated updates via transactions
Secured against unauthorized and malicious access
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 12/21
12/212005-05-17
Handling global resources
Avoiding conflict
Guardian
object
application
application
Physical units
Space
Logical names
Shared data
Normal application
Guardian
object
application
application
Physical units
Space
Logical names
Shared data
Time-critical application
lockGetting lock
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 13/21
13/212005-05-17
Software control strategy
Procedure-driven control
Event-driven control Concurrent control
Internal control
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 14/21
14/212005-05-17
Handling boundary conditions
Initialization
Constant data, parameters, global variables, tasks,guardian objects
Termination
Releasing any external resources
Failure
Plans for graceful exit on fatal errors
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 15/21
15/212005-05-17
Trade-off priorit ies
Determination relative importance of various
criteria Examples
Video game with limited memory
Conserving memory > fast execution Mathematical subroutine package
Well-conditioned numerical behavior >
fast development
Mobile device
Reliability > portability
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 16/21
16/212005-05-17
Common architectural style
Batch transformation
Continuous transformation Interactive interface
Dynamic simulation
Real-time system
Tight time constraints on actions (respond time)
Transaction manager To store and retrieve data
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 17/21
17/212005-05-17
Batch transformation
Executed once on an entire input set
No ongoing interaction with the outside Example
Compiler, payroll processing
ASCII
File
Graphics
Model
Connectivity
Model
Class
Model
Database
Code
Parse
Text
Determine
Connectivity
Abstract to
OO model
Generate
db code
Sequence of steps for a complier
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 18/21
18/212005-05-17
Continuous transformation
Performed continuously as inputs change
Updating outputs frequently Computing outputs incrementally
Adding intermediate objects for optimization
Example Signal processing, windowing system
Graphic
Model
Viewspace
Model
Window
Model
Screen
Image
map clip offset
Sequence of steps for a graphics application
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 19/21
19/212005-05-17
Interactive interface
Dominated by external interactions
Usually only part of entire application Example
Forms-base query interface, control panel for simulation
Interface
Communication
protocol
External
agent
Syntax of
possible
interactions
Flow
control
Error
handling
Human /
device
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 20/21
20/212005-05-17
Dynamic simulation
Simulate evolving real-world objects
Two ways for implementing control Explicit controller can simulate a state machine
Objects can exchange messages among themselves
Problem Providing adequate performance
Estimate computational cost of each update cycle
Example
Economic models, spacecraft trajectory computation
8/8/2019 0517 CH14 System Design
http://slidepdf.com/reader/full/0517-ch14-system-design 21/21
21/212005-05-17
Summary
System architecture
Decide basic approach to solution After analyzing an application
Before beginning the class design
Architectural style Hybrid of several forms
Possibly one for each major subsystem