Limited Time and Experience: Parallelism in CS1 Fourth NSF/TCPP Workshop on Parallel and Distributed Computing Education (EduPar-14) Steven Bogaerts.

Slides:



Advertisements
Similar presentations
CSE 160 – Lecture 9 Speed-up, Amdahl’s Law, Gustafson’s Law, efficiency, basic performance metrics.
Advertisements

MINJAE HWANG THAWAN KOOBURAT CS758 CLASS PROJECT FALL 2009 Extending Task-based Programming Model beyond Shared-memory Systems.
Distributed Systems CS
Concurrency The need for speed. Why concurrency? Moore’s law: 1. The number of components on a chip doubles about every 18 months 2. The speed of computation.
1 Chapter 1 Why Parallel Computing? An Introduction to Parallel Programming Peter Pacheco.
Android 1: Seminar Background for King Naresuan University Kirk Scott 1.
Parallel Programming Motivation and terminology – from ACM/IEEE 2013 curricula.
The University of Georgia Department of Computer Science Department of Computer Science Introducing Parallelism through Sorting Integrating Concepts from.
Engaging Students in the First Year Computer Literacy Course with Self- Paced, Flexible, Online Instruction Mava Wilson, PhD Bill Jaber, PhD Department.
Saul Greenberg CPSC 481 Foundations and Principles of Human Computer Interaction James Tam.
Using MyMathLab Features You must already be registered or enrolled in a current class.
Intro to Threading CS221 – 4/20/09. What we’ll cover today Finish the DOTS program Introduction to threads and multi-threading.
CS 425 / ECE 428 Distributed Systems Fall 2014 Indranil Gupta (Indy) Lecture 25: Distributed Shared Memory All slides © IG.
Chapter 2: Processes Topics –Processes –Threads –Process Scheduling –Inter Process Communication (IPC) Reference: Operating Systems Design and Implementation.
Programming 1 Feedback Session. The unit has improved my understanding of programming. 1.Strongly Agree 2.Agree 3.Neutral 4.Disagree 5.Strongly Disagree.
S. RossEECS 40 Spring 2003 Lecture 28 Today… Analyzing digital computation at a very low level! The Latch Pipelined Datapath Control Signals Concept of.
Some distinctions… Team Exercises 1 & 2 COBAE Options Presentations Ethics Cases LDC Core Cases Coaching Sessions Presentation Day.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Using MyMathLab Features You must already be registered or enrolled in a current MyMathLab class in order to use MyMathLab. If you are not registered or.
G Robert Grimm New York University Scheduler Activations.
Introduction to Computing By Engr. Bilal Ahmad. Aim of the Lecture  In this Lecture the focus will be on Technology, we will be discussing some specifications.
Studying Test Taking Communicating with your Professors Preparing Physically.
Computer Science 102 Data Structures and Algorithms V Fall 2009 Lecture 1: administrative details Professor: Evan Korth New York University 1.
Operating Systems CSE 411 CPU Management Sept Lecture 11 Instructor: Bhuvan Urgaonkar.
New experiences with teaching Java as a second programming language Ioan Jurca “Politehnica” University of Timisoara/Romania
Lecture 4: Parallel Programming Models. Parallel Programming Models Parallel Programming Models: Data parallelism / Task parallelism Explicit parallelism.
Assignment Task 3: Teacher Resource Living & Learning with Technology EDN
1 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to.
CS 162 Discussion Section Week 1 (9/9 – 9/13) 1. Who am I? Kevin Klues Office Hours:
COP 3530: Data Structures, Algorithms, & Applications Instructor: Kristian Linn Damkjer.
How to do Quality Research for Your Research Paper
Integrating Parallel and Distributed Computing Topics into an Undergraduate CS Curriculum Andrew Danner & Tia Newhall Swarthmore College Third NSF/TCPP.
Please initial the appropriate attendance roster near the door. If you are on the Wait List you will find your name at the bottom. If you are not on the.
'Learner Autonomy through the production of a public history resource' Emma Robertson.
Essay and Report Writing. Learning Outcomes After completing this course, students will be able to: Analyse essay questions effectively. Identify how.
Hands-On Exploration of Parallelism for Absolute Beginners With Scratch Steven Bogaerts Department of Mathematics & Computer Science Wittenberg University.
Performance Measurement n Assignment? n Timing #include double When() { struct timeval tp; gettimeofday(&tp, NULL); return((double)tp.tv_sec + (double)tp.tv_usec.
Performance Measurement. A Quantitative Basis for Design n Parallel programming is an optimization problem. n Must take into account several factors:
Widespread Integration of Parallelism Steven Bogaerts.
Parallel Processing Sharing the load. Inside a Processor Chip in Package Circuits Primarily Crystalline Silicon 1 mm – 25 mm on a side 100 million to.
Dr. Kelly Bruning 1. 2 If you have any trouble in seminar, please call Tech Support at: They can assist if you get “bumped” from the seminar.
Games Development 2 Review & Revision Strategy CO3301 End of Semester 1.
Lecture 20: Parallelism & Concurrency CS 62 Spring 2013 Kim Bruce & Kevin Coogan CS 62 Spring 2013 Kim Bruce & Kevin Coogan Some slides based on those.
Using Alice in an introductory programming course for non-CS majors Adelaida A. Medlock Department of Computer Science Drexel University
CIS 644 Thus. Oct. 28, 1999 W10B … misc. questions … thread, Runable … communication patterns.
CS- 492 : Distributed system & Parallel Processing Lecture 7: Sun: 15/5/1435 Foundations of designing parallel algorithms and shared memory models Lecturer/
A Puzzle for You. Puzzle Someone is working for you for 7 days You have a gold bar, which is segmented into 7 pieces, but they are all CONNECTED You have.
CS527 Topics in Software Engineering (Software Testing and Analysis) Darko Marinov August 30, 2011.
Advanced Computer Networks Lecture 1 - Parallelization 1.
CS 425/ECE 428 Distributed Systems Nitin Vaidya. T.A.s – Persia Aziz – Frederick Douglas – Su Du – Yixiao Lin.
1 Lecture #24 Shared Objects and Concurrent Programming This material is not available in the textbook. The online powerpoint presentations contain the.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 4: Threads.
Teaching Parallelism in a Python- Based CS1 at a Small Institution Challenges, Technical and Non-Technical Material, And CS2013 coverage Steven Bogaerts.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Course Work 2: Critical Reflection GERALDINE DORAN B
The effects of physical activity on third grade math scores
Games Development 2 semester 1 Review & Revision
The effects of physical activity on third grade math scores
The University of Adelaide, School of Computer Science
Concurrent Graph Exploration with Multiple Robots
Lecture 26 A: Distributed Shared Memory
Introduction to Lower Division Core (LDC) Cases
Shared Memory Programming
Searching and Sorting Topics Sequential Search on an Unordered File
Stella Kakavouli & Panagiotis Metaxas Computer Science Department
Experiment with course materials concerning ‘Threads’
Prof. Leonardo Mostarda University of Camerino
Chapter 4: Threads & Concurrency
Lecture 26 A: Distributed Shared Memory
Instructor Provided Questions
Presentation transcript:

Limited Time and Experience: Parallelism in CS1 Fourth NSF/TCPP Workshop on Parallel and Distributed Computing Education (EduPar-14) Steven Bogaerts

Outline Context Details of topic coverage Evaluation

Parallelism in CS1 Benefit – See parallelism as a natural and common part of programming Challenge – Unique cognitive and technical issues

CS1 at DePauw Audience: Intended majors, minors, related disciplines, math-phobic Two sections, same parallelism outline, based on same pre/post test – Background, Moore’s Law, speedup expected, race conditions, locks, communication and coordination – Around week 12 out of 14

Two Sections: Differences Section A: – 28 students – ~4 hours on parallelism – Lecture, exercises, activities, analogies, brief Java implementation Section B: – 26 students – ~1.5 hours on parallelism – Primarily lecture, some brief exercises

Overview of Analogies and Exercises Parallelism in real life Clock speed Interprocess Communication Race Conditions Locks Join Java Implementation

Parallelism in Real Life If I can shovel my driveway in 1 hour, how long would you expect it to take if someone equally capable were helping me? Answer: 30 minutes Split up the task: easy Communication required: very little

Parallelism in Real Life If one person can dig a hole with a shovel in 100 seconds, how long would it take for 10 people to dig that hole? Answer: 80 seconds? Split up the task: hard Communication required: some

Parallelism in Real Life If I can run a company all by myself by working 100 hours per week, how much time do I need if I hire an assistant? Answer: 75 hours? Split up the task: hard Communication required: a lot

Parallelism in Real Life Lessons: – Task must be split up – Communication required for coordination – Can be much overhead Can explore more “real life” examples Briefly introduce parallel computation examples

Clock Speed Measuring the speed of a processor Why not just make the clock tick faster? Analogy: Make a peanut butter and jelly sandwich at the rate of: – 1 per hour – 1 per minute…? – 1 per second…??!? One technology improvement: smaller transistors (Moore’s Law) Leading into increased prevalence of parallelism today

Interprocess Communication Analogy: friend and I count how many people are in a building Communication options: 1.”I’ve counted 27 people in the basement. Please go count the other floors and determine the total.” (Passing data at process creation) 2.”I’ll count the basement, you count the other floors. Whenever you finish a floor, send me a text message with that result. I’ll merge your results with mine.” (Message-passing) 3.”I’ll count the basement, you count the other floors. Whenever you finish a floor, open up our shared Google Doc. Add what you just counted to the total already in the doc, and erase the old total. I’ll do the same as I go.” (Shared memory)

Interprocess Communication Card sorting activity – Group A (sequentialism): 1 person (processing element) 1 sheet of workspace (RAM) – Group B (message passing parallelism): 2 people (processing elements) Each with 1 sheet of workspace (RAM) Communicate only via message passed by a 3 rd person – Group C (shared memory parallelism): 2 people (processing elements) 1 sheet of workspace (RAM)

Interprocess Communication: Observations Much variation in which group finishes first. Sequentialism – No parallelism overhead, but work alone Message passing – Communication was a little slower Shared memory – Faster communication, but can more easily “mess up” each other’s work

Race Conditions x++ modeled as: 1.Get the value of x 2.Compute x+1 3.Store the result in x Processes A and B, two of many possibilities:

Locks Analogy: conch shell in Lord of the Flies

Join Confusion: which process is waiting? Analogy – Parent walking with a child – Child goes to pick flowers – Parent can go on a bit, but eventually must wait for child to join.

Java Implementation Hides a few Java- specific details – Runnable vs. Thread – Exceptions – Implement an interface ( run )

Evaluation Comparing two sections: – Section A: 4 hours, many analogies and exercises – Section B: 1.5 hours, mostly lecture Four opinion questions – Self-rated interest and ability in parallelism – Strongly Disagree to Strongly Agree Eight factual questions – Background, Moore’s Law, speedup expected, race conditions, locks, communication and coordination Pre-test – Beginning of semester, no course material covered yet Post-test – Last week of the semester

Pre-test: comparable neutrality Post-test: A shows stronger increase

Pre-test: comparable disagreement Post-test: A shows stronger increase

Pre-test: comparable agreement Post-test: A holding steady B drop

Pre-test: low performance all-around Post-test: A performance higher – Exception: question 2, a more difficult concurrency question that neither section had really covered

Summary and Conclusions Student learning – Both sections show evidence – Section A results stronger Student opinions – Section A students are more positive about the experience – Note: Overall course evaluations and grades were similar between the two sections It seems that, for better learning and more positive opinions: – The approach of A, while more time-intensive, is helpful to enable students to learn these concepts more effectively as introductory students. – If sufficient time is not available to cover deeply a given set of concepts, it may be preferable to reduce the size of the set, rather than cover the entire set at a more shallow level.