Software Architecture

Size: px
Start display at page:

Download "Software Architecture"

Transcription

1 Software Architecture Lecture 5 Call-Return Systems Rob Pettit George Mason University

2 last class data flow data flow styles batch sequential pipe & filter process control! process control! looping structure to control environment variables! batch sequential! sequential processing steps, run to completion! typical of early MIS applications! pipe & filter Unix pipes! incremental transformation of streams Yahoo pipes! Unix pipes and Yahoo pipes are special cases (sub-styles) SWE 443 Software Architecture Call-Return Systems 2

3 Recap data flow data flow systems batch sequential pipe & filter process control Unix pipes Yahoo pipes! Availability of data controls the computation! Structure is determined by the orderly motion of data from component to component It s all about the data SWE 443 Software Architecture Call-Return Systems 3

4 Recap data flow pipe and filter batch sequential pipe & filter process control! Components (filters)! Read input stream (or streams)! Locally transform data! Product output stream (or streams)! Connectors (pipes)! Streams! E.g. Java piped data streams; FIFO buffers! Data processed incrementally as it arrives Unix pipes Yahoo pipes! Output can begin before input fully consumed! Filters must be (relatively) independent! Do not share state (i.e. not synchronized)! Don t know/care about upstream/downstream functionality SWE 443 Software Architecture Call-Return Systems 4

5 Recap data flow pipe and filter batch sequential pipe & filter process control! Strengths! Reuse! Any 2 filters can be connected as long as data format agrees! Ease of maintenance! Filters can be added or replaced! Potential for parallel processing! Filters can execute concurrently no need to wait on complete batch! Weaknesses! End-to-end functionality highly dependent on order of filters! Can be difficult to design incremental filters! Not appropriate for interactive application! Error handling is difficult! Data type often limited to low-level! E.g. byte streams Unix pipes Yahoo pipes SWE 443 Software Architecture Call-Return Systems 5

6 today call-return styles data flow batch sequential dataflow network (pipe & filter) acyclic, fan-out, pipeline, Unix closed loop control call-and-return main program/subroutines information hiding objects stateless client-server SOA interacting processes communicating processes event systems implicit invocation publish-subscribe data-oriented repository transactional databases stateful client-server blackboard modern compiler data-sharing compound documents hypertext Fortran COMMON LW processes hierarchical tiers interpreter N-tiered client-server SWE 443 Software Architecture Call-Return Systems 6

7 outline! call-return styles! single thread/process flavors! main-subroutine, layers, modules, objects! multi thread/process issues! synchronization SWE 443 Software Architecture Call-Return Systems 7

8 in call-return styles consumer components invoke functionality in provider components C call return P! usually the caller waits until an invoked service completes and returns results before continuing! components depend on invoked functionality to get their own work done! the correctness of each component may depend on the correctness of the functionality it invokes SWE 443 Software Architecture Call-Return Systems 8

9 call-return has had many flavors throughout history! subroutines! decomposition of main program into processing steps! functional modules! aggregation of processing steps into modules! abstract data types! bundle operations and data, hide representations and other decisions! objects! sub-typing, polymorphism, dynamic binding of methods! client-server! distribution, tiers! services! late binding of providers SWE 443 Software Architecture Call-Return Systems 9

10 in call-return styles system topology comes in different flavors! client-server! star: clients call servers! clients may register callbacks! tiered! hierarchical star: layer n calls layer n+1! peer-to-peer! no restriction! components define one or more interfaces! provides: a set of functionality that is offered! requires: a set of functionality that others must provide SWE 443 Software Architecture Call-Return Systems 10

11 in call-return styles connectors piggyback control & data! consumers know the identity of providers upon which they rely! control! building block: call! consumer blocks until a request is serviced! complex protocols may be built! example: client initializes server, starts a session, makes repeated requests, closes the session! data flows in 2 ways! parameters: from consumer to provider! return values: from provider to consumer SWE 443 Software Architecture Call-Return Systems 11

12 in call-return styles functional correctness is hierarchical! the correctness of each component may depend on the correctness of the functionality it invokes! leads to a pre/post-condition style of specification! pre = conditions under which a service may be requested! post = the result of having made a service request! binding time of a provider may vary! static = at compile time! example: traditional compilers & ADTs! dynamic = at run time! example: OO method dispatch for class hierarchies! brokered (also at run time)! use broker to find components/service providers SWE 443 Software Architecture Call-Return Systems 12

13 example dynamic binding! object 2D-Shape 2D-Shape Polygon Circle Triangle Square! 2D-Shape defines method Perimeter(): Real! same operation, but implemented differently for Triangle, Square, and Circle! if an object A is of any subtype of 2D-Shape a consumer may call A.Perimeter(), and the appropriate method will be chosen at run-time SWE 443 Software Architecture Call-Return Systems 13

14 outline! call-return styles! single thread/process flavors! main-subroutine, layers, modules, objects! multi thread/process issues! synchronization SWE 443 Software Architecture Call-Return Systems 14

15 main-subroutine flavor fairly unrestricted topology Main controller Sub 1 Sub 2 Sub 3 subroutine method call! frequently single thread of control! one component in the C&C view SWE 443 Software Architecture Call-Return Systems 15

16 main-subroutine flavor subroutines indicate code structure! hierarchical decomposition! based on definition-use relationship! hierarchical reasoning! correctness of a subroutine depends on the correctness of the subroutines it calls! subsystem structure implicit in the hierarchy! in large systems, hierarchy may become spaghetti SWE 443 Software Architecture Call-Return Systems 16

17 layers enforce hierarchy Useful Systems Basic Utility Core Level each layer! provides a set of services to the layers above! encapsulates a set of implementations and lower-level services! relies on services from the layers below Users SWE 443 Software Architecture Call-Return Systems 17

18 modules alternative way to rein in complexity Main controller Sub 1 Sub 2 Sub 3 subroutine method call module SWE 443 Software Architecture Call-Return Systems 18

19 modules are:! (naïve) a piece of code! compilation unit, including interface declarations! (Parnas) a place to encapsulate decisions modules are good for:! management: partition overall development effort! divide and conquer! understanding! divide and conquer! evolution: separation of concerns! changes to one module are isolated from others SWE 443 Software Architecture Call-Return Systems 19

20 in the 70 s, modules turned into Abstract Data Types (ADTs)! good programmers shared an intuition! if you get the manipulation of data structures right, the rest of the program is much simpler.! ADTs contributions:! structure representation bundled with operators! user defined types declarations! information hiding protect internal structure! This routine practice is now part of O-O SWE 443 Software Architecture Call-Return Systems 20

21 in the 80 s, ADTs turned into objects! inheritance! share definitions of functionality! polymorphism/dynamic binding:! determine actual operation to call at run-time! capture families of related designs! inheritance hierarchy! natural mapping to real world or domain! if we understand the domain then we are led to a natural system structure based on the domain! improve understandability, maintainability SWE 443 Software Architecture Call-Return Systems 21

22 objects have limitations:! scalability on the number of object classes! vast numbers of classes requires additional structuring! overall system behavior hard to understand! distributed responsibility for behavior! interaction (sequence) diagrams used in design to mitigate this! hard to capture similarities at the system level! push led to design patterns SWE 443 Software Architecture Call-Return Systems 22

23 outline! call-return styles! single thread/process flavors! main-subroutine, layers, modules, objects! multi thread/process issues! synchronization SWE 443 Software Architecture Call-Return Systems 23

24 Concurrency! Most software architectures make some use of concurrency! Strengths! Separation of concerns! Increased performance! Provide users with ability to perform several tasks in parallel! Weaknesses! Complex synchronization of concurrent tasks! Race conditions, deadlocks, etc.! Must analyze functionality to determine what can be executed in parallel! Limitations on performance improvement SWE 443 Software Architecture Call-Return Systems 24

25 Multi thread/process call-return Multiple processes on a multi-core processor or multiple machines p1 p2 p3 p1 p2 p3 time simultaneous processing t1 t2 t3 Multiple threads in a single OS process executing on a single processor p1 stack t1 data interleaving code t3 stack time concurrent computations (or events) may occur in any order, unless explicit steps are taken to synchronize them SWE 443 Software Architecture Call-Return Systems 25

26 Amdahl s Law! Often used to estimate speedup associated with parallel processing! Performance gain of going from 1 to n processors (or cores) is computed as: 1 (1 p) + p n Where 0 p 1 is the portion of the software that can be parallelized and n 1 is the number of processors or cores SWE 443 Software Architecture Call-Return Systems 26

27 Amdahl s Law Source: Wikipedia SWE 443 Software Architecture Call-Return Systems 27

28 concurrency challenges the predictability of effects P Q P and Q running concurrently a. b. x=0; x=x+2; c. d. x=3; x=x*2; how many possible values for x? SWE 443 Software Architecture Call-Return Systems 28

29 concurrency challenges the predictability of effects P a. x=0; b. x=x+2; Q c. x=3; d. x=x*2; P and Q running concurrently a 0 a 0 a 0 c 3 c 3 c 3 b +2 c 3 c 3 a 0 a 0 d *2 c 3 b +2 d *2 b +2 d *2 a 0 d *2 d *2 b +2 d *2 b +2 b +2 x= SWE 443 Software Architecture Call-Return Systems 29

30 concurrency challenges the predictability of effects P Q R P, Q, and R running concurrently a. b. c. x=0; x=x+2; x=x^2; d. e. f. x=3; x=x*2; x++; g. h. i. X=5; x=x-2; x=x^3; Any guesses on how many possible values? Consider the impact on testing! SWE 443 Software Architecture Call-Return Systems 30

31 monitors are used for explicit synchronization! Monitor provides a synchronized communication! Specific entry condition that is used to guarantee only one process operates on the critical section (data) at a time! Can be queued or single, synchronized buffer More details about threading and monitors in JVM: SWE 443 Software Architecture Call-Return Systems 31

32 example: the parking lot A controller only permits cars to enter when the parking is not full, and does not permit cars to leave when there are no cars in the parking lot. SWE 443 Software Architecture Call-Return Systems 32

33 example: the parking lot start by identifying structure and events! events or actions of interest?! arrival and departure! identify threads/processes! arrivals, departures and CarPark control! define structure and interactions CarPark ARRIVALS arrive CARPARK CONTROL depart DEPARTURES SWE 443 Software Architecture Call-Return Systems 33

34 example: the parking lot synchronization via shared object class Arrivals extends Thread { class Departs extends Thread { } Arrivals(CarParkControl CPC) { } void run() { CPC.arrive(); } } Departs(CarParkControl CPC) { } void run() { CPC.depart(); } class CarParkControl { } CarParkControl( ) { } synchronized void arrive() { } synchronized void depart() { } SWE 443 Software Architecture Call-Return Systems 34

35 example: the parking lot translate the structure into Java class CarParkControl { private int spaces; private int capacity; CarParkControl(int n) {spaces = n; capacity = n;} } synchronized void arrive() { while!(spaces > 0) wait(); --spaces; } synchronized void depart() { while!(spaces < capacity) wait(); ++spaces; } SWE 443 Software Architecture Call-Return Systems 35

36 example: the parking lot insert Java monitor primitives class CarParkControl { private int spaces; private int capacity; CarParkControl(int n) {spaces = n; capacity = n;} Java! provides a wait queue per object! guaranties only one thread at a time obtains the lock } synchronized void arrive() { while!(spaces > 0) wait(); --spaces; } synchronized void depart() { while!(spaces < capacity) wait(); ++spaces; } SWE 443 Software Architecture Call-Return Systems 36

37 example: the parking lot insert Java monitor methods class CarParkControl { private int spaces; private int capacity; CarParkControl(int n) {spaces = n; capacity = n;} java.lang.object.wait()! blocks the executing thread until notified by another thread } synchronized void arrive() { while!(spaces > 0) wait(); --spaces; } synchronized void depart() { while!(spaces < capacity) wait(); ++spaces; } what s missing? SWE 443 Software Architecture Call-Return Systems 37

38 example: the parking lot insert Java monitor methods class CarParkControl { private int spaces; private int capacity; CarParkControl(int n) {spaces = n; capacity = n;} java.lang.object.notify()! unblocks a single thread waiting on this object s queue! the unblocked thread must get the lock } synchronized void arrive() { while!(spaces > 0) wait(); --spaces; notify(); } synchronized void depart() { while!(spaces < capacity) wait(); ++spaces; notify(); } SWE 443 Software Architecture Call-Return Systems 38

39 Putting it all together: the parking lot example class CarParkControl { private int spaces; private int capacity; } CarParkControl(int n) {spaces = n; capacity = n;} synchronized void arrive() { while!(spaces > 0) wait(); --spaces; notify(); } synchronized void depart() { while!(spaces < capacity) wait(); ++spaces; notify(); } class Arrivals extends Thread { Arrivals(CarParkControl CPC) { } void run() { CPC.arrive(); } } class Departs extends Thread { } Departs(CarParkControl CPC) { } void run() { CPC.depart(); } SWE 443 Software Architecture Call-Return Systems 39

Software Architecture

Software Architecture Software Architecture Lecture 6 Event Systems Rob Pettit George Mason University SWE 443 Software Architecture Event Systems 1 previously data flow and call-return styles data flow batch sequential dataflow

More information

Software Architecture

Software Architecture Software Architecture Lecture 7 Communicating Peers João Pedro Sousa George Mason University previously, event systems within the interacting processes family data flow batch sequential dataflow network

More information

Software Architecture

Software Architecture Software Architecture Lecture 4 Data Flow Systems Rob Pettit George Mason University Previously: software engineering NATO SE conference Subroutines 1960 Software architecture Software development environments

More information

Architectural Styles. Reid Holmes

Architectural Styles. Reid Holmes Material and some slide content from: - Emerson Murphy-Hill - Software Architecture: Foundations, Theory, and Practice - Essential Software Architecture Architectural Styles Reid Holmes Lecture 5 - Tuesday,

More information

C340 Concurrency: Semaphores and Monitors. Goals

C340 Concurrency: Semaphores and Monitors. Goals C340 Concurrency: Semaphores and Monitors Wolfgang Emmerich 1 Goals Introduce concepts of Semaphores Monitors Implementation in Java synchronised methods and private attributes single thread active in

More information

Element: Relations: Topology: no constraints.

Element: Relations: Topology: no constraints. The Module Viewtype The Module Viewtype Element: Elements, Relations and Properties for the Module Viewtype Simple Styles Call-and-Return Systems Decomposition Style Uses Style Generalization Style Object-Oriented

More information

An Introduction to Software Architecture

An Introduction to Software Architecture An Introduction to Software Architecture Software Engineering Design Lecture 11 Motivation for studying SW architecture As the size of SW systems increases, the algorithms and data structures of the computation

More information

ICS 52: Introduction to Software Engineering

ICS 52: Introduction to Software Engineering ICS 52: Introduction to Software Engineering Fall Quarter 2004 Professor Richard N. Taylor Lecture Notes Week 3: Architectures http://www.ics.uci.edu/~taylor/ics_52_fq04/syllabus.html Copyright 2004, Richard

More information

Software Architecture in Practice

Software Architecture in Practice Software Architecture in Practice Chapter 5: Architectural Styles - From Qualities to Architecture Pittsburgh, PA 15213-3890 Sponsored by the U.S. Department of Defense Chapter 5 - page 1 Lecture Objectives

More information

An Introduction to Software Architecture

An Introduction to Software Architecture An Introduction to Software Architecture Software Requirements and Design CITS 4401 Lecture 11 Motivation for studying SW architecture As the size of SW systems increase, the algorithms and data structures

More information

In his paper of 1972, Parnas proposed the following problem [42]:

In his paper of 1972, Parnas proposed the following problem [42]: another part of its interface. (In fact, Unix pipe and filter systems do this, the file system playing the role of the repository and initialization switches playing the role of control.) Another example

More information

An Introduction to Software Architecture. David Garlan & Mary Shaw 94

An Introduction to Software Architecture. David Garlan & Mary Shaw 94 An Introduction to Software Architecture David Garlan & Mary Shaw 94 Motivation Motivation An increase in (system) size and complexity structural issues communication (type, protocol) synchronization data

More information

Architectural Styles. Software Architecture Lecture 5. Copyright Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved.

Architectural Styles. Software Architecture Lecture 5. Copyright Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Architectural Styles Software Architecture Lecture 5 Copyright Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Object-Oriented Style Components are objects Data and associated

More information

6/20/2018 CS5386 SOFTWARE DESIGN & ARCHITECTURE LECTURE 5: ARCHITECTURAL VIEWS C&C STYLES. Outline for Today. Architecture views C&C Views

6/20/2018 CS5386 SOFTWARE DESIGN & ARCHITECTURE LECTURE 5: ARCHITECTURAL VIEWS C&C STYLES. Outline for Today. Architecture views C&C Views 1 CS5386 SOFTWARE DESIGN & ARCHITECTURE LECTURE 5: ARCHITECTURAL VIEWS C&C STYLES Outline for Today 2 Architecture views C&C Views 1 Components and Connectors (C&C) Styles 3 Elements Relations Properties

More information

ICS 52: Introduction to Software Engineering

ICS 52: Introduction to Software Engineering ICS 52: Introduction to Software Engineering Fall Quarter 2002 Professor Richard N. Taylor Lecture Notes Week 3: Architectures http://www.ics.uci.edu/~taylor/ics_52_fq02/syllabus.html Copyright 2002, Richard

More information

Architectural Styles I

Architectural Styles I Architectural Styles I Software Architecture VO/KU (707023/707024) Roman Kern KTI, TU Graz 2015-01-07 Roman Kern (KTI, TU Graz) Architectural Styles I 2015-01-07 1 / 86 Outline 1 Non-Functional Concepts

More information

Information System Design (IT60105)

Information System Design (IT60105) Information System Design (IT60105) Lecture 26 Object-Oriented System Testing Lecture #23 Procedural vs OO paradigms Why not Traditional Testing? Issues Methodology 2 Procedural Vs OO p Procedural Vs OO

More information

CS 160: Interactive Programming

CS 160: Interactive Programming CS 160: Interactive Programming Professor John Canny 3/8/2006 1 Outline Callbacks and Delegates Multi-threaded programming Model-view controller 3/8/2006 2 Callbacks Your code Myclass data method1 method2

More information

Software Architectures. Lecture 3

Software Architectures. Lecture 3 Software Architectures Lecture 3 2 Roadmap of the course What is software architecture? Designing Software Architecture Requirements: quality attributes or qualities How to achieve requirements : tactics

More information

XVIII. Software Architectures

XVIII. Software Architectures XVIII. Software Architectures Software Architectures Subsystems, Modules and Connectors Pipes and Filters, Object-Oriented, Layered, Event-Driven, Repository-Based Architectures Client Server Architectures

More information

Software Architecture

Software Architecture Software Architecture Does software architecture global design?, architect designer? Overview What is it, why bother? Architecture Design Viewpoints and view models Architectural styles Architecture asssessment

More information

An Introduction to Software Architecture By David Garlan & Mary Shaw 94

An Introduction to Software Architecture By David Garlan & Mary Shaw 94 IMPORTANT NOTICE TO STUDENTS These slides are NOT to be used as a replacement for student notes. These slides are sometimes vague and incomplete on purpose to spark a class discussion An Introduction to

More information

Architectural Styles I

Architectural Styles I Architectural Styles I Software Architecture VO/KU (707.023/707.024) Denis Helic, Roman Kern KMI, TU Graz Nov 14, 2012 Denis Helic, Roman Kern (KMI, TU Graz) Architectural Styles I Nov 14, 2012 1 / 80

More information

Distributed Objects. Object-Oriented Application Development

Distributed Objects. Object-Oriented Application Development Distributed s -Oriented Application Development Procedural (non-object oriented) development Data: variables Behavior: procedures, subroutines, functions Languages: C, COBOL, Pascal Structured Programming

More information

Chapter 13 Object Oriented Programming. Copyright 2006 The McGraw-Hill Companies, Inc.

Chapter 13 Object Oriented Programming. Copyright 2006 The McGraw-Hill Companies, Inc. Chapter 13 Object Oriented Programming Contents 13.1 Prelude: Abstract Data Types 13.2 The Object Model 13.4 Java 13.1 Prelude: Abstract Data Types Imperative programming paradigm Algorithms + Data Structures

More information

Architecture Styles. Instructor: Yongjie Zheng February 7, CS 5553: Software Architecture and Design

Architecture Styles. Instructor: Yongjie Zheng February 7, CS 5553: Software Architecture and Design Architecture Styles Instructor: Yongjie Zheng February 7, 2017 CS 5553: Software Architecture and Design Architecture styles: a named collection of architecture design decisions that (1) are applicable

More information

Software Architecture. Lecture 4

Software Architecture. Lecture 4 Software Architecture Lecture 4 Last time We discussed tactics to achieve architecture qualities We briefly surveyed architectural styles 23-Jan-08 http://www.users.abo.fi/lpetre/sa08/ 2 Today We check

More information

IMPORTANT NOTICE TO STUDENTS

IMPORTANT NOTICE TO STUDENTS IMPORTANT NOTICE TO STUDENTS These slides are NOT to be used as a replacement for student notes. These slides are sometimes vague and incomplete on purpose to spark a class discussion KWIC Case Study CS

More information

Dealing with Issues for Interprocess Communication

Dealing with Issues for Interprocess Communication Dealing with Issues for Interprocess Communication Ref Section 2.3 Tanenbaum 7.1 Overview Processes frequently need to communicate with other processes. In a shell pipe the o/p of one process is passed

More information

Objects as Session-Typed Processes

Objects as Session-Typed Processes Objects as Session-Typed Processes Stephanie Balzer and Frank Pfenning Computer Science Department, Carnegie Mellon University AGERE! 2015 The essence of object-orientation 2 The essence of object-orientation

More information

Lecture 13: Memory Consistency. + a Course-So-Far Review. Parallel Computer Architecture and Programming CMU , Spring 2013

Lecture 13: Memory Consistency. + a Course-So-Far Review. Parallel Computer Architecture and Programming CMU , Spring 2013 Lecture 13: Memory Consistency + a Course-So-Far Review Parallel Computer Architecture and Programming Today: what you should know Understand the motivation for relaxed consistency models Understand the

More information

Lecture 13: Object orientation. Object oriented programming. Introduction. Object oriented programming. OO and ADT:s. Introduction

Lecture 13: Object orientation. Object oriented programming. Introduction. Object oriented programming. OO and ADT:s. Introduction Lecture 13: Object orientation Object oriented programming Introduction, types of OO languages Key concepts: Encapsulation, Inheritance, Dynamic binding & polymorphism Other design issues Smalltalk OO

More information

Java 8 Programming for OO Experienced Developers

Java 8 Programming for OO Experienced Developers www.peaklearningllc.com Java 8 Programming for OO Experienced Developers (5 Days) This course is geared for developers who have prior working knowledge of object-oriented programming languages such as

More information

IT 540 Operating Systems ECE519 Advanced Operating Systems

IT 540 Operating Systems ECE519 Advanced Operating Systems IT 540 Operating Systems ECE519 Advanced Operating Systems Prof. Dr. Hasan Hüseyin BALIK (5 th Week) (Advanced) Operating Systems 5. Concurrency: Mutual Exclusion and Synchronization 5. Outline Principles

More information

Operating System Overview. Chapter 2

Operating System Overview. Chapter 2 Operating System Overview Chapter 2 1 Operating System A program that controls the execution of application programs An interface between applications and hardware 2 Operating System Objectives Convenience

More information

Architectural Design

Architectural Design Architectural Design Objectives To introduce architectural design and to discuss its importance To explain the architectural design decisions that have to be made To introduce three complementary architectural

More information

Concepts of Programming Languages

Concepts of Programming Languages Concepts of Programming Languages Lecture 10 - Object-Oriented Programming Patrick Donnelly Montana State University Spring 2014 Patrick Donnelly (Montana State University) Concepts of Programming Languages

More information

Objectives. Architectural Design. Software architecture. Topics covered. Architectural design. Advantages of explicit architecture

Objectives. Architectural Design. Software architecture. Topics covered. Architectural design. Advantages of explicit architecture Objectives Architectural Design To introduce architectural design and to discuss its importance To explain the architectural design decisions that have to be made To introduce three complementary architectural

More information

ADVANCED SOFTWARE DESIGN LECTURE 4 SOFTWARE ARCHITECTURE

ADVANCED SOFTWARE DESIGN LECTURE 4 SOFTWARE ARCHITECTURE ADVANCED SOFTWARE DESIGN LECTURE 4 SOFTWARE ARCHITECTURE Dave Clarke 1 THIS LECTURE At the end of this lecture you will know notations for expressing software architecture the design principles of cohesion

More information

CAS 703 Software Design

CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario Acknowledgments: Material based on Software by Tao et al. (Chapters 9 and 10) (SOA) 1 Interaction

More information

Lecture 9: Introduction to Monitors

Lecture 9: Introduction to Monitors COMP 150-CCP Concurrent Programming Lecture 9: Introduction to Monitors Dr. Richard S. Hall rickhall@cs.tufts.edu Concurrent programming February 14, 2008 Abstracting Locking Details Recall our discussion

More information

CHAPTER - 4 REMOTE COMMUNICATION

CHAPTER - 4 REMOTE COMMUNICATION CHAPTER - 4 REMOTE COMMUNICATION Topics Introduction to Remote Communication Remote Procedural Call Basics RPC Implementation RPC Communication Other RPC Issues Case Study: Sun RPC Remote invocation Basics

More information

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE PART A UNIT I 1. Differentiate object oriented programming from procedure oriented programming. 2. Define abstraction and encapsulation. 3. Differentiate

More information

XVIII. Software Architectures

XVIII. Software Architectures XVIII. Software Architectures Software Architectures UML Packages Client-Server vs Peer-to-Peer 3-Tier and 4-Tier Architectures Horizontal Layers and Vertical Partitions The Model-View-Controller Architecture

More information

7. System Design: Addressing Design Goals

7. System Design: Addressing Design Goals 7. System Design: Addressing Design Goals Outline! Overview! UML Component Diagram and Deployment Diagram! Hardware Software Mapping! Data Management! Global Resource Handling and Access Control! Software

More information

CMSC Computer Architecture Lecture 12: Multi-Core. Prof. Yanjing Li University of Chicago

CMSC Computer Architecture Lecture 12: Multi-Core. Prof. Yanjing Li University of Chicago CMSC 22200 Computer Architecture Lecture 12: Multi-Core Prof. Yanjing Li University of Chicago Administrative Stuff! Lab 4 " Due: 11:49pm, Saturday " Two late days with penalty! Exam I " Grades out on

More information

System Design. Design Issues. System Design. System Design. Design: HOW to implement a system. Strategic vs. Local Design Decisions.

System Design. Design Issues. System Design. System Design. Design: HOW to implement a system. Strategic vs. Local Design Decisions. Design: HOW to implement a system System Design Goals: Satisfy the requirements Satisfy the customer Reduce development costs Provide reliability Support maintainability Plan for future modifications 1

More information

COPYRIGHTED MATERIAL. Table of Contents. Foreword... xv. About This Book... xvii. About The Authors... xxiii. Guide To The Reader...

COPYRIGHTED MATERIAL. Table of Contents. Foreword... xv. About This Book... xvii. About The Authors... xxiii. Guide To The Reader... Table of Contents Foreword..................... xv About This Book... xvii About The Authors............... xxiii Guide To The Reader.............. xxvii Part I Some Concepts.................. 1 1 On Patterns

More information

Design: HOW to implement a system

Design: HOW to implement a system System Design Goals: Design: HOW to implement a system Satisfy the requirements Satisfy the customer Reduce development costs Provide reliability Support maintainability Plan for future modifications 1

More information

Grade Weights. Language Design and Overview of COOL. CS143 Lecture 2. Programming Language Economics 101. Lecture Outline

Grade Weights. Language Design and Overview of COOL. CS143 Lecture 2. Programming Language Economics 101. Lecture Outline Grade Weights Language Design and Overview of COOL CS143 Lecture 2 Project 0% I, II 10% each III, IV 1% each Midterm 1% Final 2% Written Assignments 10% 2.% each Prof. Aiken CS 143 Lecture 2 1 Prof. Aiken

More information

CSE 435: Software Engineering. System Design

CSE 435: Software Engineering. System Design System Design Design: HOW to implement a system Goals: Satisfy the requirements Satisfy the customer Reduce development costs Provide reliability Support maintainability Plan for future modifications Design

More information

An Introduction to Object Orientation

An Introduction to Object Orientation An Introduction to Object Orientation Rushikesh K Joshi Indian Institute of Technology Bombay rkj@cse.iitb.ac.in A talk given at Islampur Abstractions in Programming Control Abstractions Functions, function

More information

System Design. Acknowledge: Atlee and Pfleeger (Software Engineering: Theory and Practice)

System Design. Acknowledge: Atlee and Pfleeger (Software Engineering: Theory and Practice) System Design Acknowledge: Atlee and Pfleeger (Software Engineering: Theory and Practice) C 870: Advanced Software Engineering (System Design): Cheng Design: HOW to implement a system Goals: Satisfy the

More information

G Programming Languages Spring 2010 Lecture 13. Robert Grimm, New York University

G Programming Languages Spring 2010 Lecture 13. Robert Grimm, New York University G22.2110-001 Programming Languages Spring 2010 Lecture 13 Robert Grimm, New York University 1 Review Last week Exceptions 2 Outline Concurrency Discussion of Final Sources for today s lecture: PLP, 12

More information

Basic Object-Orientation

Basic Object-Orientation Basic Object-Orientation Chapters 2 and 4 / Hour 2 2002, Delroy A. Brinkerhoff Basic Object-Orientation Slide 1 of 21 Chapters 2 and 4 / Hour 2 # Objects and Classes # Abstraction and classification (generalization)

More information

Distributed Information Processing

Distributed Information Processing Distributed Information Processing 6 th Lecture Eom, Hyeonsang ( 엄현상 ) Department of Computer Science & Engineering Seoul National University Copyrights 2016 Eom, Hyeonsang All Rights Reserved Outline

More information

CAS 703 Software Design

CAS 703 Software Design Dr. Ridha Khedri Department of Computing and Software, McMaster University Canada L8S 4L7, Hamilton, Ontario Acknowledgments: Material based on Software Architecture by Tao et al. (Chapters 6 and 7) 1

More information

Java Basics. Object Orientated Programming in Java. Benjamin Kenwright

Java Basics. Object Orientated Programming in Java. Benjamin Kenwright Java Basics Object Orientated Programming in Java Benjamin Kenwright Outline Essential Java Concepts Syntax, Grammar, Formatting, Introduce Object-Orientated Concepts Encapsulation, Abstract Data, OO Languages,

More information

Verteilte Systeme (Distributed Systems)

Verteilte Systeme (Distributed Systems) Verteilte Systeme (Distributed Systems) Karl M. Göschka Karl.Goeschka@tuwien.ac.at http://www.infosys.tuwien.ac.at/teaching/courses/ VerteilteSysteme/ Lecture 3: Communication (Part 2) Remote Procedure

More information

The modularity requirement

The modularity requirement The modularity requirement The obvious complexity of an OS and the inherent difficulty of its design lead to quite a few problems: an OS is often not completed on time; It often comes with quite a few

More information

CPSC 410? Advanced Software Engineering Mid-term Examination (Term I ) SOLUTION Instructor: Gail Murphy

CPSC 410? Advanced Software Engineering Mid-term Examination (Term I ) SOLUTION Instructor: Gail Murphy CPSC 410? Advanced Software Engineering Mid-term Examination (Term I 2001-2002) SOLUTION Instructor: Gail Murphy Do NOT start until you are informed you can start! This examination has 7 questions. The

More information

Introduction. CS3026 Operating Systems Lecture 01

Introduction. CS3026 Operating Systems Lecture 01 Introduction CS3026 Operating Systems Lecture 01 One or more CPUs Device controllers (I/O modules) Memory Bus Operating system? Computer System What is an Operating System An Operating System is a program

More information

Contemporary Design. Traditional Hardware Design. Traditional Hardware Design. HDL Based Hardware Design User Inputs. Requirements.

Contemporary Design. Traditional Hardware Design. Traditional Hardware Design. HDL Based Hardware Design User Inputs. Requirements. Contemporary Design We have been talking about design process Let s now take next steps into examining in some detail Increasing complexities of contemporary systems Demand the use of increasingly powerful

More information

740: Computer Architecture Memory Consistency. Prof. Onur Mutlu Carnegie Mellon University

740: Computer Architecture Memory Consistency. Prof. Onur Mutlu Carnegie Mellon University 740: Computer Architecture Memory Consistency Prof. Onur Mutlu Carnegie Mellon University Readings: Memory Consistency Required Lamport, How to Make a Multiprocessor Computer That Correctly Executes Multiprocess

More information

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 2: Review of Object Orientation

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 2: Review of Object Orientation Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 2: Review of Object Orientation 2.1 What is Object Orientation? Procedural paradigm: Software is organized

More information

CSC Operating Systems Fall Lecture - II OS Structures. Tevfik Ko!ar. Louisiana State University. August 27 th, 2009.

CSC Operating Systems Fall Lecture - II OS Structures. Tevfik Ko!ar. Louisiana State University. August 27 th, 2009. CSC 4103 - Operating Systems Fall 2009 Lecture - II OS Structures Tevfik Ko!ar Louisiana State University August 27 th, 2009 1 Announcements TA Changed. New TA: Praveenkumar Kondikoppa Email: pkondi1@lsu.edu

More information

Announcements. Computer System Organization. Roadmap. Major OS Components. Processes. Tevfik Ko!ar. CSC Operating Systems Fall 2009

Announcements. Computer System Organization. Roadmap. Major OS Components. Processes. Tevfik Ko!ar. CSC Operating Systems Fall 2009 CSC 4103 - Operating Systems Fall 2009 Lecture - II OS Structures Tevfik Ko!ar TA Changed. New TA: Praveenkumar Kondikoppa Email: pkondi1@lsu.edu Announcements All of you should be now in the class mailing

More information

10조 이호진 이지 호

10조 이호진 이지 호 10 조 200910045 이호진 200911415 이지호 According to the IEEE definition, design is.. The process of defining the architecture, components, interfaces, and other characteristics of a system or component 1.

More information

SWE 760 Lecture 1: Introduction to Analysis & Design of Real-Time Embedded Systems

SWE 760 Lecture 1: Introduction to Analysis & Design of Real-Time Embedded Systems SWE 760 Lecture 1: Introduction to Analysis & Design of Real-Time Embedded Systems Hassan Gomaa References: H. Gomaa, Chapters 1, 2, 3 - Real-Time Software Design for Embedded Systems, Cambridge University

More information

DISTRIBUTED SYSTEMS. Instructor: Prasun Dewan (FB 150,

DISTRIBUTED SYSTEMS. Instructor: Prasun Dewan (FB 150, DISTRIBUTED SYSTEMS Instructor: Prasun Dewan (FB 150, dewan@unc.edu) COURSE HOME PAGE http://www.cs.unc.edu/~dewan/734/current/index.html 2 LECTURES AND ASSIGNMENTS No book PPT slides and sometimes word

More information

Safety SPL/2010 SPL/20 1

Safety SPL/2010 SPL/20 1 Safety 1 system designing for concurrent execution environments system: collection of objects and their interactions system properties: Safety - nothing bad ever happens Liveness - anything ever happens

More information

5/9/2014. Recall the design process. Lecture 1. Establishing the overall structureof a software system. Topics covered

5/9/2014. Recall the design process. Lecture 1. Establishing the overall structureof a software system. Topics covered Topics covered Chapter 6 Architectural Design Architectural design decisions Architectural views Architectural patterns Application architectures Lecture 1 1 2 Software architecture The design process

More information

Operating System. Operating System Overview. Layers of Computer System. Operating System Objectives. Services Provided by the Operating System

Operating System. Operating System Overview. Layers of Computer System. Operating System Objectives. Services Provided by the Operating System Operating System Operating System Overview Chapter 2 A program that controls the execution of application programs An interface between applications and hardware 1 2 Operating System Objectives Layers

More information

Operating System Overview. Operating System

Operating System Overview. Operating System Operating System Overview Chapter 2 1 Operating System A program that controls the execution of application programs An interface between applications and hardware 2 1 Operating System Objectives Convenience

More information

Chapter 4: Threads. Operating System Concepts 9 th Edition

Chapter 4: Threads. Operating System Concepts 9 th Edition Chapter 4: Threads Silberschatz, Galvin and Gagne 2013 Chapter 4: Threads Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues Operating System Examples

More information

Software Development & Education Center. Java Platform, Standard Edition 7 (JSE 7)

Software Development & Education Center. Java Platform, Standard Edition 7 (JSE 7) Software Development & Education Center Java Platform, Standard Edition 7 (JSE 7) Detailed Curriculum Getting Started What Is the Java Technology? Primary Goals of the Java Technology The Java Virtual

More information

Chapter 4: Threads. Chapter 4: Threads

Chapter 4: Threads. Chapter 4: Threads Chapter 4: Threads Silberschatz, Galvin and Gagne 2013 Chapter 4: Threads Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues Operating System Examples

More information

OS Design Approaches. Roadmap. OS Design Approaches. Tevfik Koşar. Operating System Design and Implementation

OS Design Approaches. Roadmap. OS Design Approaches. Tevfik Koşar. Operating System Design and Implementation CSE 421/521 - Operating Systems Fall 2012 Lecture - II OS Structures Roadmap OS Design and Implementation Different Design Approaches Major OS Components!! Memory management! CPU Scheduling! I/O Management

More information

Software Paradigms (Lesson 3) Object-Oriented Paradigm (2)

Software Paradigms (Lesson 3) Object-Oriented Paradigm (2) Software Paradigms (Lesson 3) Object-Oriented Paradigm (2) Table of Contents 1 Reusing Classes... 2 1.1 Composition... 2 1.2 Inheritance... 4 1.2.1 Extending Classes... 5 1.2.2 Method Overriding... 7 1.2.3

More information

Verteilte Systeme (Distributed Systems)

Verteilte Systeme (Distributed Systems) Verteilte Systeme (Distributed Systems) Karl M. Göschka Karl.Goeschka@tuwien.ac.at http://www.infosys.tuwien.ac.at/teaching/courses/ VerteilteSysteme/ Lecture 4: Operating System Support Processes and

More information

Summary Semaphores. Passing the Baton any await statement. Synchronisation code not linked to the data

Summary Semaphores. Passing the Baton any await statement. Synchronisation code not linked to the data Lecture 4 Monitors Summary Semaphores Good news Simple, efficient, expressive Passing the Baton any await statement Bad news Low level, unstructured omit a V: deadlock omit a P: failure of mutex Synchronisation

More information

Object-Oriented Software Engineering. Chapter 2: Review of Object Orientation

Object-Oriented Software Engineering. Chapter 2: Review of Object Orientation Object-Oriented Software Engineering Chapter 2: Review of Object Orientation 2.1 What is Object Orientation? Procedural paradigm: Software is organized around the notion of procedures Procedural abstraction

More information

Lecture 15: I/O Devices & Drivers

Lecture 15: I/O Devices & Drivers CS 422/522 Design & Implementation of Operating Systems Lecture 15: I/O Devices & Drivers Zhong Shao Dept. of Computer Science Yale University Acknowledgement: some slides are taken from previous versions

More information

CPSC/ECE 3220 Fall 2017 Exam Give the definition (note: not the roles) for an operating system as stated in the textbook. (2 pts.

CPSC/ECE 3220 Fall 2017 Exam Give the definition (note: not the roles) for an operating system as stated in the textbook. (2 pts. CPSC/ECE 3220 Fall 2017 Exam 1 Name: 1. Give the definition (note: not the roles) for an operating system as stated in the textbook. (2 pts.) Referee / Illusionist / Glue. Circle only one of R, I, or G.

More information

Executive Summary. It is important for a Java Programmer to understand the power and limitations of concurrent programming in Java using threads.

Executive Summary. It is important for a Java Programmer to understand the power and limitations of concurrent programming in Java using threads. Executive Summary. It is important for a Java Programmer to understand the power and limitations of concurrent programming in Java using threads. Poor co-ordination that exists in threads on JVM is bottleneck

More information

Chapter 4 Communication

Chapter 4 Communication DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN Chapter 4 Communication Layered Protocols (1) Figure 4-1. Layers, interfaces, and protocols in the OSI

More information

Short Notes of CS201

Short Notes of CS201 #includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

More information

Engr. M. Fahad Khan Lecturer Software Engineering Department University Of Engineering & Technology Taxila

Engr. M. Fahad Khan Lecturer Software Engineering Department University Of Engineering & Technology Taxila Engr. M. Fahad Khan Lecturer Software Engineering Department University Of Engineering & Technology Taxila Software Design and Architecture Software Design Software design is a process of problem-solving

More information

Real-Time and Concurrent Programming Lecture 4 (F4): Monitors: synchronized, wait and notify

Real-Time and Concurrent Programming Lecture 4 (F4): Monitors: synchronized, wait and notify http://cs.lth.se/eda040 Real-Time and Concurrent Programming Lecture 4 (F4): Monitors: synchronized, wait and notify Klas Nilsson 2016-09-20 http://cs.lth.se/eda040 F4: Monitors: synchronized, wait and

More information

COMP30112: Concurrency Topics 4.1: Concurrency Patterns - Monitors

COMP30112: Concurrency Topics 4.1: Concurrency Patterns - Monitors COMP30112: Concurrency Topics 4.1: Concurrency Patterns - Monitors Howard Barringer Room KB2.20: email: Howard.Barringer@manchester.ac.uk February 2009 Outline Monitors FSP Models-to-Java Monitors Producers/Consumers

More information

Programming Languages 2nd edition Tucker and Noonan"

Programming Languages 2nd edition Tucker and Noonan Programming Languages 2nd edition Tucker and Noonan" Chapter 13 Object-Oriented Programming I am surprised that ancient and Modern writers have not attributed greater importance to the laws of inheritance..."

More information

SOFTWARE MODELING AND DESIGN. UML, Use Cases, Patterns, and. Software Architectures. Ki Cambridge UNIVERSITY PRESS. Hassan Gomaa

SOFTWARE MODELING AND DESIGN. UML, Use Cases, Patterns, and. Software Architectures. Ki Cambridge UNIVERSITY PRESS. Hassan Gomaa SOFTWARE MODELING AND DESIGN UML, Use Cases, Patterns, and Software Architectures Hassan Gomaa George Mason University, Fairfax, Virginia Ki Cambridge UNIVERSITY PRESS Contents Preface P"U

More information

EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture)

EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture) EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture) Dept. of Computer Science & Engineering Chentao Wu wuct@cs.sjtu.edu.cn Download lectures ftp://public.sjtu.edu.cn User:

More information

B.H. Far

B.H. Far SENG 401 Analysis and Design of Large Scale Software II Chapter 5: Architectural Patterns (Styles) Department of Electrical & Computer Engineering, University of Calgary B.H. Far (far@ucalgary.ca) http://www.enel.ucalgary.ca/people/far/lectures/seng401/

More information

Curriculum 2013 Knowledge Units Pertaining to PDC

Curriculum 2013 Knowledge Units Pertaining to PDC Curriculum 2013 Knowledge Units Pertaining to C KA KU Tier Level NumC Learning Outcome Assembly level machine Describe how an instruction is executed in a classical von Neumann machine, with organization

More information

Chapter 5 Concurrency: Mutual Exclusion and Synchronization

Chapter 5 Concurrency: Mutual Exclusion and Synchronization Operating Systems: Internals and Design Principles Chapter 5 Concurrency: Mutual Exclusion and Synchronization Seventh Edition By William Stallings Designing correct routines for controlling concurrent

More information

The name of the Show What will you enjoy learning?

The name of the Show What will you enjoy learning? The Day of celebration The name of the Show What will you enjoy learning? 1 The tale of programming A walk down the memory lane! 1) Programming - How did it all start and evolve? 2) What should you learn

More information

CS201 - Introduction to Programming Glossary By

CS201 - Introduction to Programming Glossary By CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with

More information

Computer System Overview

Computer System Overview Computer System Overview Introduction A computer system consists of hardware system programs application programs 2 Operating System Provides a set of services to system users (collection of service programs)

More information

System Design. Design: HOW to implement a system

System Design. Design: HOW to implement a system System Design Design: HOW to implement a system Goals: Satisfy the requirements Satisfy the customer Reduce development costs Provide reliability Support maintainability Plan for future modifications 1

More information