Class Lectures and Reading Assignments
CS 51520
Operating Systems
Spring, 2019

This page documents what we do in class. It contains programs that we will discuss in class, reading assignments, simple homework exercises that you can work on for practice and exam preparation (not for credit), and links to other sources of information.

This zip file contains solutions to Hw 4. I wrote two Rust solutions, one similar to the Haskell code and one similar to the Java code. I also added a C version. To keep the code as simple as possible, I did not include the code to generate random triples.

Here is the Rust code that we wrote in class on Rust Playground. This code is also in the homework's zip file. Please download the homework zip file again because I cleaned up some typos in the sample programs.

See the homework assignment page for your fourth programming assignment.

Here is the section about Box<T> from the Rust book.

Here is some information about the Bag ADT.

Here is the code that we used in class today.

Read Chapter 9 on error handling from the Rust book.

Read Sections 10.1 and 10.2 on generics and traits.

Here is the code that we used in class today.

Here is the code that we wrote in class today.

Here is another explanation of the advantages of "sum types".

Spring Break - No class today.

Spring Break - No class today.

See the homework assignment page for your third programming assignment.

Read Chapter 7 from the Rust book.

Here are two explanations of "sum types", or "algebraic data types", or Rust Enums.

Here are the lists we used in class and some similar trees.

Here are the code examples that we used in class today.

Read Chapter 6 from the Rust book.

JavaScript now has pattern matching, but JavaScript calls it "destructuring" (this is NOT the "pattern matching" found in "regular expressions").

Here is the code that we played with in class today.

Here is the code that we played with in class today.

See the homework assignment page for your first two programming assignments.

Here are the move examples and reference that we used in class today.

Here are two references for how Python uses reference counting for memory management.

No class today because of the weather.

No class today because of the weather.

Read Chapter 5 from the Rust book.

Here is the code that we played with in class today.

No class today, Martin Luther King Jr. Day.

Read Chapter 4 from the Rust book.

Be sure to try copying and pasting the code examples from Chapter 4 into the online Rust compiler.

Here are two C examples that we will work with in class.

Read Chapters 1, 2 and 3 from the Rust book.

Here are the C examples that we worked with in class.

Here are links to two online, educational C compilers that we will use.

Here is a link to an online Rust compiler.

Important: You should get an account on a Purdue Linux cluster. We will use it as an example Linux system. Log into Purdue's "research account management tool" using your Purdue career account. When you are asked for a "research group name", use "Purdue Northwest". Under "Select which queues and resources to request access to", check "Rice". In the textbox for comments, put "CS 51520, Professor Roger Kraft". Then click the "Submit Request" button, and we will see what happens.