National University of Singapore, School of Computing

CS 3211- Parallel and Concurrent Programming

Lesson Plan for 2012-13 Semester 2                        

DATES

Lecture  Summary 

Readings      

Resources

Week 1, 14 January Introductory Lecture Discussion on concurrency concepts, with the aid of a modeling language (Promela). Concepts of interleavings, shared variables, and message passing are introduced.

<Additional Saturday session - 2 hours to clarify concepts>

The chapter "An overview of Promela" from the book "The SPIN model checker" by Gerard Holzmann (posted in IVLE E-reserves).

 Lec1.pdf

Saturday session:

Sat1.pdf

Week 2, 21 January Multi-threaded Java Programming: A basic discussion of programming constructs for multi-threaded Java programming.

 

Lot of online tutorials exist such as  http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html Lec2.pdf
Week 3, 28 January Threads & Concurrent Execution:  We continue with Java threads and their concurrent execution in this lecture. There will be less focus on shared objects and ensuring of mutual exclusion in this lecture.

First Lab posted:  Lab1.pdf

Chapter 2,3 of textbook

 

Lecture:

Lec3.pdf

Tutorial:

Tut1.pdf

Week 4, 4 February Lecture cancelled, lecturer is away.  Tutorials continue as usual.

 

Tutorial: Tut2.zip

Week 5, 11 February Multi-threaded programming with shared objects: We finish the discussion on concurrent execution (Lec4-2.pdf) and move on to discussion on multi-threaded programming with locks.

<Additional Saturday session:  2 hours to clarify concepts>

Chapter 3,4 of textbook

Lecture:

 

Lec5

 

Tutorial:

Tut3

 

Saturday session:

 

Sat5.pdf

 

Week 6, 25 February Monitors: We discuss monitors as a structured concurrency control primitive in this lecture.

Second Lab posted:  Lab2.pdf

Chapter 5 of textbook

Lecture: Lec6

Tutorial: Tut4

                                                                                                     
Week 7, 4 March  

Midterm Examination (posted here, with solution)

Deadlocks in concurrent programming: The reasons for encountering deadlock in concurrent systems are discussed in this lecture.

 

Chapter 6 of textbook Tutorial: Tut5
Week 8, 11 March

 

Safety and Liveness issues in concurrent programming: So far we have studied specific properties to think of while writing concurrent programs - such as mutual exclusion and no deadlocks. In this lecture, we put them in proper perspective by presenting two general classes of properties, namely safety and progress. This will also conclude our discussion on concurrent programming, and we move on to parallel programming from the next week onwards.

 

Chapter 7 of textbook

Lecture: Lec8

Tutorial: Tut6

Week 9, 18 March

Message Passing: In this lecture, we discuss how to implement synchronous and asynchronous message passing in Java. This also provides a gentle glide for all of us from concurrent programming to parallel programming, since we will be learning parallel programming using the Message Passing Interface (MPI) specification from the next lecture.

Execution models of Parallel Programming: In the second hour of the lecture, we will discuss the basic concepts of parallel programming - in particular the execution models. This will be useful to understand before starting on hands-on parallel programming using MPI.

<Additional Saturday session:  2 hours, to clarify concepts>

 

Chapter 9 of textbook (for first part)

Lecture:

Lec9 (message passing)

Parallelism basics

 

Tutorial: Tut7

Saturday session:

Sat9.pdf

 

Week 10, 25 March

Parallel Programming using MPI --- We start our discussion on parallel programming in this lecture. Point to point communication is discussed. We start with discussion on blocking send-receives, and then move on to discussing non-blocking send-receives.

Chapter 7 of Principles of Parallel Programming by Lin and Snyder (posted in IVLE E-reserves). The online tutorial https://computing.llnl.gov/tutorials/mpi/ is also useful.

Lecture:  Lec10

Tutorial:  Tut8

Week 11, 1 April

 

<Complete remaining part from Lec10>

Parallel Programming using MPI --- We continue our discussion on parallel programming in this lecture. Point to point communication is completed, in particular our discussion on non-blocking send receives is completed. We start our discussion on collective communication primitives such as broadcast, scatter, gather and reduce.

Third and  last Lab postedLab3.pdf

 

Readings:  As in Week 10

Guidelines for accessing tembusu for MPI programming: tembusu-MPI-access.pdf

Lecture:Lec11

Tutorial: Tut9

Week 12, 8 April <Complete remaining part from Lec11>

Parallel Programming using MPI --- We complete our discussion of collective communication, and move on to process communicators.

As in Week 10 Lecture: Lec12

Tutorial: Tut10

Week 13, 15 April

Revision of all materials covered in the course: The lecture notes for this lecture will be posted after the lecture.

Final Examination is on May 3 2013, Afternoon.

All materials covered in the past 12 weeks.

Lecture: Lec13

 

Tutorial: Tut11