Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin...

15
Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin P. Sadayappan

Transcript of Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin...

Page 1: Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin P. Sadayappan.

Introducing Every CS Major to Parallel Programming:

Baby Steps at Ohio State

Gagan Agrawal

Feng Qin

P. Sadayappan

Page 2: Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin P. Sadayappan.

Context

Ohio State Moving to Semester System in 2012

o A very significant exercise in converting all degree programs

o CS undergrad programs developed almost from scratch

o All CSE and CIS undergrads will do exercises in parallelism and locality

Page 3: Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin P. Sadayappan.

This Talk

o Not Abouto Extensive coverage of parallelism for UGso New pedagogy of teaching parallelism

o Is About o Challenges of designing a CS Curriculao (Different) view-points of colleagues

o Not everyone thinks the way systems faculty does

o Some other challenges in preparing students for parallelism

Page 4: Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin P. Sadayappan.

Curriculum Design Process

o 10 faculty, lectures, students, advising staffo Met for 1 hour per week for about 15 weekso Various subcommittees formed

o Divide core into software, foundations, and systems

o Challenging/Contentious discussions

Page 5: Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin P. Sadayappan.

Outcome

o ~50 credits of CS divided into o 6 required courses

o Software I and IIo Systems I and II o Foundations I and II

o A junior project courseo A senior capstone course o 4 pick A or B pairso 4 other elective slots

Page 6: Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin P. Sadayappan.

Primary Drivers

o Larger core considered undesirableo Students should be able to take several graphics or

networking courses ..

o Project and Capstone considered very importanto Dividing core into Software, Foundations, and

Systems helped divide responsibilitieso SE faculty responsible for software, systems faculty

responsible for systems

Page 7: Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin P. Sadayappan.

More Details

o Software I and II o Java based o Strong component-based flavor o Strong SE bent (best practices in Java etc.)

o What is Missing o Any C/C++ o Pointers and memory discussiono Any performance considerations

Page 8: Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin P. Sadayappan.

Systems I and II

o Systems faculty in charge of it o Input: students with no C/pointer/memory

backgroundo Desired Coverage

o C programmingo Micro-architecture, organization, assembly programming o Operating System Topics o Multi-core hardware and softwareo Processor architecture and networking …

Page 9: Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin P. Sadayappan.

Tried to Negotiate

o Asked for more systems credits o Prepared a strong argument

o Multi-core hardware and software very important for everyone ..

o Got no traction from others o Argument that action has shifted to applications

o No option but to work within 6-7 credits

Page 10: Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin P. Sadayappan.

Final Outcome (Systems Courses)

o Systems I o C programming (pointers) o Computer Organization and Assembly

Programming

o Systems II o 10 weeks of operating systems topics o Parallel programming and locality management at

software level

Page 11: Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin P. Sadayappan.

Operating Systems at Ohio State

o A required quarter long course (3 quarter credits)o Covers traditional “theory” topics

o Processes, Memory, Devices

o Labs for o Programming with System Calls o Multi-threaded Programming

o Producer Consumer Etc. o No Kernel Programming

o Elective Operating Systems Lab Courseo Linux Kernel Programming

Page 12: Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin P. Sadayappan.

Systems II in Semesters

o Keep 10 week contents as they are o Add Multi-Core application development

o Build on Pthreads and Synchronization o Focus on extracting performance from simple applications

o Add application level locality managemento Exposure to Caches at Application Levelo Relate to VM treatment in a standard OS Course

o Use Bryant and O’Hallaron for new materialo Computer Systems: An Application Developer’s Perspective o Also our Text for Last 8 weeks of Systems I

Page 13: Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin P. Sadayappan.

Was It All Natural?

o Many found combination of topics strange!! o But

o Met our priority of material to covero Better than Just adding more OS Topicso Locality coverage important because architecture is now

an elective o The only opportunity to introduce parallelism we had

Page 14: Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin P. Sadayappan.

Other Observations from the Process

o Performance low in priority outside systems o SE Practices, Testing more important

o Many forces against preparing students for parallelismo No pointers/memory at early stages o Encapsulation/Components emphasized o Architecture coverage very limited

o Choice with Networking

Page 15: Introducing Every CS Major to Parallel Programming: Baby Steps at Ohio State Gagan Agrawal Feng Qin P. Sadayappan.

Other Questions

o Does it make sense to teach parallelism with Java or C#?

o If sequential performance is so limited, why bother with parallelism?

o Should we first teach parallelism with more abstractions?

o Is Pthreads too low level? o Can you really get performance just thinking of simple

iterators/ map-reduce etc.?