TCSS 505: Systems Programming

csu-logo

Prerequisites: TCSS 501, 502, 503, and 504 with a 2.0 or better
Fullfilment of the course prerequisites is used to verify students have the necessary computer and digital information literact skills required to succeed in the course.

Textbook
Remzi Arpaci-Dusseau, Andrea Arpaci-Dusseau
Operating Systems - Three Easy Pieces, Version 1.00+
Publisher - Lulu Press, 2018.

Optional Textbook
Thomas Anderson, Michael Dahlin
Operating Systems: Principles and Practice, 2nd Edition
Publisher: Recursive Books, 2014.
Instructor:
Wes J. Lloyd
Office: Cherry Parkes 229
Online Office Hours: TBA, or by appointment
E-mail: wlloyd <@> uw.edu





Course Overview
This course examines the fundamental concepts of modern operating systems and how they function. Topics covered include processes, threads, memory management, CPU scheduling, file systems, virtual machines and software containers. TCSS 505 covers the basics of the Linux operating system, bash commands, scripting, and systems programming.

Learning Objectives
A primary objective for this course is to learn the fundamentals of modern computer operating systems, and to understand resulting implications for modern software development. The course will cover key tradeoff spaces involved in operating systems design, and how operating system implementations impact computer system performance. Upon completion of the course students will be able to:
  • LO1: Describe differences in alternate operating systems designs with respect to: scheduling, memory management, and I/O device communication [C1, C2, C5, C6, C7, C8]
  • LO2: Describe the key structures and components of modern operating systems, specifically the three easy pieces described in the textbook [C2]
  • LO3: Create program(s) that utilize multiple processes and threads [C3]
  • LO4: Create program(s) that leverage locks and condition variables to achieve concurrency between threads operating over shared memory while avoiding deadlock [C4]
  • LO5: Describe operating system data structures used for file systems, memory, and process management [C3, C5, C6, C7, C9]
  • LO6: Contrast differences between virtual machines and containers [C10]
Course Communication
TCSS 505 is offered as a fully online / asynchronous course in Fall 2021. Student participation in online communication is optional and ungraded. In no event will the instructor consider the level of interaction or context of questions in evaluating the course grade of any student. The following types of communication are featured in the course:
  • email: w/ instructor and w/ peers in project groups
  • discussion forums: in Canvas
  • office hours: Live, online, scheduled, and by appointment
  • Instant messaging: via course slack channel
  • Peer communication for project group work: any medium
Instructor Feedback
Instructor Feedback is of paramount importance for remote learning. To ensure substantive interaction between the instructor and students in this course, the instructor will adhere to the following response goals:
  • Respond to messages on forums and instant messaging within 24 hours
  • Respond to email messages within 48 hours
  • Respond to scheduling requests for office hours and meetings within 24 hours
  • Provide graded responses to assignments within 7 days of assignment due date or student submission data whichever is later
Communication Expectations / Etiquette
The following expectations for communication will apply in the course:
  • Professional and respectful tone with civility should be used when communicating with peers and the instructor.
  • Written communication should not use popular online abbreviations common with social media apps, but standard english for clarity.
  • A professional and respectful tone with civility should be used in video and audio communications.
  • Where/when possible spelling and grammar should be correct.
Technology Requirements
Students should have access to a machine capable of running Linux, or a Linux-based Virtual Machine. In the Linux environment students should have access to a gcc (C compiler), as well as an editor such as Visual Studio Code for project development. These requirements can be supported using a host computer with Windows, MacOS or Linux as the host operating system. The computer should have access to an HTML 5 compatible browser for accessing Canvas and course materials.

Topics Covered
The primary objectives of TCSS 505 is to communicate a diverse array of topics related to modern Operating Systems and Systems Programming. This course will cover a broad range of topics including:
  • C1. Concepts of OS design and operations
  • C2. OS Components and Structure
  • C3. Processes and Threads (kernel, user, and management)
  • C4. Concurrency, Synchronization, Locks, Condition Variables, and Deadlock
  • C5. Scheduling and Resource Sharing
  • C6. Memory Management
  • C7. Virtual Memory
  • C8. I/O Device Management
  • C9. Filesystems
  • C10. Cloud Computing concepts: Virtual machines vs. containers

Modules
MODULE 0: INTRODUCTION TO TCSS 505

MODULE 1: INTRODUCTION TO OPERATING SYSTEMS
  • M1.1. Introduction to the Three Easy Pieces of Operating Systems: CPU, memory, I/O - [C1, C2, C5, C6, C7, C8, C9]
  • M1.2. Introduction to the Linux Command Line - [C1, C2]

MODULE 2: PROCESSES
  • M2.1. Introduction to Processes [C2, C3]
  • M2.2. The Process API [C2, C3]
  • M2.3. Limited Direct Execution [C1, C2, C3]

MODULE 3: RESOURCE SHARING IN OPERATING SYSTEMS
  • M3.1. Scheduling Metrics: Response time, Turnaround time, Jain's fairness Index - [C1, C5]
  • M3.2. CPU schedulers: FIFO, SJF, STCF, RR - [C5]
  • M3.3. Multi-level Feedback Queue Scheduler - [C1, C5]
  • M3.4. Linux Completely Fair Scheduler - [C1, C2, C3, C5]

MODULE 4: LOCKING AND CONCURRENCY
  • M4.1. Processes vs. Threads - [C3]
  • M4.2. Concurrency Concepts Introduction: Race condition, Critical Section, Atomic Execution, Mutual Exclusion - [C4]
  • M4.3. Introduction to Locks - [C4]
  • M4.4. Thread Safe Data Structures
MODULE 5: CONDITION VARIABLES
  • M5.1. Introduction to Condition Variables - [C4]
  • M5.2. Producer Consumer Bounded Buffer - [C4]
MODULE 6: MEMORY VIRTUALIZATION
  • M6.1. Memory Segments - [C6]
  • M6.2. Memory Paging and Single-Level Page Tables - [C6]
  • M6.3. Multi-level Page Tables - [C6]
  • M6.4. Cache Replacement Policies - [C7]
MODULE 7: I/O DEVICES
  • M7.1. Programmed I/O and Direct Memory Access - [C8]
  • M7.2. Hard Disk and Solid State Drives - [C8]
  • M7.3. Redundant Array of Inexpensive Disks (RAID) - [C8]
  • M7.4. Filesystems - [C9]
MODULE 8: INTRODUCTION TO CLOUD COMPUTING
  • M8.1. Introduction to Virtualization - [C10]
  • M8.2. Introduction to Containerization - [C10]
  • M8.3. Introduction to Cloud Services and Delivery Models - [C10]
Tentative Schedule
The following is a tentative schedule of weekly topics.

Weeks  Topics CoveredModule
1Introduction, Abstraction and Virtualization in OSes1
2Processes, Threads, and Limited Direct Execution2
3CPU Scheduling: FIFO, SJF, STCF3
4CPU Scheduling: MLFQ, Linux CFS3
5Introduction to locking and concurrency4
6Thread based data structures, condition variables, Bounded Buffer5
7Virtual memory management, address translation, segmentation6
8Paging, free space management, TLB, cache replacement policies  6
9I/O, Disks, RAID, Filesystems7
10Virtualization, Containerization, Cloud Computing8

School of Engineering and Techolnogy Support
Please maintain communication with the School of Engineering and Technology advisors regarding your studies and notify them of any personal or learning struggles. It's important to reach out early: https://www.tacoma.uw.edu/set/academic-advising

School of Engineering and Technology Technology Resources
The School of Engineering and Technology maintains an array of technology labs which contain computers and servers which can be accessed to provide computing resources to support online learning. Additional information about the SET technology labs can be found at: https://www.tacoma.uw.edu/set/technology-labs

Religious Accommodations
Washington state law requires that UW develop a policy for accommodation of student absences or significant hardship due to reasons of faith or conscience, or for organized religious activities. The UW's policy, including more information about how to request an accommodation, is available at Religious Accommodations Policy (https://registrar.washington.edu/ staffandfaculty/religious-accommodations-policy/). Accommodations must be requested within the first two weeks of this course using the Religious Accommodations Request Form (https://registrar.washington.edu/students/religious-accommodations-request/).

UWT Campus Information, Resources, Policies, and Expectations
For inclement weather, academic honesty, email policy, disability support services, and more please refer to the general University of Washington - Tacoma Campus Information and Course Resources Policies, and Expectations available online here:
UWT Campus Information - Course Resources, Policies, and Expectations

Grading Policy
Weights are assigned to the different elements of the course as listed below. Points are added up at the end of the quarter and weighted accordingly to determine a total percentage score. The percentage score is translated into a final decimal point (4.0 max) grade.

Course ElementWeight
Assignments70%
Tutorials/Quizzes/Activities30%

UW Grading Scale


Tutorials / Quizzes / Activities
There will be approximately 1 quiz, tutorial, or activity per week during the quarter. Quizzes will be delivered online via the Canvas system. Quizzes and activities will generally be short, and provide opportunities to practice and build comprehension of key concepts and learning objectives. Tutorials will provide a step-by-step walk through to introduce a technical topic followed by hands-on activities where the topics are applied and practiced. The lowest 2 grades from the Tutorials / Quizzes / Activities category will be dropped throughout the quarter. This provides students with flexibility to pick and choose from completing all of the assignments, or an opportunity to recover from a poor score.

Assignments
All assignments are due at 11:59 PM on the due date unless specified otherwise. There is a 24-hour grace period on late assignments. Assignments submitted more than 24 hours late will receive a 10% late penalty per day up to a maximum of three days and 20%. Late submissions more than 72 hours late will receive a zero score without prior arrangement with the intructor. When possible, assignments will be posted at least two weeks prior to the due date.

All assignments should be submitted online via Canvas. Source code should be submitted as a tar gzip archive file. Included executable files are deleted and programs are then rebuilt from source for grading. Programs or source code sent via email will not be graded. The Canvas system will accept and date source submissions throughout the quarter. Assignments may include programming and/or written components. Programming projects will relate to the lecture and textbook readings throughout the quarter. The projects will use Linux. It is *HIGHLY* recommended to create a local Linux Virtual Machine on a laptop or desktop computer (Ubuntu or CentOS) to support program development. You may use your own systems with a Linux distribution (recommended are Ubuntu and CentOS) or use network-accessible Virtual Machines (VMs) with a Linux distribution (Ubuntu and CentOS recommended) with full root access. The projects will reinforce core OS concepts such as scheduling and memory management.

Academic Integrity and Collaboration Policy
To quote the UWT statement of values, "our fundamental purpose is to educate students for life as global citizens." Students are active participants in their education and are expected to uphold high standards of academic conduct. Any action that subverts the educational process or misrepresents student knowledge and abilities constitutes academic dishonesty.

Links:
UW Tacoma Student Conduct Code
UW Tacoma - Academic Honesty

In this course some assignments and all exams must be completed individually. When collaboration is permitted for an assignment, this will be noted in the instructions. With respect to student collaboration, these actions are acceptable:
  • Contacting the instructor for help with, or clarification on, an assignment.
  • Utilizing the class discussion board regarding an assignment without posting solutions.
  • Discussing an assignment in general terms with other students without sharing solution details.
  • Including details about assignments on your resume or LinkedIn profile.
  • Maintaining assignment solutions (aka source code) online in *private* GitHub repositories, or in a *private* Google Drive or Dropbox folder to share with collaborators as needed.
These actions are strongly discouraged:
  • Posting solutions (aka source code) to assignments on your public web page, or personal GitHub repository during or after the term.
  • Providing (binary) executable files of your projects on public internet sites.
These actions are not acceptable:
  • Sharing your assignment solution with another student.
  • Sitting with another student and "walking them through" the solution by telling them how to solve the problem in detail.
  • Discussing the procedure(s) for completing an entire assignment or large portions of an assignment in detail with another student.
  • Receiving solutions from other students, the Internet, or other sources which enables avoiding solving the problems featured by the assignment to obtain answers based on plagiarism, and then submitting it as your own work.
  • Sharing materials (e.g. notes, calculators, papers, books) during a test or individual quiz.
  • Copying material from another student and slightly changing answers for an indvidual homework assignment.
Group assignments operate similarly, with members of the same group freely able to collaborate with one another, but different groups being limited as above. Students found to violate the academic integrity policy may be subject to forfeiture of credit for assignments, failure of the course, and/or disciplinary action by the University.