CPS 356: Operating Systems/Spring 2017

CPS 356 (3 hours) is a course that introduces the theoretical and practical issues underlying an operating system's structure and operation. Topics include process and thread creation and management, scheduling, concurrent, multi-threaded programming and synchronization, deadlock, memory management, virtual memory, and computer security. Concepts are demonstrated using the C, Go, and Elixir programming languages in a Linux environment. This course assumes no prior experience with Linux, C, Go, or Elixir.

CPS 356: Operating Systems/Spring 2017
Pre-requisites: CPS 250 (Introduction to Computer Organization) or ECE 314 (Fundamentals of Computer Architecture) & CPS 350 (Data Structures & Algorithms).

Meeting times: M W 3:35pm-4:50pm, MH 205.

Instructor: Dr. Saverio Perugini, AN 145, 229-4079, sperugini1, OHs: M W 6:20pm-7:20pm, T 2:15pm-3:15pm, F 10:00am-11:00am (only when class is in session), & by appointment.

Teaching assistants: Ben Thompson (e-mail id: thompsonb4); Jack Watkin (e-mail id: watkinj1); & Matthew Weiler (e-mail id: weilerm3); AN 131; OHs: M W 10:00am-1:00pm; T 2:00pm-5:00pm & 6:30pm-8:30pm; Th 4:30pm-8:30pm (only when class is in session); & by appointment.

Required textbook:
    [LP] Linux Programming by S. Perugini. 2017. Draft (Available as a Resource in Isidore).
    [PLCI] Programming Languages: Concepts and Implementation by S. Perugini. 2017. Draft (Available as a Resource in Isidore; only Chapter 14: Concurrency and Synchronization needed for this course.).
Recommended textbooks:
    [CARM] C: A Reference Manual (2nd ed.) by Harbison, S.P. & Steele Jr., G.L. (1995). Englewood Cliffs, NJ: Prentice Hall. ISBN: 0-13-326232-4. This book is on reserve at the Roesch library.
    [CPL] The C Programming Language (2nd ed.) by Kernighan, B.W. & Ritchie, D.M. (1988). Upper Saddle River, NJ: Prentice Hall. ISBN: 0-13-110362-8. This book is on reserve at the Roesch library.
    [OSCJ8] Operating System Concepts with Java (8th ed.) by Silberschatz, A., Galvin, P.B., & Gagne, G. (2010). John Wiley & Sons, Inc. ISBN: 978-0-470-50949-4. This book is on reserve at the Roesch library.
    [PG] Programming in Go: Creating Applications for the 21st Century by Summerfield, M. (2012). Boston, MA: Addison-Wesley. ISBN: 9780321774637 (textbook webpage contains links to the source code of all programs in the text). An eBook of [PG] is available free to all UD students in the library's eContent collection. To access it conduct a search for the title in the library's catalog at library.udayton.edu.

Steps to access [SCMSW] off-campus:
  1. Go to https://login.libproxy.udayton.edu/menu.
  2. Login using your standard UD credentials.
  3. Click on the link labeled: EBSCO Ebook Collection (formerly NetLibrary).
  4. This link will will take you to a page were you can perform a search. Search for "Programming in Go" Click on "eBook Full Text".

    Note that there is a limit on how many people can view the book and once someone checks it out, no one else can use it. Also, if you incorrectly break your session (closing the page), the book remains checked out for a period of time and you cannot use the book in until the session ends.
    [SCMSW] Seven Concurrency Models in Seven Weeks: When Threads Unravel by P. Butcher. Pragmatic Programmers, Dallas, TX, 2014. ISBN-13:978-1-937785-65-9 (textbook webpage contains links to the source code of all programs in the text). An eBook of [SCMSW] is available free to all UD students in the library's eContent collection. To access it conduct a search for the title in the library's catalog at library.udayton.edu. Steps to access [SCMSW] off-campus: follow same steps above for accessing [PG] (with the title of this book).
    [SMLSW] Seven More Languages in Seven Weeks: Languages that are Shaping the Future by B.A. Tate, F. Daoud, I. Dees, & J. Moffit. Pragmatic Programmers, Dallas, TX, 2014. ISBN-13:978-1-941222-15-7 (textbook webpage contains links to the source code of all programs in the text). An eBook of [SMLSW] is available free to all UD students in the library's eContent collection. To access it conduct a search for the title in the library's catalog at library.udayton.edu. Steps to access [SMLSW] off-campus: follow same steps above for accessing [SCMSW] (with the title of this book).
    [TLCL] The Linux Command Line: A Complete Introduction by Schotts, W. (2012). No Starch Press.
    [UPE] The UNIX Programming Environment (2nd ed.) by Kernighan, B.W. & Pike, R. (1984). Upper Saddle River, NJ: Prentice Hall. ISBN: 0-13-937681-X. This book is on reserve at the Roesch library.
    [USP] UNIX Systems Programming: Concurrency, Communication, & Threads (2nd ed.) by Robbins, K.A. & Robbins, S. (2003). Upper Saddle River, NJ: Prentice Hall. ISBN: 0-13-042411-0. This book is on reserve at the Roesch library. An eBook of [USP] is available free to all UD students in the library's eContent collection. To access it conduct a search for the title in the library's catalog at library.udayton.edu.

Course objectives:
  • Establish an understanding of operating system internals such as process creation and management, scheduling, and memory management.
  • Establish an understanding of concurrent programming and synchronization.
  • Develop a proficiency in Linux and C as an operating systems programming language and environment.
Evaluation, workload, & policies

Course outline, required reading assignments, lecture notes, & homeworks & projects:
  1. Introduction to operating systems & the UNIX/Linux & C programming environment ([OSCJ8] Ch 1-2; [LP] Ch 1-5; [USP] Ch 1-2, 4)
    1. introduction to operating systems (review of computer organization, C exercises): Jan 18 23 25
    2. the UNIX philosophy (class UNIX/Linux page, vi quick reference, vi editor, UW vi reference): Feb 1
    3. files & directories (manipulation & management): self-study
    4. system libraries & I/O: Jan 18 23 25 30 Feb 1
    5. compiling C in UNIX (static vs. dynamic linking, macros, conditional compilation, error handling, & debugging; RMS's gdb tutorial, valgrind) [HW 1 due]: Feb 1

  2. Processes & threads ([OSCJ8] Ch 3-4; [LP] Ch 6-7; [USP] Ch 2-6)
    1. processes (identification; getpid, creation; fork, & termination): Jan 18 23 Feb 1 6
    2. memory allocation/deallocation: Jan 23 25 Feb 6 8 13 15
    3. process manipulation (wait) [HW 2 due]: Feb 8
    4. process manipulation (exec, strtok, & building an argument vector): Feb 8 [HW 3 due]: Feb 15 20
    5. the Linux shell (Learning the Shell) & process environment (variables, configuration, customization): Feb 20
    6. low-level I/O (open & close, & read & write): Feb 6 20
    7. storage & linkage classes in C : Feb 13
    8. context switching: Feb 20
    9. files & directories (data structures, inodes, & hard & symbolic links) [HW 4 due]: Feb 22
    10. implementing I/O redirection & interprocess communication (IPC; pipes & FIFOs): Feb 22
    11. threads & thread-safe functions: Feb 13 15
    12. (shell) job control (through signals) & terminals: Feb 22

    13. Exam I (closed book, closed notes) [practice problems]: Feb 27

  3. Scheduling ([OSCJ8] Ch 5)
    1. types, evaluation criteria, & algorithms (FCFS, SJF, SRTF, RR): Mar 1
    2. multi-level queues & multi-level feedback queues: Mar 1 [HW 5 due]: Mar 6 8

  4. Concurrency and Synchronization ([PG] Ch 7, [SCMSW] Ch 5, & [SMLSW] Ch4)
    1. mutual exclusion & the critical section problem (§§ 6.1-6.4): Mar 13
    2. classical problems of synchronization (§ 6.6): Mar 13
    3. introduction to Go programming (Go by example, a tour of Go, command-line programming with Go, effective Go): Mar 15
    4. communicating sequential processes (CSP) (Go/CSP sheet) in Go ([PG] Ch7): Mar 15 20
      [Project due]: Mar 21
      communicating sequential processes (CSP): Mar 22 [HW 6 due]: Mar 27
      Exam II (closed book, closed notes) [practice problems]: Mar 29
    5. the Actor model of concurrency in Elixir (sheet; [SCMSW] Ch5 & [SMLSW] Ch4) [HW 7 due]: Apr 5
      the Actor model of concurrency in Elixir (sheet; [SCMSW] Ch5 & [SMLSW] Ch4) [HW 8 due]: Apr 19
      Exam III (closed book, closed notes) [practice problems]: Apr 24

  5. Deadlock ([OSCJ8] Ch 7)
    1. deadlock prevention (§§ 7.1-7.4): self-study
    2. deadlock avoidance & Banker's algorithm (§ 7.5) (Banker's examples): self-study
    3. deadlock detection & recovery (§§ 7.6-7.8): self-study

  6. Memory Management ([OSCJ8] Ch 8)
    1. fundamentals (overview of hardware, logical vs. physical address space, dynamic loading & linking) (§§ 8.1-8.2): Apr 29
    2. contiguous allocation (§ 8.3): Apr 29
    3. paging (§§ 8.4-8.5): Apr 29
      paging (§§ 8.4-8.5): Apr 29
    4. segmentation (§§ 8.6-8.8): Apr 6
    5. segmentation faults & buffer overflows (§§ 8.6-8.8): Apr 6

  7. Virtual Memory ([OSCJ8] Ch 9)
    1. demand paging (§§ 9.1-9.3): self-study
    2. page replacement algorithms (FIFO, optimal, LRU; § 9.4): self-study
    3. allocation (§ 9.5) & thrashing (§ 9.6): self-study
    4. course reflection (terms): Apr 26

  8. Final Exam (comprehensive, closed book, closed notes) [practice problems]: M May 1, 2:30pm-4:20pm, MH 205.
Programming style guide

Practice problems

Grades: available in Isidore

Computer accounts: Linux account access | UDit | A beginner's guide to effective e-mail

Helpful links: academic calendar (PDF) | student handbook (PDF) | UDit FERPA policies

Feedback: Dr. Perugini welcomes any feedback you have on the style of the lectures, the concepts presented in class, the course webpage, homeworks, projects, deadlines, exams, course and grading policies, or your experience in the course.