McMaster University

Software Design II -- Concurrent System Design
SFWRENG 3BB4

Emil Sekerinski, Term 1, 2023-2024

Outline

  • These pages contain only the course outline and installation instructions
  • Avenue is used for all announcements
  • jhub3bb4 is used for assignments and course notes, see Avenue
  • Lectures start on Thursday, September 7; tutorials start on Thursday, September 7 and Friday, September 8

Lectures:

  • Tuesdays, Thursdays, and Fridays 2:30 - 11:20 in KTH B135
  • All lectures are in-person, there is no live-streaming and no recording.

Tutorials:

  • As scheduled on Mosaic

Midterm Test:

    Tuesday, October 31, 2:30 - 3:20 (lecture time), PGCLL 127

Calendar Description:

    Processes, threads, concurrency; synchronization mechanisms, resource management and sharing; objects and concurrency; design, architecture and testing of concurrent systems.

Prerequisites ("precondition"):

  • SFWRENG 2AA4 Software Design I - Introduction to Software Development
  • SFWRENG 2FA3 Discrete Mathematics and Applications II

Learning Objectives ("postcondition"):

  1. You should know and understand

    1. the differences between the sequential and concurrent model of computation,
    2. the inherent difficulty of testing concurrent programs,
    3. basic techniques for verifying the correctness of concurrent programs,
    4. threads vs processes, and their implementation,
    5. semaphores, monitors, channels, rpc, and rendezvous for synchronization and communication,
    6. management of shared resources,
    7. architecture of concurrent and distributed systems,
    8. a number of design patterns for concurrent system.

  2. You should be able to

    1. implement and verify a solution to stated problems involving concurrency with shared memory and semaphores,
    2. design a modular solution to stated problems involving concurrency with monitors,
    3. design the communication structure to stated problems involving concurrency with synchronous and asynchronous channels,
    4. implement basic remote execution mechanisms,
    5. use static analysis tools to detect concurrency errors,
    6. recognize and apply concurrency design pattern.

Topics:

  • Program Verification and Static Analysis
  • Nature of Concurrency, Synchronization and Communication, Processes vs Threads, Safety and Liveness
  • Semaphores
  • Monitors and Condition Synchronization
  • Message Passing over Synchronous and Asynchronous Channels
  • Remote Procedure Call and Rendezvous
  • Coroutines and Futures

Text:

    The course is based on course notes, which are posted on jhub3bb4.

Software Tools:
    All coursework can be completed on jhub3bb4, for which a web browser is sufficient. However, you are encouraged to download the course notes and read them on your own computer. For this, you will need Python, Jupyter, Java, C, and Go, which can be downloaded for free, see installation instructions.

Expectations:
  • You are expected to attend all 3 hours of lecture each week. The lectures focus on the concepts and the theory, the tutorials give opportunity to practice.
  • You are expected to attend the 2-hour tutorial on Thursday or Friday each week. Each tutorial presents the solution to the previous week's assignment, reviews the previous week's course material, discusses the lab questions, introduces an assignment, and allows you to work on the assignment. In the first week, the tutorial will cover the installation of Python, Jupyter, Java, and Go. Assignment solutions are only discussed in the tutorials, they will not be posted.
  • You are expected to continue working on the introduced assignment on your own. The difficulty of the assignments varies, on average you should calculate with 5 hours. If you skip the tutorial and try to do it on your own, you may need significantly longer. The assignments are due the following Wednesday, which means that you have less than a week.
  • If you have questions, you should ask those at the tutorial, as likely others will benefit as well, rather than contacting the TAs or instructor directly. If you ask the TAs or instructor directly, we try to reply within 24 hours. We cannot reply immediately before due dates.


Evaluation

Assignments: 44%

    There are 12 assignments, each worth 4%, due weekly. The top 11 assignments count. This is meant to allow you to achieve a good grade in the assignments even if you are not able to complete one assignment satisfactorily: if you simply skip the first assignment, you are unlikely to catch up. Solutions to assignments are only discussed in the tutorials. You are encouraged to work together to get an understanding of the material. However, assignments are to be completed individually; they are the best preparation for the midterm test and final exam. Copying someone else's assignment fully or partially is considered Academic Dishonesty. Programs are automatically tested; incorrect or partially correct programs do not get any marks. Due to the nature of concurrency, even if your submission passes the provided tests, it may still be incorrect and not get any marks. Poorly written programs, even if correct, may get deductions - it is not the task of the grader to find out what your program does, you have to structure and document it properly. Late submissions are not accepted. Since you can get full marks while missing one assignment, MSAFs and other reasons of absence do not have an effect, unless the absence covers two or more assignments, in which case an alternative evaluation will be arranged.
Midterm Tests: 14%
    There will be a one-hour midterm test. The test will include programming questions similar to those in the assignments. Your best preparation is completing the lab questions and the assignment questions on your own. If you MSAF the midterm test, the weight will be shifted to the final exam.
Final Exam: 42%
    There will be a two-hour final examination. You need to have at least 50% on the final exam or on the midterm test to pass the course. If you MSAF’d the midterm test, you have to have 50% on the final exam to pass the course. Your best preparation is completing the lab questions and the assignment questions on your own.

Academic Integrity

You are expected to exhibit honesty and use ethical behaviour in all aspects of the learning process. Academic credentials you earn are rooted in principles of honesty and academic integrity. It is your responsibility to understand what constitutes academic dishonesty.

Academic dishonesty is to knowingly act or fail to act in a way that results or could result in unearned academic credit or advantage. This behaviour can result in serious consequences, e.g. the grade of zero on an assignment, loss of credit with a notation on the transcript (notation reads: “Grade of F assigned for academic dishonesty”), and/or suspension or expulsion from the university. For information on the various types of academic dishonesty please refer to the Academic Integrity Policy, located at https://secretariat.mcmaster.ca/university-policies-procedures- guidelines/.

The following illustrates only three forms of academic dishonesty:

  1. Plagiarism, e.g. the submission of work that is not one’s own or for which other credit has been obtained.
  2. Improper collaboration in group work.
  3. Copying or using unauthorized aids in tests and examinations.


On-line Elements

This course uses on-line elements (e-mail, Avenue to Learn (A2L), Teams, Zoom, JupyterHub). Students should be aware that, when they access the electronic components of a course using these elements, private information such as first and last names, user names for the McMaster e-mail accounts, and program affiliation may become apparent to all other students in the same course. The available information is dependent on the technology used. Continuation in a course that uses on-line elements will be deemed consent to this disclosure. If you have any questions or concerns about such disclosure please discuss this with the course instructor.

Conduct Expectations

As a McMaster student, you have the right to experience, and the responsibility to demonstrate, respectful and dignified interactions within all of our living, learning and working communities. These expectations are described in the Code of Student Rights & Responsibilities (the “Code”). All students share the responsibility of maintaining a positive environment for the academic and personal growth of all McMaster community members, whether in person or online.

It is essential that students be mindful of their interactions online, as the Code remains in effect in virtual learning environments. The Code applies to any interactions that adversely affect, disrupt, or interfere with reasonable participation in University activities. Student disruptions or behaviours that interfere with university functions on online platforms (e.g. use of Avenue 2 Learn, Teams, Zoom, JupyterHub), will be taken very seriously and will be investigated. Outcomes may include restriction or removal of the involved students’ access to these platforms.

Academic Accommodation of Students with Disabilities

Students with disabilities who require academic accommodation must contact Student Accessibility Services (SAS) at 905-525-9140 ext. 28652 or sas@mcmaster.ca to make arrangements with a Program Coordinator. For further information, consult McMaster University’s Academic Accommodation of Students with Disabilities policy.

Academic Accomodation for Religious, Indigenous or Spiritual Observances (RISO)

Students requiring academic accommodation based on religious, indigenous or spiritual observances should follow the procedures set out in the RISO policy. Students should submit their request to their Faculty Office normally within 10 working days of the beginning of term in which they anticipate a need for accommodation or to the Registrar's Office prior to their examinations. Students should also contact their instructors as soon as possible to make alternative arrangements for classes, assignments, and tests.

Copyright and Recording

Students are advised that lectures, demonstrations, performances, and any other course material provided by an instructor include copyright protected works. The Copyright Act and copyright law protect every original literary, dramatic, musical and artistic work, including lectures by University instructors.

The recording of lectures, tutorials, or other methods of instruction may occur during a course. Recording may be done by either the instructor for the purpose of authorized distribution, or by a student for the purpose of personal study. Students should be aware that their voice and/or image may be recorded by others during the class. Please speak with the instructor if this is a concern for you.

Extreme Circumstances

The University reserves the right to change the dates and deadlines for any or all courses in extreme circumstances (e.g., severe weather, labour disruptions, etc.). Changes will be communicated through regular McMaster communication channels, such as McMaster Daily News, A2L and/or McMaster email.