Concurrency Programming Chapter 2. The Role of Abstraction Scientific descriptions of the world are based on abstractions. A living animal is a system.

Slides:



Advertisements
Similar presentations
Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
Advertisements

Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
6-1 Chapter Goals Determine whether a problem is suitable for a computer solution Describe the computer problem-solving process and relate it to Polya’s.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
Software Testing and Quality Assurance
Chapter 9_3 Following Instructions: Principles of Computer Operation.
Computers: Tools for an Information Age
Why Behavioral Wait statement Signal Timing Examples of Behavioral Descriptions –ROM.
1 Sharing Objects – Ch. 3 Visibility What is the source of the issue? Volatile Dekker’s algorithm Publication and Escape Thread Confinement Immutability.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
8/5/2015\course\cpeg323-08F\Topic1.ppt1 Topic I Introduction to Computer Architecture and Organization.
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
What is Concurrent Programming? Maram Bani Younes.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Welcome Aboard – Chapter 1 COMP 2610 Dr. James Money COMP
CSET 4650 Field Programmable Logic Devices
Chapter 6 System Engineering - Computer-based system - System engineering process - “Business process” engineering - Product engineering (Source: Pressman,
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
University of Kansas Electrical Engineering Computer Science Jerry James and Douglas Niehaus Information and Telecommunication Technology Center Electrical.
Invitation to Computer Science 5 th Edition Chapter 9 Introduction to High-Level Language Programming.
Microsoft Visual Basic 2005: Reloaded Second Edition
The Role of Programming Languages Chapter 1: Programming Languages: Concepts and Constructs by Ravi Sethi.
Overview Introduction The Level of Abstraction Organization & Architecture Structure & Function Why study computer organization?
Chapter 1 What is Programming? Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E.
Week 4 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
Chapter 2 Section 1. Objectives Be able to define: science, scientific method, system, research, hypothesis, experiment, analysis, model, theory, variable,
SOFTWARE DESIGN (SWD) Instructor: Dr. Hany H. Ammar
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
Chapter 12 Computer Programming. Chapter Contents Chapter 12: Computer Programming 2  Section A: Programming Basics  Section B: Procedural Programming.
Introduction to Computer Application (IC) MH Room 517 Time : 7:00-9:30pm.
Week 4 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
Frameworks CompSci 230 S Software Construction.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
Shared Memory Consistency Models. SMP systems support shared memory abstraction: all processors see the whole memory and can perform memory operations.
1. 2 Preface In the time since the 1986 edition of this book, the world of compiler design has changed significantly 3.
The Software Development Process
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Concurrency Properties. Correctness In sequential programs, rerunning a program with the same input will always give the same result, so it makes sense.
Introduction to OOP CPS235: Introduction.
Chapter 2 Principles of Programming and Software Engineering.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
1 The user’s view  A user is a person employing the computer to do useful work  Examples of useful work include spreadsheets word processing developing.
Advanced Algorithms Analysis and Design
Advanced Computer Systems
Visit for more Learning Resources
CSCI-235 Micro-Computer Applications
Object-Orientated Programming
Ch. 11 Theory of Computation
Topic I Introduction to Computer Architecture and Organization
Objective of This Course
SME1013 PROGRAMMING FOR ENGINEERS
What is Concurrent Programming?
What is Concurrent Programming?
Chapter 1 Introduction.
HIGH LEVEL SYNTHESIS.
SME1013 PROGRAMMING FOR ENGINEERS
Programming.
What is Concurrent Programming?
Abstraction.
Basic Concepts of Algorithm
Computer Systems An Introducton.
The Role of Programming Languages
Presentation transcript:

Concurrency Programming Chapter 2

The Role of Abstraction Scientific descriptions of the world are based on abstractions. A living animal is a system constructed of organs, bones and so on. These organs are composed of cells, which in turn are composed of molecules, which in turn are composed of atoms, which in turn are composed of elementary particles. Scientists find it convenient (and in fact necessary) to limit their investigations to one level, or maybe two levels, and to "abstract away" from lower levels. Thus your physician will listen to your heart or look into your eyes, but he will not generally think about the molecules from which they are composed. There are other specialists, pharmacologists and biochemists, who study that level of abstraction, in turn abstracting away from the quantum theory that describes the structure and behavior of the molecules.

Abstraction in Computer Science Software engineers generally deal with at most three levels of abstraction: Systems and libraries Operating systems and libraries—often called Application Program Interfaces (API)—define computational resources that are available to the programmer. You can open a file or send a message by invoking the proper procedure or function call, without knowing how the resource is implemented. Programming languages A programming language enables you to employ the computational power of a computer, while abstracting away from the details of specific architectures. Instruction sets Most computer manufacturers design and build families of CPUs which execute the same instruction set as seen by the assembly language programmer or compiler writer. The members of a family may be implemented in totally different ways—emulating some instructions in software or using memory for registers—but a programmer can write a compiler for that instruction set without knowing the details of the implementation.

The list of abstractions can be continued to include logic gates and their implementation by semiconductors, but software engineers rarely, if ever, need to work at those levels. Certainly, you would never describe the semantics of an assignment statement like: x  y+z in terms of the behavior of the electrons within the chip implementing the instruction set into which the statement was compiled.

Abstraction Tools Two of the most important tools for software abstraction are: encapsulation. concurrency.

Encapsulation Encapsulation achieves abstraction by dividing a software module into a public specification and a hidden implementation. The specification describes the available operations on a data structure or real-world model. The detailed implementation of the structure or model is written within a separate module that is not accessible from the outside. Thus changes in the internal data representation and algorithm can be made without affecting the programming of the rest of the system. Modern programming languages directly support encapsulation.

Concurrency Concurrency is an abstraction that is designed to make it possible to reason about the dynamic behavior of programs. This abstraction will be carefully explained in the rest of this chapter. First we will define the abstraction and then show how to relate it to various computer architectures. The conclusion is that there are no important concepts of concurrency that cannot be explained at the higher level of abstraction.

Concurrent Execution as Interleaving of Atomic Statements The abstraction is based upon the concept of a (sequential) process, which we will not formally define. Consider it as a "normal" program fragment written in a programming language. You will not be misled if you think of a process as a fancy name for a procedure or method in an ordinary programming language.

Concurrent Program A concurrent program consists of a finite set of (sequential) processes. The processes are written using a finite set of atomic statements. The execution of a concurrent program proceeds by executing a sequence of the atomic statements obtained by arbitrarily interleaving the atomic statements from the processes. A computation is an execution sequence that can occur as a result of the interleaving. Computations are also called scenarios.

Computations Computations are created by interleaving, which merges several statement streams. At each step during the execution of the current program, the next statement to be executed will be "chosen" from the statements pointed to by the control pointers cp of the processes.

Computation During a computation the control pointer of a process indicates the next statement that can be executed by that process. Each process has its own control pointer.