CPS 356: Operating Systems/Spring 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, viritual 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, Go, or Elixir.

CPS 356: Operating Systems/Spring 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 3:35pm-4:50pm, MH 205.

Instructor: Dr. S. Perugini, e-mail id: sperugini1, AN 145, 229-4079, OHs: M W 6:30pm-7:30pm, T Th 5:00pm-6:00pm (only when class is in session) & by appointment.

Teaching assistants: Stephen Korenewych (e-mail id: korenewychs1), Ben Thompson (e-mail id: thompsonb4), & Evan Cooper (e-mail id: coopere5), MH 21, OHs: M 1:30pm-3:30pm (Ben), 6:30pm-7:30pm (Stephen); T 1:00pm-3:00pm (Evan), 6:30pm-7:30pm (Stephen); W 1:30pm-3:30pm (Ben), 6:30pm-7:30pm (Stephen); Th 1:00pm-3:00pm (Evan), 6:30pm-7:30pm (Stephen) (only when class is in session), & by appointment.

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

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

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

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

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

  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 28
    2. contiguous allocation (§ 8.3): self-study
    3. paging (§§ 8.4-8.5):
      paging (§§ 8.4-8.5): Apr 28
    4. segmentation (§§ 8.6-8.8): Apr 28
    5. segmentation faults & buffer overflows (§§ 8.6-8.8): Apr 28

  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) [HW 10 due]: Apr 28

  8. Final Exam (comprehensive, closed book, closed notes) [practice problems]: W May 4, 12:20pm-2:10pm, 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 | student handbook | UDit 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.