CS149: Introduction to Operating Systems

Course Syllabus Spring 2010

San Jose State University





Description:††† Introduction to computer operating systems principles.Topics for discussion will focus on the fundamental responsibilities of an operating system kernel including hierarchical memory management, CPU and task scheduling, resource management, input/output processing, and file management.Several alternative algorithms associated with the implementation for each of the major topics will be studied along with an analysis of their properties, advantages, and disadvantages.Hardware characteristics of generic computer architectures and devices are analyzed to the extent necessary to emphasize the role of the operating system as a resource manager and controller.Related topics such as inter-process communication and synchronization, deadlocks, reliability, security, and distributed systems are also presented.Programming projects will be used to demonstrate implementation techniques for various ideas presented in class.

Instructor:††††† Robert K. Chun

Contact Info:EMAIL:ProfessorChun@gmail.com,PHONE:(408) 924-5137,OFFICE:MH 413

Class Sched:†† Section 1: 1430 Ė 1545 MW MH223

Office Hours: MW 1545-1700and2015-2130

Textbooks: †††††††††††††††††††††††† Required:

††††††††††††††††††††††††††††††††††††††††††††††††††††† Operating Systems Design and Implementation, 3rd Edition. Tanenbaum, Prentice-Hall Inc., 2006. ISBN0131429388

†††††††††††††††††††††††††††††††††††††††††††† Optional:

††††††††††††††††††††††††††††††††††††††††††††††††††††† UNIX System Programming, Second Edition, K. Haviland, Addison-Wesley, 1999. ISBN0-201-87758-9

Course Reader:††††††††††††††††† Required:

††††††††††††††††††††††††††††††††††††††††††††††††††††† CS 149 Course Reader, Chun.Purchase at SJSU Print Shop.

Prerequisites: CS 146 and CS 147 with grade of C- or better, and knowledge of the 'C' Programming Language.Note:The instructor and/or the CS Department are authorized to drop students at any time should it be determined that all prerequisites have not been met.

Grading:†††††††† Grading consists of two midterms, a final, and three homework projects (involving a combination of written problems and laboratory programming exercises) weighted as follows.The three projects have equal weight and must be turned in on the due date announced.Late assignments will not be accepted.All assignments and exams must be completed on an individual basis to receive credit for the class.The final exam must be taken at the university specified day and time for the appropriate enrolled section.Grading is based on a class curve.All students must uphold academic honesty per http://www2.sjsu.edu/senate/f88-10.htm


†††††††††††††††††††††††††††††††† 20%††††††††† Midterm††††††††††††††††††††† Week 6 (tentative)†††††††††††††††††††††††††††††††††††††††††

†††††††††††††††††††††††††††††††† 20%††††††††† Midterm††††††††††††††††††††† Week 12 (tentative)†††††††††††††††††††††††††††††††††††††††

†††††††††††††††††††††††††††††††† 20%††††††††† Three HW Projects†††† As announced in class

†††††††††††††††††††††††††††††††† 40%††††††††† Final Exam††††††††††††††††† Section 1:5/19/10at1215-1430



Student Learning Outcomes:


Upon successful completion of this course, students should be able to understand:


       The role that the operating system software plays in the management of the various hardware subsystems of the computer system

       The memory hierarchy including Locality of reference and how it is used to perform effective memory hierarchy management, the various mapping, replacement, and dynamic allocation algorithms for cache and virtual memory management

       The alternative CPU scheduling schemes, their tradeoffs, and their applications to other queue processing situations

       Why and how deadlocks can happen, the difficult tradeoffs faced when attempting to deal with the resource deadlock problem, and distinguish between the different deadlock prevention and avoidance schemes

       Software race conditions, their origin and the problems they can cause, along with knowing how to apply semaphores to mitigate the race condition problem

       The various operating systems issues associated with I/O and file management.



Schedule (Tentative):








1††††††††††††††††††††† 1.1†††††††††††††††††† Introduction, Motivation, and Overview of an Operating System with

††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† an emphasis on its role as a Manager of Hardware Resources


2††††††††††††††††††††† 1.2-1.4†††††††††††† History of Computer Hardware (including a review of H/W structures)

††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† and how Operating Systems Evolved in tandem with the Hardware


3-8†††††††††††††††††† 4††††††††††††††††††††† Memory Management, including the need for Memory Management,

††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† Temporal and Spatial Locality of Reference, Virtual Memory

††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† Management, Segments and Pages, Page Tables and TLBs,

††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† Page Replacement Algorithms (Optimal, FIFO, LRU, Working Set,

††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† PFF) Belady's Anomaly, Fragmentation, Best vs. First Fit


9-12†††††††††††††††† 2.5†††††††††††††††††† Processor Management, CPU Scheduling including Preemptive, and

††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† Non-Preemptive, First-Come First-Served, Shortest Job First,

††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† Shortest Remaining Time, Priority Based Scheduling, Round-

††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† Robin, Modified RR, and Multi-Level Queues


13-18†††††††††††††† 3††††††††††††††††††††† Resource Management and Deadlocks, including how deadlocks happen,

††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† modeling of deadlocks using Holt Resource Allocation Graphs,

††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† Detection and Recovery, Deadlock Prevention Schemes, Deadlock

††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† Avoidance Schemes, Banker's Algorithm, Resource Trajectories


19-22†††††††††††††† 1.5,2.3†††††††††††† Processes and their Management including IPC, Race Conditions,

††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† Critical Regions, Disabling Interrupts, Lock Variables,

††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† Strict Alternation, Peterson's Solution, Semaphores


23-26†††††††††††††† 2.4†††††††††††††††††† Classical IPC Problems including Producer-Consumer and Readers-

††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† Writers, and their solutions using Semaphores


27-28†††††††††††††† 5††††††††††††††††††††† File System Management including iNodes, Disk Scheduling (FIFO, SSF,

††††††††††††††††††††††††††††††††††††††††††††††††††††††††††† Elevator Scan), Interleaving, Security, and Protection




General University Policies



If you need course adaptations or accommodations because of a disability, or if you need special arrangements in case the building must be evacuated, please inform the instructor as soon as possible.Presidential Directive 97-03 requires that students with disabilities register with DRC to establish a record of their disability.



Academic integrity is essential to the mission of San Josť State University.  As such, students are expected to perform their own work (except when collaboration is expressly permitted by the course instructor) without the use of any outside resources.  Students are not permitted to use old tests, quizzes when preparing for exams, nor may they consult with students who have already taken the exam. When practiced, academic integrity ensures that all students are fairly graded. Violations to the Academic Integrity Policy undermine the educational process and will not be tolerated.  It also demonstrates a lack of respect for oneself, fellow students and the course instructor and can ruin the universityís reputation and the value of the degrees it offers.


We all share the obligation to maintain an environment which practices academic integrity.  Violators of the Academic Integrity Policy will be subject to failing this course and being reported to the Office of Judicial Affairs for disciplinary action which could result in suspension or expulsion from San Josť State University.



At SJSU, cheating is the act of obtaining or attempting to obtain credit for academic work through the use of any dishonest, deceptive, or fraudulent means. Cheating at SJSU includes but is not limited to:


Copying in part or in whole, from anotherís test or other evaluation instrument; Submitting work previously graded in another course unless this has been approved by the course instructor or by departmental policy.Submitting work simultaneously presented in two courses, unless this has been approved by both course instructors or by departmental policy.Altering or interfering with grading or grading instructions; Sitting for an examination by a surrogate, or as a surrogate; any other act committed by a student in the course of his or her academic work which defrauds or misrepresents, including aiding or abetting in any of the actions defined above.



At SJSU, plagiarism is the act of representing the work of another as oneís own (without giving appropriate credit) regardless of how that work was obtained, and submitting it to fulfill academic requirements. Plagiarism at SJSU includes but is not limited to:


The act of incorporating the ideas, words, sentences, paragraphs, or parts thereof, or the specific substances of anotherís work, without giving appropriate credit, and representing the product as oneís own work; and representing anotherís artistic/scholarly works such as musical compositions, computer programs, photographs, painting, drawing, sculptures, or similar works as oneís own.



For Additional Information:


††††††††† http://www.sjsu.edu/senate/F06-2.htm


††††††††† http://www.cs.sjsu.edu/greensheetinfo/index.html