Lecture 11: Parallel Design Patterns, Where to in Term 2 … Lecturer: Simon Winberg.

Slides:



Advertisements
Similar presentations
Lectures on File Management
Advertisements

Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Lecturer: Simon Winberg Lecture 18 Amdahl’s Law & YODA Blog & Design Review.
Chapter 6 Problem Solving and Algorithm Design. 6-2 Chapter Goals Determine whether a problem is suitable for a computer solution Describe the computer.
Case Tools Trisha Cummings. Our Definition of CASE  CASE is the use of computer-based support in the software development process.  A CASE tool is a.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
System Design and Analysis
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Chapter 1 Software Development. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. 1-2 Chapter Objectives Discuss the goals of software development.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Testing an individual module
EE694v-Verification-Lect5-1- Lecture 5 - Verification Tools Automation improves the efficiency and reliability of the verification process Some tools,
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Chapter 2- Software Process Lecture 4. Software Engineering We have specified the problem domain – industrial strength software – Besides delivering the.
Introduction to Software Testing
SystematicSystematic process that translates quality policy into measurable objectives and requirements, and lays down a sequence of steps for realizing.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 17 Slide 1 Extreme Programming.
Introduction to Systems Analysis and Design Trisha Cummings.
System Testing There are several steps in testing the system: –Function testing –Performance testing –Acceptance testing –Installation testing.
Systems Analysis – Analyzing Requirements.  Analyzing requirement stage identifies user information needs and new systems requirements  IS dev team.
Managing the development and purchase of information systems (Part 1)
Software Engineering 2003 Jyrki Nummenmaa 1 REQUIREMENT SPECIFICATION Today: Requirements Specification Requirements tell us what the system should.
SE-02 SOFTWARE ENGINEERING LECTURE 3 Today: Requirements Analysis Requirements tell us what the system should do - not how it should do it. Requirements.
CMSC 345 Fall 2000 Unit Testing. The testing process.
Data Structures & AlgorithmsIT 0501 Algorithm Analysis I.
Lecture 14 Reconfigurable Computing Basics Lecturer: Simon Winberg.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Software Engineering – University of Tampere, CS DepartmentJyrki Nummenmaa REQUIREMENT SPECIFICATION Today: Requirements Specification.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
CSE 219 Computer Science III Program Design Principles.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
Developing software and hardware in parallel Vladimir Rubanov ISP RAS.
Intermediate 2 Software Development Process. Software You should already know that any computer system is made up of hardware and software. The term hardware.
UHD::3320::CH121 DESIGN PHASE Chapter 12. UHD::3320::CH122 Design Phase Two Aspects –Actions which operate on data –Data on which actions operate Two.
Requirements Engineering Methods for Requirements Engineering Lecture-30.
Historical Aspects Origin of software engineering –NATO study group coined the term in 1967 Software crisis –Low quality, schedule delay, and cost overrun.
The Software Development Process
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
OHTO -01 SOFTWARE ENGINEERING LECTURE 3 Today: Requirements Analysis Requirements tell us what the system should do - not how it should do it.
Chapter 17 – Object- Oriented Design. Chapter Goals To learn about the software life cycle To learn about the software life cycle To learn how to discover.
Data Structures Using C++ 2E
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Lecture 13.  Failure mode: when team understands requirements but is unable to meet them.  To ensure that you are building the right system Continually.
CS223: Software Engineering Lecture 4: Software Development Models.
Chapter 1 Software Engineering Principles. Problem analysis Requirements elicitation Software specification High- and low-level design Implementation.
1)History of water fall model. 2)Features of water fall model. 3)Phase of water fall model. 4)Brief description of phases. 5)Advantages. 6)Disadvantages.
Threaded Programming Lecture 1: Concepts. 2 Overview Shared memory systems Basic Concepts in Threaded Programming.
Unit – I Presentation. Unit – 1 (Introduction to Software Project management) Definition:-  Software project management is the art and science of planning.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
1 SYS366 Week 1 - Lecture 1 Introduction to Systems.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Lecture 1 Golden Measure and other terms (appropriate for pracs) Lecturer: Simon Winberg Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
MANAGEMENT INFORMATION SYSTEM
Computer Hardware What is a CPU.
Algorithms and Problem Solving
Basic Computer Organization and Design
Processes and threads.
Component and Deployment Diagrams
Software Quality Engineering
Lecture 09:Software Testing
Objective of This Course
Verification and Validation Unit Testing
Algorithms and Problem Solving
Dealing with reading assignments
Presentation transcript:

Lecture 11: Parallel Design Patterns, Where to in Term 2 … Lecturer: Simon Winberg

 Parallel design patterns  Terms  Where to in Term 2 11 April: 2pm: Quiz 2 3pm: Presentation on RRSG 4 th year topics &

 Program design pattern  A general, reusable solution to a commonly occurring software design problem.  A design pattern is usually not a complete design that is directly transformed into code.  A design pattern is more a description or template describing how a design problem can be solved for a wide range of instances. Object-oriented design patterns (i.e. C++ and Java) often involve classes, possibly class templates, which comprise initial attributes, methods and relationships between classes. These can be inherited and incorporated into a new application using a little additional code, and without re-implementing the entire pattern.

 Pipeline  Replicate & Reduce  Repository  Divide & conquer  Master/slave  Work queues  Producer/consumer flows Other patterns and details:

 “Parallel Programming Patterns” (PowerPoint presentation) by Eun-Gyn Kim, Available at: P/patterns/patterns.ppt P/patterns/patterns.ppt  Copy has been placed on Vula, see Readings folder in resources

Quick overview of Common patterns EEE4084F

Master/Slave slaves master Master dispatches processing jobs to slaves. Slaves either store results (locally or to communal storage) or send results back to master.

Work queues Producer Consumer work Shared Queue Producers create new work jobs that need to be performed at a later stage. These jobs are removed from the queue by consumers, on a first come first served basis, and completed by the consumer. Results may be dispatched to further processing or somehow integrated towards the end of the program.

Produce/consumer flows ProducerConsumer ProducerConsumer ProducerConsumer Parallel tasks: The producer consumer flows pattern is similar to the work queues, except each procedure is coupled with a consumer, without going through a queue. This approach may work better if the producer and consumer need some form of collaboration (e.g., making decisions, etc) before the consumer starts work. For example the producer may ‘discuss’ with the consumer where its results are going to be stored and negotiate the process speed and QoS required.

Replicate & reduce Initiator … Master/global storage Local storage REPLICATE Task A REDUCE Solution Task B Task X Starts by copying the data to local storage for each node, which is then operated on by the tasks. Results are collected to form the solution.

Repository pattern Various computations applied to and/or saved to data in a central repository. Repository controls access and maintains consistency, e.g. same task cannot work on same data items at the same time. Communal repository … Task A Task C Task X Task B Task C asynchronous access

Divide and conquer Initiator / Main problem Task 1 (handles sub-problem) Task 2 (handles sub-problem) divide Task 1.1 (handles sub-problem) Task 1.2 (handles sub-problem) Task 2.1 (handles sub-problem) Task 2.2 (handles sub-problem) divide Task 1 (merging solutions) merge divide Task (handles sub-problem) Task (handles sub-problem) Solution (problem Conquered!) merge … Many ways this can be implemented. A common method: any task(e.g., Task 1) that has too much work to do splits into two or more subtasks (e.g., Task 1.1 and Task 1.2) which then do the work in parallel, send the results back to Task 1 and then Task 1 merges the results and either sends its result back the initiator or to a task that it has been commanded to return its results to. Note, often Task 1.1 would actually be Task 1 (i.e. it spans off helpers but also done some of the work itself).

Where to in term 2 EEE4084F Digital Systems

 Term 2 involves:  The YODA Project (design, implement and test Your Own Digital Accelerator)  FPGA-based application accelerators  Reconfigurable computing  More hardware & HDL issues

Some terminology… EEE4084F

 An add-on card (or reconfigurable co- processor) used to speed up processing for a particular solution  A GPU is a typical example

 An application accelerator may well be a type of computer system itself – possibly a stand-alone network-linked computer  Generally, it is assumed to be an add- on card or peripheral that software on a host PC wants to connect to in order to delegate processing operations

 Verification  Validation  Testing  Correctness proof These terms are not merely theoretical terms to remember, but relate directly to your project. Not something done in the project (but if you want to, you can experiment with doing a correctness proof if you are keen)

 Two terms you should already know…  Verification  “Are we building the product right?”  Have we made what we understood we wanted to make?  Does the product satisfy its specifications?  Validation  “Are we building the right product?”  Does the product satisfy the users’ requirements  Verification before validation (except in duress)… Sommerville, I. Software Engineering. Addison-Wesley, While it would be nice to be able to validate before verifying, doing so would mean your specifications and design may be wrong in the final version (obviously this sometimes happens in practice due to insufficient time for proper validation)

 The RC engineer (i.e., you) are effectively designing both custom hardware and custom software for the RC platform  Before attempting to make claims about the validity of your system, it’s usually best practice to establish your own (or team’s) confidence in what your system is doing, i.e. be sure that:  The custom hardware working;  The software implementation is doing what it was designed to do; and  The custom software runs reliably on the custom hardware.

 Checking plans, documents, code, requirements and specifications  Is everything that you need there?  Algorithms/functions working properly?  Done during phase interval (e.g., design => implementation)  Activities:  Review meetings, walkthroughs, inspections  Informal demonstrations Focus of project Focus of project

1. Duel processing, producing two result sets 1. One version using PC & simulation only; 2. Other version including RC platform 2. Assume the PC version is the correct one (i.e., the gold measure) 3. Correlate the results to establish correlation coefficients (complex systems may have many different sets of possibly multidimensional data that need to be compared) The correlation coefficients can be used as a kind of ‘confidence factor’

 Testing of the whole product / system  Input: checklist of things to test or list of issues that need to have been provided/fixed  Towards end of project  Activities:  Formal demonstrations  Factory Acceptance Test Focus of project

 Testing  Generally refers to aspects of dynamic validation in which a program is executed and the results analysed  Correctness proofs / formal verification  More a mathematical approach  Exhaustive test => specification guaranteed correct  Formal verification of hardware is especially relevant to RC. Formal methods include:  Model checking / state space exploration  Use of linear temporal logic and computational tree logic

 General definition of “correlation”:  Correlation determines whether values of one variable are related to another  Variables: PC/gold program; RC program  Obviously, its probably still a good idea, before going to the effort of correlation results, to visually inspect the target system (RC platform) results to see if they look sufficiently close to what is expected.

 Independent variables:  Can be controlled or manipulated (i.e., the software and custom RC hardware)  Input data for your program  Processing tasks to perform  Dependent variables  Variables that you cannot manipulate  Value of these variables are dependent on the independent variables

 A correlation is performed by a set of comparisons (seeing how one variable changes as others variables change) *  Correlation coefficient ( r ):  A measure for the direction and strength of a relation between two variables (say x and y )  r is a value between -1 and +1  Positive vs. negative correlation… * Made easier if you know which are dependent and independent variables

 Correlation coefficient ( r ):  x correlated with y  r = +1 : perfect correlation. As x changes, y changes in the same proportionate magnitude and direction  r = -1 : total negative correlation. As x changes, y changes in same proportionate magnitude but opposite direction  r = 0 : no correlation. Week or non-existent relationship between x and y  | r | < 1  varying degrees of correlation r( x, y )

Short Exercise What sort of design pattern would suite such a device? Considering there would be a PC sending requests 1000s of requests and receiving paired results (input:output) in an unblocking manner (as illustrated above). If you went the way of a designing a processor core to do this and have multiple of these cores on the digital accelerator, what instructions would each core execute? What other parts would be needed to make it a functional system? Do some rough diagrams and discuss with your class mates. Think of designing an application accelerator for calculating Fibonacci numbers. PC Fib device 4 4,5

 The Project and  Intro to reconfigurable computers 11 April : presentation on RRSG 4 th year topics & Quiz 2