CPS 356: Operating Systems/Fall 2015

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, Java, and Go programming languages in a Linux environment. This course assumes no prior experience with Linux or Go.

CPS 356: Operating Systems/Fall 2015
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 201.

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

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

Required textbook:
    [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.
    [JPL] The Java programming language (4th ed.) by Arnold, K., Gosling, J., & Holmes, D. (2005). Reading, MA: Addison Wesley. ISBN: 0321349806. An eBook of [JPL] 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.
    [LBOS] The little book of semaphores (2nd ed.) by Downey, A.B. (2008). Boston, MA: Green Tea Press.
    [PG] Programming in Go: Creating applications for the 21st century by Summerfield, M. (2012). Boston, MA: Addison-Wesley. ISBN: 9780321774637.
    [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 UNIX 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; [USP] Ch 1-2, 4)
    1. introduction to operating systems (review of computer organization, C exercises): Aug 27 Sep 1
    2. the UNIX philosophy (class UNIX/Linux page, vi quick reference, vi editor, UW vi reference): Aug 27 Sep 1
    3. files & directories (manipulation & management): self-study
    4. system libraries & I/O: Aug 27 Sep 1
    5. compiling C in UNIX (static vs. dynamic linking, macros, conditional compilation, error handling, & debugging; RMS's gdb tutorial, valgrind): Sep 1 3 8

  2. Processes & threads ([OSCJ8] Ch 3-4, [USP] Ch 2-6)
    1. processes (identification; getpid, creation; fork, & termination): Aug 27 Sep 1 3
    2. memory allocation/deallocation: Sep 8
    3. process manipulation (wait) [HW 1 due]: Sep 10
    4. process manipulation (exec, strtok, & building an argument vector): Sep 15
    5. the UNIX shell (Learning the Shell) & process environment (variables, configuration, customization): Sep 10 15
    6. implementing I/O redirection & interprocess communication (IPC; pipes & FIFOs) [HW 2 due]: Sep 17
    7. files & directories (data structures, inodes, & hard & symbolic links): Sep 17
    8. low-level I/O (open & close, & read & write): Sep 17
    9. context switching: Sep 24
    10. storage & linkage classes in C: Sep 8
    11. compilation management (Makefiles, make tutorial, another make tutorial, exercise in writing a Makefile): Sep 22
    12. threads & thread-safe functions: Sep 24
    13. (shell) job control (through signals) & terminals: Sep 24
    14. threads in Java (Oracle Java webpage, BlueJ, NetBeans, Eclipse, Java Thread class): Sep 29
      [P1 due]: Sep 29
      Exam I (closed book, closed notes): [practice problems]: Oct 1

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

  4. Synchronization ([OSCJ8] Ch 6)
    1. mutual exclusion & the critical section problem (§§ 6.1-6.4): Sep 24 29 Oct 15
    2. semaphores (§ 6.5) (The little book of semaphores, Java lang.util.concurrent.Semaphore class): Oct 15
    3. classical problems of synchronization (§ 6.6): Oct 15 20 22 27 29 Nov 5
    4. monitors & conditional variables (§ 6.7), & Java synchronization (§ 6.8) (Java lang.util.concurrent.locks package; Java Condition interface): Oct 27 [P2 due]: Oct 29 [HW 5 due]: Nov 5 10
      Exam II (closed book, closed notes) [practice problems]: Nov 3

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

  6. Memory Management ([OSCJ8] Ch 8)
    1. fundamentals (overview of hardware, logical vs. physical address space, dynamic loading & linking) (§§ 8.1-8.2): Nov 17
    2. contiguous allocation (§ 8.3): Nov 17
    3. paging (§§ 8.4-8.5): [P3 due]: Nov 19
      Exam III (closed book, closed notes) [practice problems]: Nov 24
      paging (§§ 8.4-8.5): Dec 1 3
    4. segmentation (§§ 8.6-8.8): Dec 3
    5. segmentation faults & buffer overflows (§§ 8.6-8.8): Dec 3

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

  8. Final Exam (comprehensive, closed book, closed notes) [practice problems]: W Dec 16, 12:20pm-2:10pm, MH 201.
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.