Design: HOW to implement a systemDesign IssuesDesignSystem DesignSlide 5Design PrinciplesDesign Principles (cont.)Slide 8System ArchitectureSubsystem IdentificationSubsystemSubsystem DiscussionSubsystem RelationshipsClient-Server RelationshipPeer-to-Peer RelationshipStrategies for DecompositionsLayered SubsystemsExample: Layered architectureClosed ArchitecturesOpen ArchitecturesProperties of Layered ArchitecturesPartitioned ArchitecturesEx: Partitioned ArchitectureTypical Application ArchitectureSystem TopologyEx: Pipeline TopologyEx: Star ToplogyModularityAbstractionAbstraction (cont.)Cohesion(Weak) Types of cohesiveness(Better) Types of cohesivenessExample: Poor CohesionExample: Good CohesionCouplingCoupling (cont.)Information HidingSlide 39Abstract data typesIdentifying ConcurrencyDetermining Concurrent TasksManagement of Data StoresFile Data StoresDatabase Data StoresSlide 46Global ResourcesSoftware Control MechanismInternal ControlExternal ControlProcedure-driven systemsEvent-Driven SystemsConcurrent SystemsBoundary ConditionsIdentify Trade-off PrioritiesTopic Design: HOW to implement a systemGoals:Satisfy the requirementsSatisfy the customerReduce development costsProvide reliabilitySupport maintainabilityPlan for future modificationsTopic Design IssuesArchitectureUser InterfaceData TypesOperationsData RepresentationsAlgorithmsTopic DesignSystem design (high level design)Focus on architectureIdentification of subsystemsObject design (lower level design)Modules and their implementationsFocus on data representations and algorithmsTopic System DesignChoose high-level strategy for solving problem and building solutionDecide how to organize the system into subsystemsIdentify concurrency / tasksAllocate subsystems to HW and SW componentsTopic System DesignMajor conceptual and policy decisionsApproach for management of data storesAccess mechanism for global resourcesSoftware control mechanismHandle boundary conditionsPrioritize trade-offsTopic Design PrinciplesConsider alternative approachesDo pro and con analysisDelay decisions until superior choice is clearIsolate decisions so alternative implementations can be evaluated laterAvoid unnecessary embellishmentsBut don’t oversimplifyTopic Design Principles (cont.)Make design traceable to requirementsUse uniform documentation styleReuse existing designs when possibleKeep design simple unless performance, maintainability, etc. DEMAND otherwiseTopic Design Principles (cont.)Define interfaces between modules carefullyConsider how to handle the unexpectedDon’t code!!Document decisionsReview, review, review . . .Topic System ArchitectureOverall organization of system into subsystemsDecide basic interaction patternsNumerous architectural styles for different applicationsArchitecture provides context for detailed design decisionsTopic Subsystem IdentificationDivide system into a manageable number of componentsEach major component is a subsystemSubsystem groups components with common properties/functionTopic Subsystem Collection ofClassesAssociationsOperationsEventsConstraintsInterrelated Good cohesionWell-defined, small interface with other subsystemsLow coupling Identified by the service it providesTopic Subsystem DiscussionProvide services for other sub-systemsGroup of related functionsShare a common purposeDivide system into components (>20)Subsystems are decomposed . . .Module is the lowest level of subsystemTopic Subsystem RelationshipsClient-Server relationshipClient subsystems actively drive the system by requesting services provided by a server subsystemPeer-to-peer relationshipSubsystems interact and communicate to accomplish a common goalTopic Client-Server RelationshipServer supplies services for clientsNeed not know identity of clientsNeed not know interface of clientsClient calls serverClient knows interface of serverServer performs some service and returns a resultTopic Peer-to-Peer RelationshipSubsystems call one anotherThe results of/responses to calls may not be immediately visibleSubsystems must know the interfaces of other subsystemsMore likely to have communication dependenciesTopic Strategies for DecompositionsLayers: Horizontal decompositionOpen ClosedPartitions: Vertical decompositionSystem topology: General decompositionsTopic Layered SubsystemsSet of “virtual” worldsEach layer is defined in terms of the layer(s) below itKnowledge is one way: Layer knows about layer(s) below itObjects within layer can be independentLower layer (server) supplies services for objects (clients) in upper layer(s)Topic Example: Layered architectureInteractive Graphics ApplicationWindows OperationsScreen OperationsPixel OperationsDevice I/O OperationsTopic Closed ArchitecturesEach layer is built only in terms of the immediate lower layerReduces dependencies between layersFacilitates changeTopic Open ArchitecturesLayer can use any lower layerReduces the need to redefine operations at each levelMore efficient /compact codeSystem is less robust/harder to changeTopic Properties of Layered ArchitecturesTop and bottom layers specified by the problem statementTop layer is the desired systemBottom layer is defined by available resources (e.g. HW, OS, libraries)Easier to port to other HW/SW platformsTopic Partitioned ArchitecturesDivide system into weakly-coupled subsystemsEach provides specific servicesVertical decomposition of problemTopic Ex: Partitioned ArchitectureOperating SystemFileSystemProcessControlVirtual Memory Manage-mentDeviceControlTopic Typical Application ArchitectureApplication packageWindow graphicsScreen graphicsPixel graphicsOperating systemComputer hardwareUser dialogue controlSimulation packageTopic System TopologyDescribe information flowCan use DFD to model flowSome common topologiesPipeline (batch)Star topologyTopic Ex: Pipeline TopologyLexical analyzerSemantic analyzerCode generatorCode optimizersource programtoken streamabstract syntax treecode sequenceobject codeCompiler:Topic Ex: Star ToplogyMonitoring system:SafeHome softwareSensorsControl panelAlarmTelephone linesensor statusdisplay informationcommands, dataOn/Off signals, alarm typenumber tonesTopic
View Full Document