Dhananjai M. Rao CSE Department, Oxford, OHIO Using C++11 to teach Concurrency and Parallelism Concepts.

Slides:



Advertisements
Similar presentations
C++ Language Fundamentals. 2 Contents 1. Introduction to C++ 2. Basic syntax rules 3. Declaring and using variables.
Advertisements

Brown Bag #2 Advanced C++. Topics  Templates  Standard Template Library (STL)  Pointers and Smart Pointers  Exceptions  Lambda Expressions  Tips.
What is an operating system? Is it software?
NSF/TCPP Early Adopter Experience at Jackson State University Computer Science Department.
Hong Lin Computer and Mathematical Sciences University of Houston – Downtown Teaching Parallel and Distributed Computing Using a Cluster Computing Portal.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Systems Programming Course Gustavo Rodriguez-Rivera.
Course Map The Java Programming Language Basics Object-Oriented Programming Exception Handling Graphical User Interfaces and Applets Multithreading Communications.
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science Computer Systems Principles C/C++ Emery Berger and Mark Corner University of Massachusetts.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
JAVA v.s. C++ Programming Language Comparison By LI LU SAMMY CHU By LI LU SAMMY CHU.
© 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 1 Concurrency in Programming Languages Matthew J. Sottile Timothy G. Mattson Craig.
What is Concurrent Programming? Maram Bani Younes.
Intro. to Game Programming Want to program a game?
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
Advanced Java New York University School of Continuing and Professional Studies.
Sadegh Aliakbary Sharif University of Technology Spring 2011.
Humboldt University Berlin, University of Novi Sad, ‘Polytehnica’ University of Timisoara, University of Plovdiv, University of Belgrade DAAD project “Joint.
11 Getting Started with C# Chapter Objectives You will be able to: 1. Say in general terms how C# differs from C. 2. Create, compile, and run a.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
 Computer Aided Software Engineering  The use of a computer system to aid in the creation of software  Used to reduce the amount of time required for.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
Scripting Languages Intro Jan Stelovsky, ICS 215.
Integrating Parallel and Distributed Computing Topics into an Undergraduate CS Curriculum Andrew Danner & Tia Newhall Swarthmore College Third NSF/TCPP.
Why Java? A brief introduction to Java and its features Prepared by Mithat Konar.
C O M P U T E R G R A P H I C S Jie chen Computer graphic -- OpenGL Howto.
Computer Programming 12 Mr. Jean March 19 th, 2013.
Sadegh Aliakbary Sharif University of Technology Fall 2012.
Chapter 1 Introduction to Computers and C++ Programming Goals: To introduce the fundamental hardware and software components of a computer system To introduce.
Early Adopter: Integrating Concepts from Parallel and Distributed Computing into the Undergraduate Curriculum Eileen Kraemer Computer Science Department.
1 2. Program Construction in Java Programming Fundamentals.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Practices of Integrating Parallel and Distributed Computing Topics into CS Curriculum at UESTC Guoming Lu University of Electronic Science and Technology.
What Is Java? According to Sun in a white paper: Java: A simple, object-oriented, network-savvy, interpreted, robust, secure, architecture-neutral, portable,
Operating System 2 Overview. OPERATING SYSTEM OBJECTIVES AND FUNCTIONS.
Copyright © Mohamed Nuzrath Java Programming :: Syllabus & Chapters :: Prepared & Presented By :: Mohamed Nuzrath [ Major In Programming ] NCC Programme.
1. An Introduction A Programming Language A Technology Java Development Kit Java API One Language: Three Editions Standard Edition Enterprise Edition.
Multi-Semester Effort and Experience to Integrate NSF/IEEE-TCPP PDC into Multiple Department- wide Core Courses of Computer Science and Technology Department.
Operating System 4 THREADS, SMP AND MICROKERNELS.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Boris Milašinović Faculty of Electrical Engineering and Computing University of Zagreb, Croatia 15th Workshop on "Software Engineering Education and Reverse.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 OS 1.
Types of Software Chapter 2.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 4: Threads.
Fundamental Programming Fundamental Programming Introduction to Functions.
Generic Programming and Library Design Brian Bartman
Software Engineering Algorithms, Compilers, & Lifecycle.
1 Sections Java Virtual Machine and Byte Code Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Lesson 2: First Java Programs. 2.1 Why Java? Java is one of the most popular programming languages in the world. Java is a modern object-oriented programming.
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing.
Chapter 4: Threads Modified by Dr. Neerja Mhaskar for CS 3SH3.
Windows Programming Environments
Chapter 4: Multithreaded Programming
CSC207 Fall 2016.
ITCS-3190.
Mobile App Development
CASE STUDY 1: Linux and Android
Text by: Lambert and Osborne
An Introduction to Visual Basic
Henning Schulzrinne Advanced Programming
Chapter 4: Threads.
.NET and .NET Core Foot View of .NET Pan Wuming 2017.
Chapter 2: System Structures
CHAPTER 4:THreads Bashair Al-harthi OPERATING SYSTEM
What is Concurrent Programming?
Chapter 4: Threads & Concurrency
Introduction to Algorithms and Programming COMP151
Presentation transcript:

Dhananjai M. Rao CSE Department, Oxford, OHIO Using C++11 to teach Concurrency and Parallelism Concepts

Students consistently report steep, multifaceted learning curve and challenges due to: – Introduction of new programming language Prerequisite courses are predominantly taught in Java Students struggle with C-language – Initiation to Linux Course introduces Linux and predominantly uses a Command Line Interface (CLI) based laboratory environment – A Significant change from a Graphical User Interface (GUI) driven Windows™ platform – Introduction and extensive use of PDC concepts A paradigmatic change from the traditional serial programming that the students are conversant with. Motivation

In Fall 2012, C++11 was used instead of C to ameliorate the steep learning curves faced by students – Continue to build upon student’s object-oriented skills – Use STL data structures to ease programming – Encouraged use of standard algorithms Supports automatic multi-threading via compiler flags Permit the use of C++ lambdas (makes programming convenient and concise) – Enables seamless use of system calls exposed only in C language – C++11 provides many modern design patterns for managing concurrency and parallelism Threading constructs are very streamlined and straightforward – Simplified, stream-based I/O For console I/O, files, sockets, and IPC-pipes Proposed using C++ rather than C

Sample C++ Code Fragments using namespace std; int main() { promise prom; async(launch::async, thread1, 99999, std::ref(prom)); future result = std::async(launch::async, thread2, 50000, std::ref(prom)); // Do some foreground work here! cout << "Result = ” << result.get() << std::endl; return 0; } using namespace std; int main() { promise prom; async(launch::async, thread1, 99999, std::ref(prom)); future result = std::async(launch::async, thread2, 50000, std::ref(prom)); // Do some foreground work here! cout << "Result = ” << result.get() << std::endl; return 0; }

Pedagogical experiences indicate C++11 was effective in teaching concurrency and parallelism – It alleviated the steep learning curve experienced by students Permitted coverage of pointers and explicit dynamic memory management later in the course when students were already comfortable with C++. – Helped to focus on core concepts rather than routine problem solving aspects – Effective for covering modern design patterns related to parallelism and concurrency Many of the terms and concepts are portable to other popular programming languages – Eases use of OS system calls and other C-language API Student experience and feedback was very positive – Course evaluations were very positive: 3.38 (SD: 0.84) out of 4.0 – Department plans to use C++11 in Fall 2013 – If experiences and student feedback remain positive, then C++11 will be permanently adopted Conclusions