All Projects → kaist-cp → Cs492 Concur

kaist-cp / Cs492 Concur

Programming Languages

rust
11053 projects

KAIST CS492: Design and Analysis of Concurrent Programs

Logistics

Online sessions

Due to COVID-19, we're going to conduct online sessions for this semester.

  • For non-live sessions, videos will be uploaded to a Youtube channel.

    • You're required to watch the video, and based on the contents, to solve pop quizzes that will be posted at gg.kaist.ac.kr. The details are announced in an issue.

    • Turn on English subtitle at YouTube, if necessary.

  • For live sessions, we'll meet in a Google Meet chatting room.

Course description

Context

I expect computers in the next 700 years will be massively parallel. We the humankind want to improve the performance of computers in the era of big data. But it is becoming more and more challenging after the breakdown of Dennard scaling around 2005, which means the performance of sequential computers will not be improved. Thus not only servers but also personal computers have been multi-core systems since then. The problem is only worsened by the ending of the Moore's law, which means we are no longer able to benefit from denser electrical circuit. It seems the only remaining way to optimize performance is specialization, which aims to better exploit parallelism of workloads. Because of these technology trends, I expect computers in the future will be massively parallel.

But we are not ready yet for the era of massive parallelism. The main difficulty lies on handling shared mutable states, which is the main topic of concurrency. To coordinate multiple cores and other resources, their inputs and outputs should be somehow properly synchronized with each other via shared mutable states like memory. But handling shared mutable states is inherently challenging, both theoretically and practically. For example, in the presence of thousands and millions of cores, how to efficiently synchronize concurrent accesses to shared memory? In the presence of nondeterministic interleaving of thread executions, how to make sure the safety of a concurrent program? In the presence of compiler and hardware optimizations, what is the right specification of a concurrent data structure?

Fortunately, the theory of shared mutable states has advanced quite impressively in the past five years, and now it is greatly helpful in designing and analyzing practical systems with shared mutable states. So in this course, we will discuss the recent theory of shared mutable states and its application to real-world practical systems.

Goal

This course is geared towards senior undergraduate/graduate students in computer science (or related disciplines) who are interested in the modern theory and practice of parallel computer systems. This course aims to help such students to:

  • Understand the motivations and challenges in concurrent programming
  • Learn design patterns and reasoning principles of concurrent programs
  • Design, implement, and evaluate concurrent programs
  • Apply the understanding to real-world parallel systems

Textbook

Tools

Make sure you're capable of using the following development tools:

  • Git: for downloading the homework skeleton and version-controlling your development. If you're not familiar with Git, walk through this tutorial.

    • IMPORTANT: you should not expose your work to others. In particular, you should not fork the upstream and push there. Please the following steps:

      • Directly clone the upstream without forking it.

        $ git clone --origin upstream https://github.com/kaist-cp/cs492-concur.git
        $ cd cs492-concur
        $ git remote -v
        upstream	https://github.com/kaist-cp/cs492-concur.git (fetch)
        upstream	https://github.com/kaist-cp/cs492-concur.git (push)
        
      • To get updates from the upstream, fetch and merge upstream/master.

        $ git fetch upstream
        $ git merge upstream/master
        
    • If you want to manage your development in a Git server, please create your own private repository.

      • You may upgrade your GitHub account to "PRO", which is free of charge. Refer to the documentation

      • Set up your repository as a remote.

        $ git remote add origin [email protected]:<github-id>/cs492-concur.git
        $ git remote -v
        origin	 [email protected]:<github-id>/cs492-concur.git (fetch)
        origin	 [email protected]:<github-id>/cs492-concur.git (push)
        upstream https://github.com/kaist-cp/cs492-concur.git (fetch)
        upstream https://github.com/kaist-cp/cs492-concur.git (push)
        
      • Push to your repository.

        $ git push -u origin master
        
  • Rust: as the language of homework implementation. We chose Rust because its ownership type system greatly simplifies the development of large-scale system software.

    We recommend you to read this page that describes how to study Rust.

  • Visual Studio Code (optional): for developing your homework. If you prefer other editors, you're good to go.

  • You can connect to server by ssh s<student-id>@cp-service.kaist.ac.kr -p14000, e.g., ssh [email protected] -p14000. See this issue for more detail.

    • Add the following lines in your ~/.ssh/config:

      Host cs492-concur
        Hostname cp-service.kaist.ac.kr
        Port 14000
        User s<student-id>
      

      Then you can connect to the server by ssh cs492-concur.

    • Now you can use it as a VSCode remote server as in the video.

Prerequisites

  • It is strongly recommended that students already took courses on:

    • Mathematics (freshman calculus, MAS101 & MAS102): proposition statement and proof
    • Data structures (CS206): linked list, stack, queue
    • Systems programming (CS230): memory layout, cache, lock
    • Programming languages (CS320): lambda calculus, interpreter

    Without a proper understanding of these topics, you will likely struggle in this course.

  • Other recommendations which would help you in this course:

    • Basic understanding of computer architecture (CS311)
    • Programming experience in Rust

Grading & honor code

Homework & project (60%)

  • Reading assignment (both paper and code)
  • Programming assignment (including design, implementation, evaluation)

Midterm and final exams (40%)

The exams will evaluate your theoretical understanding of shared mutable states.

Attendance (?%)

You should submit a token to the Course Management website for each session. You should submit a token within 12 hours from the beginning of a sessions.

Honor code

Please sign KAIST School of Computing Honor Code here.

Communication

  • Course-related announcements and information will be posted on the website as well as on the GitHub issue tracker. You are expected to read all announcements within 24 hours of their being posted. It is highly recommended to watch the repository so that new announcements will automatically be delivered to you email address.

  • Ask your questions via email only if they are either confidential or personal. Otherwise, ask questions in this repository's issue tracker. Any questions failing to do so (e.g. email questions on course materials) will not be answered.

    • I'm requiring you to ask questions online first for two reasons. First, clearly writing a question is the first step to reach an answer. Second, you can benefit from questions and answers of other students.
  • We are NOT going to discuss new questions during the office hour. Before coming to the office hour, please check if there is a similar question on the issue tracker. If there isn't, file a new issue and start discussion there. The agenda of the office hour will be the issues that are not resolved yet.

  • Emails to the instructor or TAs should begin with "CS492C:" in the subject line, followed by a brief description of the purpose of your email. The content should at least contain your name and student number. Any emails failing to do so (e.g. emails without student number) will not be answered.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].