CS3331 Concurrent Computing
Course Information Page
Fall 2020
Course Instructor |
|
Dr. C.-K. Shene |
Office |
|
Rekhi 305 |
Class Meeting |
|
Monday and Wednesday 16:05 - 17:20
|
Classroom |
|
M&M U115
|
Office Hour |
|
Monday and Wednesday 15:05 - 15:55
|
Phone |
|
(906) 487-3392 |
e-mail |
|
shene@mtu.edu |
Most Recent Announcements is updated (December 4, 2020)
ThreadMentor FAQ (March 8, 2019)
Some Important Advises
- This course will use C and C++.
We will discuss C++ to some degree barely enough for our purpose.
Thus, you should get a good reference of C/C++ in hand.
- Always start doing your programming assignment
EARLY. Waiting until the last
few hours is definitely not a wise move, because there could be
too many people running their programs at the same time making system
response time extremely slow. Moreover, machines may crash
causing extra delay. Normally, I do not grant any extension
if your home machine, your phone line or the department machines
crash in the last minutes.
Always start early.
- Concurrent programming requires a careful planning, which may
need a mindset that is different from that of sequential programming
you learned in previous courses.
When you receive a programming assignment,
do not sit in front of a workstation and
start typing your program immediately. This
trial-and-error approach, in general,
DOES NOT work and may require longer time to finish
your assignment. The best way of doing concurrent programming
assignments is to think carefully with a pencil and a piece of
paper before touching a
computer keyboard.
- Since the behavior of a concurrent program is dynamic, which
means it acts differently from time to time, you should try to
reason about the correctness of your program. In general, just
running for one or two test cases is not sufficient. Our grader
will read your program to find possible errors. When writing
sequential programs, the same bug appears at the same place
every time you run the same program. However, bugs of a
concurrent program (e.g., race conditions and deadlocks)
may not appear every time. As a result, you may have an incorrect
program even though you may have had hundreds correct test runs.
- Due to security reasons, starting with Fall of 2008,
you will not receive submission confirmation e-mails.
As a result, you should use the interactive version of submit and ensure
all required files are submitted properly.
If you choose to use the command line version of submit, you should
use the recover command to verify your submission.
- After submitting your assignment,
DO NOT modify your files so that
the system administrator can retrieve your files in case your
submission did not go through successfully.
- Always read the assigned materials listed in the weekly reading lists
and do the problems. Weekly reading lists are available near
the bottom of this page.
Catalog Description
This course will discuss concepts and techniques in concurrent computing.
Major topics include:
processes and threads,
mutual exclusion,
semaphores,
monitors and condition synchronization,
deadlock, safety and liveness,
message passing,
and concurrent architectures.
Course Credits, etc.
Credits: 3.0, Lec-Rec-Lab: (0-3-0), Semesters Offered: Fall, Spring
Course Prerequisites
CS 1142 or (CS1141 and CS1040) and CS2311 and CS2321
Course Objectives and Learning Outcomes
- Know the basics of concurrent computing
- Understand the importance of race conditions
and the impact on synchronization and hence mutual exclusion
- Learn to argue and prove the correctness of simple mutual exclusion
based algorithms
- Be able to use modern synchronization primitives in your programs
- Learn to find race conditions and avoid deadlocks
Topics Covered
- Basic systems concepts important to concurrent computing
- Multi-process and multithreaded programming basics
- Race conditions, critical sections, and synchronization
- Pure software and hardware solutions and proof techniques for mutual exclusion
- Synchronization primitives (i.e., semaphores, mutex locks, monitors of Hoare and Mesa types,
basic message passing)
- Deadlocks and livelocks
- Survey of some languages (e.g., Java and Ada) and libraries (e.g., Pthreads)
Textbook
There is no suitable textbook for this course.
All slides used in class and supporting materials
are available:
- in the common directory
/classes/cs3331.ck/common
or /local/classes/cs3331.ck/common
or /mtu/classes/cs3331.ck/common
-
The class slides page is available if you prefer web access.
- Software tools and example programs are only available in the
common directory.
Check the /classes/cs3331.ck/common
directory or
the class slides page
frequently for new slides and other available stuffs.
Other Useful Materials
-
Make your program
-
Multithreaded Programming with
ThreadMentor
-
Solaris multithreaded programming
-
Unix Multiprocess Programming
-
Signals
-
Non-Local GOTO:
setjmp()
and
longjmp()
Meeting Time and Office Hours
|
Monday |
Tuesday |
Wednesday |
Thursday |
Friday |
13:05 - 13:55 |
|
Dept. Meeting
|
|
TPR Meeting |
|
14:05-15:05
|
|
|
|
|
|
15:05-15:30
|
|
|
|
|
Department Seminar
|
15:30-16:00
|
Office Hour Rekhi 305
|
|
Office Hour Rekhi 305
|
|
16:00-16:30
|
|
|
|
16:35-17:50
|
CS3331 Fisher 325 |
|
CS3331 Fisher 325 |
|
|
After class and e-mail discussions are welcome
Course Syllabus
No. of Weeks
|
Course Topics
|
1 |
Basics |
1 |
Hardware and OS Stuffs |
3 |
Processes and Threads |
1 |
Critical Sections and Mutual Exclusion |
5 |
Synchronization |
Mutex Locks |
Semaphores |
Monitors |
Message Passing |
Race Conditions and Livelock/Deadlock |
2 |
Programming Language and System Supports |
1 |
Other Topics |
Important Dates
The following is a list of important dates.
The exam dates are fixed and will not change;
however, programming assignment due dates may be modified
based on the course pace.
Changes will be announced in class and on
the info page.
t
Week |
Date |
Day |
Time |
Event |
Week 4 |
February 3 |
Wednesday |
10pm |
Program 1 due |
Week 6 |
February 17 |
Wednesday |
Sync class |
Exam 1 (50 min) |
Week 7 |
February 26 |
Friday |
11pm |
Program 2 due |
Week 9 |
March 19 |
Friday |
11pm |
Program 3 due |
Week 10 |
March 24 |
Wednesday |
Sync class |
Exam 2 (50 min) |
Week 11 |
April 2 |
Friday |
11pm |
Program 4 due |
Week 13 |
April 16 |
Friday |
11pm |
Program 5 due |
Week 14 |
April 23 |
Friday |
11pm |
Program 6 due |
Final Week |
April 26 |
Monday |
5-7pm |
Final (2 hours)
|
Date/Time changes will be announced in class.
Usually, I will follow the schedule shown above.
Weights Assigned to Programs
We will have maximum six programming assignments.
Program 1 |
Program 2 |
Program 3 |
Program 4 |
Program 5 |
Program 6 |
50 |
100 |
50 |
100 |
100 |
70 |
Weights Assigned to Exams
Exam 1 |
Exam 2 |
Final |
100 |
100 |
200 |
Note that quizzes are not listed above.
Pop quizzes will take place when I see they are needed.
Pop quizzes are always short exams testing if you have acquired the most basic
knowledge of each topic.
As a result, they usually take place about one week after a major topic
is completely discussed.
However, it does not mean every topic will have a quiz.
Grading
The theory part has two midterm exams and some quizzes.
The sum of the scores you will obtain has a 50% weight.
The programming part has five to six assignments, depending on
our progress.
The sum of the scores you will obtain constitutes the other 50%.
Grading will be based approximately on the scale shown in the table below.
Grade |
A |
AB |
B |
BC |
C |
CD |
D |
F |
Scale |
90-100%
| 85-89%
| 80-84%
| 75-79%
| 70-74%
| 65-69%
| 60-64%
| 0-59%
|
In addition, you will not receive a passing grade in
the course unless you receive a passing grade on the
exams alone (i.e., 60%). Likewise, you will
not receive a passing grade in the course unless you
receive a passing grade on the programming assignments
alone (i.e., 60%).
Late Policy
No late programming assignments will be graded,
except that you have a valid excuse.
Collaboration and Cheating
No assignment-specific assistance should
be given nor received on any programming assignment.
Any outside help concerning the use of the computer
facilities is acceptable. You may discuss the meaning
or intent of an assignment, but not ways to program it.
All work turned in must be completely your own.
You must not share code or even outlines!
Any and all use of programs from other texts or
references must be explicitly stated as part of program documentation.
In general, any acts of plagiarism will result in a
failing grade for the course along with the submission
of a report to the Dean of Students. See the hand-out
on
Computer Science Policy on Cheating and
Academic Integrity Resource Center for more details.
Exams and Final
You are responsible for avoiding exam time conflicts!!
ADA
``MTU complies with all federal and state laws and
regulations regarding discrimination, including the
Americans with Disability Act of 1990 (ADA).
If you have a disability and need a reasonable
accommodation for equal access to education or services
at MTU, please call Dr. Bonnie B. Gorman, Dean
of Students, (2212).
For other concerns about discrimination, you may contact your advisor,
department head, or the Affirmative Action Office (3310).''
The following two web sites may provide you with more information:
Other Useful Information
Downloadable Stuffs
Files are in HTML or PDF format.
-
Programming Information
-
How to Submit Programs (Thank You, Yuchen Wang)
-
How to Install VM and ThreadMentor (Thank You, Yuchen Wang)
-
ThreadMentor Visualization (Thank You, Yuchen Wang)
-
Programming Assignment I
-
Programming Assignment II
-
Programming Assignment III
-
Programming Assignment IV
-
Programming Assignment V
-
Programming Assignment VI
-
Exam Information
-
Exam 1 Solutions (PDF file)
-
Exam 2 Solutions (PDF file)
-
Reading Lists
You are visitor
since January 16, 2011
Last update: December 4, 2020
Please send comments and suggestions to
shene@mtu.edu