CPS 356: Operating Systems/Fall 2016

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/Fall 2016
Pre-requisites: CPS 250 (Introduction to Computer Organization) or ECE 314 (Fundamentals of Computer Architecture) & CPS 350 (Data Structures & Algorithms).

Meeting times: T Th 5:05pm-6:20pm, MH 203.

Instructor: Dr. S. Perugini, e-mail id: sperugini1, AN 145, 229-4079, OHs: T 11:15am-12:15pm, 6:20pm-7:00pm, Th 3:20pm-4:20pm, 6:20pm-7:00pm (only when class is in session), & by appointment.

Teaching assistants: Ben Thompson (e-mail id: thompsonb4) & Jack Watkin (e-mail id: watkinj1), AN 131, OHs: M 3:30pm-7:30pm; T 6:20pm-7:30pm; W 3:30pm-7:30pm; Th 6:20pm-7:30pm (only when class is in session), & by appointment.

Required textbook:
    [LP] Linux Programming by S. Perugini. 2016. Draft (Available as a Resource in Isidore).
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): Aug 24 30
    2. the UNIX philosophy (class UNIX/Linux page, vi quick reference, vi editor, UW vi reference): Sep 8
    3. files & directories (manipulation & management): self-study
    4. system libraries & I/O: Aug 24 30 Sep 1 6 8
    5. compiling C in UNIX (static vs. dynamic linking, macros, conditional compilation, error handling, & debugging; RMS's gdb tutorial, valgrind) [HW 1 due]: Sep 6

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

    13. Exam I (closed book, closed notes) [practice problems]: Oct 4

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

  4. Concurrency and Synchronization ([OSCJ8] Ch 6)
    1. mutual exclusion & the critical section problem (§§ 6.1-6.4): Oct 25 27 Nov 1
    2. classical problems of synchronization (§ 6.6): Oct 27 Nov 1
    3. introduction to Go programming (Go by example, a tour of Go, command-line programming with Go, effective Go): Oct 27
    4. communicating sequential processes (CSP) ([SCMSW] Ch6) in Go ([PG] Ch7): Nov 1
      Exam II (closed book, closed notes) [practice problems]: Nov 3
      communicating sequential processes (CSP) [HW 6 due]: Nov 8
      communicating sequential processes (CSP): Nov 10 [HW 7 due]: Nov 15
    5. the Actor model of concurrency in Elixir (cheatsheet; [SCMSW] Ch5 & [SMLSW] Ch4): Nov 15 17 [HW 8 due]: Nov 22
      the Actor model of concurrency in Elixir (cheatsheet; [SCMSW] Ch5 & [SMLSW] Ch4) [HW 9 due]: Nov 29
      Exam III (closed book, closed notes) [practice problems]: Dec 1

  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): Nov 29
    2. contiguous allocation (§ 8.3): Nov 29
    3. paging (§§ 8.4-8.5): Nov 29
      paging (§§ 8.4-8.5): Nov 29
    4. segmentation (§§ 8.6-8.8): Dec 6
    5. segmentation faults & buffer overflows (§§ 8.6-8.8): Dec 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): Dec 6
      [HW 10 due]: Dec 9

  8. Final Exam (comprehensive, closed book, closed notes) [practice problems]: T Dec 13, 4:30pm-6:20pm, MH 203.
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.