-
Notifications
You must be signed in to change notification settings - Fork 26
/
syllabus.tex
265 lines (220 loc) · 9.89 KB
/
syllabus.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
\documentclass{article}
\usepackage{fullpage}
\usepackage{url}
\begin{document}
\title{ECE459: Programming for Performance, version 3\\Winter 2015}
\author{Patrick Lam}
\renewcommand{\today}{}
\maketitle
\vspace*{-2em}
\section*{Brief Overview}
Many modern software systems must process large amounts of data, either in the
form of huge data sets or vast numbers of (concurrent) transactions. This
course introduces students to techniques for profiling, rearchitecting, and
implementing software systems that can handle industrial-sized
inputs. These techniques will enable you to design and build
critical software infrastructure, especially in an age of Big Data.
While you may have seen some of these ideas in the context of
operating systems (ECE354/SE350/CS350) and concurrency (CS343), this course gives you tools to make code run
faster. The focus in OS is understanding and implementing the
primitives; our focus is on using them effectively.
We will sometimes see implementation details that you need to get right to write
certain applications, but as with any university-level course, this course
focusses more on the concepts than magic invocations, so that you can continue
to apply the basic ideas after the technologies inevitably change.
\paragraph{Objectives.} More specifically, after this course you will be able to:
\begin{itemize}
\item investigate a software architecture, propose ways to improve its performance, and estimate the impact of your changes;
\item understand what the compiler is doing to automatically improve
your code's performance, both in terms of regular optimizations and
automatic parallelization;
\item use common mechanisms to manually exploit parallelism: manual
specification of parallelism (e.g. OpenMP); multithreading (and
locks); asynchronous I/O; vectorization (including GPU programming); and distributing
the problem over many systems (e.g. via MapReduce).
\end{itemize}
\section*{General Information}
\noindent
\begin{tabbing}
{\bf Course Website:} \={\tt http://patricklam.ca/p4p}\\[0.5em]
github: \> \url{https://github.com/patricklam/p4p-2015.git}
\end{tabbing}
The primary source for course materials is github.
\noindent {\bf Schedule:}
\\
\noindent
\hspace*{2em} \begin{tabular}{llll}
Lectures & MWF & 9:30 -- 10:20 & RCH 302\\
Midterm & F & March 6 \\
& & 18:30-20:00
\end{tabular}
\noindent
Although there is a time slot for tutorials, I do not anticipate using it.
\newpage
\noindent
{\bf Instructor:} \\
\noindent
\hspace*{2em} \begin{minipage}{.6\textwidth}
Patrick Lam\\
Office: DC2597D or DC2534 \\
Office Hours: Wednesdays 10:30-12:30, or by appointment\\
Email: {\tt [email protected]}\\
\end{minipage} \\[1em]
\noindent {\bf Teaching Assistants:} \\
\noindent
\begin{tabular}{ll}
\hspace*{2em} \begin{minipage}{.4\textwidth}
Xi Cheng\\
Email: {\tt [email protected]}
\end{minipage} &
\hspace*{2em} \begin{minipage}{.4\textwidth}
Morteza Nabavi\\
Email: {\tt [email protected]}
\end{minipage} \\[3em]
\hspace*{2em} \begin{minipage}{.4\textwidth}
Saeed Nejati\\
Email: {\tt [email protected]}
\end{minipage} &
\hspace*{2em} \begin{minipage}{.4\textwidth}
Husam Suleiman\\
Email: {\tt [email protected]}
\end{minipage}
\end{tabular}
\section*{Course Description}
\paragraph{Topics.} Here is a detailed list of topics and estimated lecture
hours for each topic.
\begin{tabular}{ll}
Introduction & 1.5 \\
Processor architecture and hardware threading & 1.5 \\
Threads, races, dependencies, locks, semaphores & 3 \\
Asynchronous I/O & 1.5 \\
Speculation, SIMD, parallelization patterns & 1.5 \\
Compilers, Optimizations and Automatic Parallelization & 3 \\
OpenMP & 3 \\
Memory ordering, fences, atomics, lock granularity, inlining & 3 \\
Cache coherence & 1 \\
Profiling for Performance & 1.5 \\
Distributed programming: MPI & 1.5\\
Programming GPUs: OpenCL & 3 \\
MapReduce \& Hadoop & 1.5 \\
Software Transactional Memory & 1.5 \\
Performance tweaks, loop perforation & 1.5 \\
High-performance Languages & 1.5 \\
Big Data & 1.5
\end{tabular}
\section*{Reference Material}
You might find this book useful.
\begin{quote}
Darryl Gove. Multicore Application Programming for Windows, Linux and Solaris. Addison-Wesley, 2010.
\end{quote}
\noindent
I will post reasonably complete lecture notes for the material
that I'm lecturing on.
\newpage
\section*{Evaluation}
This course includes assignments, a midterm, and a final
examination. Too many fourth-year courses have projects, so I'm not
going to pile on another project here.\vspace*{1em}
\begin{tabular}{l@{\hspace*{5em}}l}
Assignments & 60\% (4 at 15\% each) \\
Midterm & 10\% \\
Final exam & 30\% \\
\end{tabular}
\paragraph{Assignments.} Since this course has ``programming'' in the
title, you will be expected to write code for these assignments. Here
is a projected list of assignments for this course. I plan to have 4
assignments.
\begin{enumerate}
\item implementing manual parallelization for servers with Pthreads and C++11 asynchronous I/O;
\item using compiler-provided automatic parallelization and OpenMP;
\item identifying opportunities for optimization (e.g. parallelization) and implementing them; and
\item GPU programming with OpenCL.
\end{enumerate}
Assignment handin will be done via git.
\paragraph{Exams.} Exams will be open-book, open-notes, no electronics.
\paragraph{Schedule.}
Here are target assignment dates:
\vspace*{.5em}
\begin{tabular}{l@{~~~}lllll}
{\bf A1} & out& January 12 & due &February 2 \\
{\bf A2} & out& January 30 & due &February 13 \\
{\bf A3} & out& February 24 & due& March 10 \\
{\bf Midterm} && March 6\\
{\bf A4} & out& March 10 & due &April 6 \\
{\bf Final exam} && Exam period
\end{tabular}
\vspace*{1em}
\noindent
You can also find the dates on the following Google calendar:\\
\hspace*{3em}\url{[email protected]}
\noindent Even if I'm late getting an assignment out, you'll still have two weeks to do the assignment.
\paragraph{Group work.}
You may discuss assignments with others, but I expect each of you to
do each assignment independently (or with your assignment partner only). Acceptable collaboration includes
discussing ideas and structures with others, as well as helping others
debug their code. If your code is too close in structure to someone
else's code, you are going to have a problem. The best way to avoid
such problems is by (1) not sending your code around; and (2) not
writing down anything beyond general notes (pseudocode) about other
peoples' code. I will follow UW's Policy 71 if I discover any cases of
plagiarism (and I have).
\paragraph{Lateness.} You have 4 days of lateness to use on
submissions throughout the term. Each day you hand in something late
consumes one of the days of lateness. The fifth day of lateness causes
your lowest assignment mark to be halved, while the sixth day causes
both assignment marks to be halved. If you hand in something and you
have more than 6 days of lateness, I'll start converting marks to 0
and dropping the associated late days. You don't
get any credit for unused late days.
For example, you may hand in A1 one day late, A2 two days late, A3 1
one day late, and everything else on time. Or you can hand A2 four
days late, if you hand in everything else on time. Finally, if you
hand in A1 3 days late, A2 1 day late, A3 3 days late, and
everything else on time, I will either give you a 0 for A1, leaving you
with 4 late days, or give you a 0 for A2, leaving you with 5 late days
and causing your mark for A1 to be halved. I'll choose the option
which gives you more marks.
\newpage
\section*{Required inclusions}
{\bf Academic Integrity}: In order to maintain a culture of academic
integrity, members of the University of Waterloo community are
expected to promote honesty, trust, fairness, respect and
responsibility. [Check \url{www.uwaterloo.ca/academicintegrity/} for more
information.]
\vspace*{1em}\noindent
{\bf Grievance}: A student who believes that a decision affecting some
aspect of his/her university life has been unfair or unreasonable may
have grounds for initiating a grievance. Read Policy 70, Student
Petitions and Grievances, Section 4,
\url{www.adm.uwaterloo.ca/infosec/Policies/policy70.htm}. When in doubt
please be certain to contact the department’s administrative assistant
who will provide further assistance.
\vspace*{1em}\noindent
{\bf Discipline}: A student is expected to know what constitutes academic
integrity [check \url{www.uwaterloo.ca/academicintegrity/}] to avoid
committing an academic offence, and to take responsibility for his/her
actions. A student who is unsure whether an action constitutes an
offence, or who needs help in learning how to avoid offences (e.g.,
plagiarism, cheating) or about “rules” for group work/collaboration
should seek guidance from the course instructor, academic advisor, or
the undergraduate Associate Dean. For information on categories of
offences and types of penalties, students should refer to Policy 71,
Student Discipline,
\url{www.adm.uwaterloo.ca/infosec/Policies/policy71.htm}. For typical
penalties check Guidelines for the Assessment of Penalties,
www.adm.uwaterloo.ca/infosec/guidelines/penaltyguidelines.htm.
\vspace*{1em}\noindent
{\bf Appeals}: A decision made or penalty imposed under Policy 70 (Student
Petitions and Grievances) (other than a petition) or Policy 71
(Student Discipline) may be appealed if there is a ground. A student
who believes he/she has a ground for an appeal should refer to Policy
72 (Student Appeals)
\url{www.adm.uwaterloo.ca/infosec/Policies/policy72.htm}. Note for Students
with Disabilities: The Office for Persons with Disabilities (OPD),
located in Needles Hall, Room 1132, collaborates with all academic
departments to arrange appropriate accommodations for students with
disabilities without compromising the academic integrity of the
curriculum. If you require academic accommodations to lessen the
impact of your disability, please register with the OPD at the
beginning of each academic term.
\end{document}