Computer Operating Systems: Internals and Design
Principles
Instructor: Paul Roper Email: |
Section 001 11:00-11:50 am MWF 120 TMCB |
|
CS 345
· CS 224, 240, and a knowledge of C are prerequisites for CS 345 (or the instructor’s consent).
· The text for the course is “Operating Systems Internals and Design Principles (7th Edition or later)” by William Stallings. This book will be used extensively throughout the course including homework assignments.
· All class materials are available on the CS 345 Web Site (http://students.cs.byu.edu/~cs345ta/). This includes the class syllabus, schedule, PowerPoint lectures, homework, programming assignments, messages, and other reference material. All homework, labs, and exam scores will be recorded in Gradebook. It is the responsibility of each to student to verify that all grades have been correctly recorded.
· Each student will individually implement a preemptive, prioritized operating system with virtual memory and file management capabilities.
Learning Outcomes
The objective of this course is to study the principles of concurrency and resource management with respect to the design and implementation of contemporary computer operating systems. CS 345 is designed for students majoring in Computer Science or in areas having a strong emphasis in Computer Science. At the end of the course, the student will have a basic understanding of the following:
· Design and implementation issues of contemporary operating systems.
· Detailed analysis of process, multithreading, symmetric multiprocessing, and microkernels.
· Mutual exclusion, deadlock, and starvation.
· Memory management techniques, including virtual memory.
· Various approaches to process scheduling.
· File management.
· Caching and buffering.
Course Activities
Class Lectures
PowerPoint lectures and class discussions will be presented each class period as outlined on the course schedule. There will be times when information is given in class that is not in the text nor on the class website. It is very important that students attend class and take careful notes. You will be held responsible for this information.
Computer Programming Assignments
CS 345 programming assignments consist of six labs that build upon each other and are designed to emphasize topics and objectives discussed in class.
o Lab 1: Shell. Write a Shell (Command Language Interpreter) to parse textual commands entered from the user’s keyboard, malloc argument variables, handle signals, and execute programs directly or as child processes.
o Lab 2: Scheduler. Write a five-state task scheduler capable of executing up to 128 tasks in a preemptive, prioritized, round-robin manner. Implement binary and counting semaphores and schedule your shell as its first task with pseudo-interrupt driven character input. Add timer semaphores and tasks to validate your implementation.
o Lab 3: Jurassic Park. Jurassic Park is an inter-process communication and synchronization problem between multiple tasks. Visitors to the park purchase a ticket, wait to take a ride on a park tour car to see the dinosaurs, and then visit the museum and gift shops before leaving the park. Since the park is on a limited budget, drivers must perform double duty when not sleeping by selling tickets and driving the tour cars. Visitors, drivers, and cars are represents by concurrent tasks while an additional task is used to display the park status every second.
o Lab 4: Virtual Memory. Add a Memory Management Unit to your OS that translates virtual addresses to physical addresses in a restricted memory space such that 16 LC-3 crawler and/or memory test programs execute concurrently in 2 frames of physical memory (128 words).
o Lab 5: FSS Scheduling. Add a Fair Share Scheduler (FFS) to your OS scheduler to maximize overall CPU utilization while also maximizing interactive performance. Instead of using run queues, implement a “fair” timeline of future task execution.
o Lab 6: FAT. Add a MS-DOS® FAT-12 file manager to your OS that is able to traverse file directories, view file data, and load/execute LC-3 programs from files. In addition, use system buffering, file descriptors, and file pointers to modify file allocation tables (FAT), directory structures and cluster chains.
Please pay careful attention to the following programming guidelines:
· Programming assignments can be found under "Projects" on the on the CS 345 Website (http://students.cs.byu.edu/~cs345ta/).
· Programming assignments must be completed and passed off with a “Date Modified” timestamp dated on or before the due date to receive full credit. Timestamps cannot be used for extra credit points nor older than two days.
· Any programming assignment completed and passed off after the due date will lose 10% per school day. (After 2 weeks, an assignment has no grading value!).
· Programming assignments are to be passed off by a TA during regular TA hours in the TA offices or programming labs and web submitted before a grade can be awarded.
· Programming assignments can be passed off on school computers or personal laptops (see Programming Environments below).
· As an incentive to get your programming assignments done early and to motivate you to thoroughly check your work, assignments completed and passed off at least one day before the due date (timestamps do not count) with a TA will receive 10% extra credit.
· Any grade points earned on programming assignments above the allotted percentage may apply to your overall grade.
· All six programming assignments must be completed to receive an ‘A’ or ‘A-’ grade.
· All programming assignments and homework MUST BE COMPLETED, PASSED OFF AND SUBMITTED on or before the final day of class.
Programming Environments
The choice of the software tools and programming environment is left up to the student’s discretion. The C programming language will be used for the programming assignments. This can be accomplished in several ways:
· Windows users can download a very good C compiler at the LCC website (http://www.cs.virginia.edu/~lcc-win32/) for free!
· For those who do not own a computer or would just rather do their work using BYU facilities, there are Windows/Linux/Unix labs available in the Computer Science building. A gcc compiler is available on all Linux machines.
·
In any case, it is the student’s
responsibility to present their work to a TA for pass-off.
Homework / Reading Quizzes
Homework and reading quizzes are designed to reinforce class material, help in exam preparation, and to encourage students to stay current with reading assignments. In-class participation is strongly correlated with a student’s understanding of the subject matter. Students may be randomly selected to present their homework solutions to the class.
· Homework assignments can be found under "Homework" on the CS345 Website.
· Homework is at the beginning of class. At that time, homework may be discussed and graded with students being called upon to present their solutions.
· Most homework will consist of 5 to 10 questions and cover the material from the previous class discussions.
· Homework must have the student’s name, section, and homework number clearly indicated at the top of the homework to be accepted for grading. Answers must be clearly legible as well to be graded.
· Any homework submitted after the due date will lose 50% per week. (After 1 week, an assignment has no grading value!).
You are welcome and encouraged to discuss the homework with your classmates and others. However, you are to do and submit your own work. Submitting someone's work is considered cheating for which you will receive an E grade for the class and be reported to the Honor Code Office. No grade is worth the consequences of dishonesty!
Class Presentations
At the end of the semester, each student (in a small group setting) is given the opportunity to present a specific OS topic with respect to an assigned contemporary operating system. Your presentation will be peer graded and should be complete (ie., self-contained, concise, relevant, adequately addressed topic), insightful (ie., researched, thoughtful, shows effort), and presented well (ie., materials, slides, handouts, examples, stage presence, well organized, intro/summary). Your presentation will be the final exam for the course.
Course Assessment
Exams
Two midterms will be administered during the course of the semester. Midterm exams will be administered in the testing center and be available from Friday until closing on Saturday. You should plan at least 1-2 hours for each exam. Any exam taken after the scheduled exam days will be worth (at maximum) half credit unless prior arrangements have been made with the instructor.
Grades
Your grade will be based on programming assignments (55%), homework (10%), presentation (15%), and exams (20%) as follows:
· Programming assignments (55%)
o Lab 1: Shell - 7%
o Lab 2: Tasking - 10%
o Lab 3: Jurassic Park - 10%
o Lab 4: Virtual Memory - 10%
o Lab 5: Scheduling - 6%
o Lab 6: FAT - 12%
· Homework / Quizzes - 10%
· Presentation / Final - 15%
· Midterm 1 - 10%
· Midterm 2 - 10%
Grades are assigned on the following scale from the composite total of above areas:
100-93 |
A |
82-80 |
B- |
69-67 |
D+ |
92-90 |
A- |
79-77 |
C+ |
66-63 |
D |
89-87 |
B+ |
76-73 |
C |
62-60 |
D- |
86-83 |
B |
72-70 |
C- |
59-0 |
E |
In order to receive an A or A- grade, a student must complete all six programming assignments and pass the final exam (70% or better). Any student who completes all six programming assignments, regardless of the points awarded and passes the final exam (non-normalized 70% or better), will receive at least a passing grade (C-).
The university policies on 'UW' and 'I' grades will strictly be followed.
Grading Verification and Appeal Policy
It is the student’s responsibility to verify that lab, homework, and exam scores have been correctly recorded in Gradebook before the last day of class. Please disregard Gradebook’s grading system (ie, final grade, maximum points, etc.) until further notice.
Academic Honesty
The Honor Code includes a
statement of standards regarding academic honesty. Academic honesty includes completing your own
homework, programming assignments, midterms, and final. Students should work together to help each
other understand material, but should always turn in their own work. Examples of academic dishonesty include sharing
code for assignments with other students, turning in someone else’s code as
your own, sharing exam material with other students, and cheating on an
exam. Any violation of academic honesty
standards will result in failing the class.
All violations of academic honesty are documented and reported to the
Honor Code office.
Preventing Sexual Harassment and Discrimination
Title IX of the Education
Amendments of 1972 prohibits sex discrimination against any participant in an
educational program or activity that receives federal funds. The act is intended to eliminate sex
discrimination in education. Title IX
covers discrimination in programs, admissions, activities, and student-to-student
sexual harassment. The BYU policy
against sexual harassment extends not only to employees of the university but
to students as well. If you encounter
unlawful sexual harassment or gender based discrimination, please talk to your
professor; contact the Equal Employment Office at 378-5895 or 367-5689
(24-hours); or contact the Honor Code Office at 378-2847.
Students with Disabilities
Brigham Young University
is committed to providing a working and learning atmosphere which reasonably
accommodates qualified persons with disabilities. If you have any disability which may impair
your ability to complete this course successfully, please contact the Services
for Students with Disabilities Office (378-2767). Reasonable academic accommodations are
reviewed for all students who have qualified documented disabilities. Services are coordinated with the student and
instructor by the SSD Office. If you
need assistance or if you feel you have been unlawfully discriminated against
on the basis of disability, you may seek resolution through established
grievance policy and procedures. You
should contact the Equal Employment Office at 378-5895, D-282 ASB.
Disclaimer
This syllabus is subject
to change during the semester in favor of the student as deemed necessary by
the instructor. It is the student’s
responsibility to stay current with class policies and check the class
website, Learning Suite, and their email often during the week.
Overview
The following table is an outline of text book chapters, number of lectures, topics and projects.
Stalling’s Chapter |
|
Topic |
Project |
Chapter 1: Computer System Overview 1.1 Basic Elements 1.2 Evolution of the Microprocessor 1.3 Instruction Execution 1.4 Interrupts 1.5 The Memory Hierarchy 1.6 Cache Memory 1.7 Direct Memory Access 1.8 Multiprocessor and Multi-core
Organization Chapter 2: Operating System Overview 2.1 Operating System Objectives and
Functions 2.2 The Evolution of Operating Systems 2.3 Major Achievements 2.4 Developments Leading to Modern
Operating Systems 2.5 Virtual Machines 2.6 OS Design Considerations for
Multiprocessor / Multicore |
4 |
OS Overview Computer Systems |
Project 1 (Shell) |
PROCESSES AND THREADS |
|
|
|
Chapter 3: Process Description and Control 3.1 What is a Process? 3.2 Process States 3.3 Process Description 3.4 Process Control 3.5 Execution of the Operating System Chapter 4: Threads 4.1 Processes and Threads 4.2 Types of Threads 4.3 Multicore and Multithreading |
4 |
Processes Threads |
Project 2 (Tasking) |
CONCURRENCY |
|
|
|
Chapter 5: Concurrency: Mutual Exclusion and Synchronization 5.1 Principles of Concurrency 5.2 Mutual Exclusion: Hardware Support 5.3 Semaphores Chapter 6: Concurrency: Deadlock and Starvation 6.1 Principles of Deadlock 6.2 Deadlock Prevention 6.3 Deadlock Avoidance 6.4 Deadlock Detection 6.5 An Integrated Deadlock Strategy 6.6 Dining Philosophers Problem Appendix A: Topics in Concurrency |
6 |
Mutual Exclusion Concurrency |
Project 3 (Jurassic
Park) |
MEMORY |
|
|
|
Chapter 7: Memory Management 7.1 Memory Management Requirements 7.2 Memory Partitioning 7.3 Paging 7.4 Segmentation Chapter 8: Virtual Memory 8.1 Hardware and Control Structures 8.2 Operating System Software |
6 |
Memory Management Virtual Memory |
Project 4 (Virtual
Memory) |
SCHEDULING |
|
|
|
Chapter 9: Uniprocessor Scheduling 9.1 Types of Scheduling 9.2 Scheduling Algorithms Chapter 10: Multiprocessor and Real-Time Scheduling 10.1 Multiprocessor Scheduling 10.2 Real-Time Scheduling |
6 |
Scheduling |
Project 5 (Scheduling) |
FILE MANAGEMENT |
|
|
|
Chapter 11: I/O Management and Disk Scheduling 11.1 I/O Devices 11.2 Organization of the I/O Function 11.3 Operating System Design Issues 11.4 I/O Buffering 11.5 Disk Scheduling 11.6 RAID Chapter 12: File Management 12.1 Overview 12.2 File Organization and Access 12.3 File Directories 12.4 File Sharing |
8 |
File Management FAT |
Project 6 (FAT) |
MISCELLANEOUS TOPICS |
|
|
|
Chapter 13: Embedded Operating Systems 13.1 Embedded Systems 13.2 Characteristics of Embedded Operating
Systems |
|
|
|
STUDENT PRESENTATIONS |
|
|
|
3.7 UNIX SVR4 Process Management 8.3 UNIX and Solaris Memory Management 8.4 Linux Memory Management 8.5 Windows 7 Memory Management 10.3 Linux Scheduling 10.4 UNIX FreeBSD Scheduling 10.5 Windows 7 Scheduling 11.8 UNIX FreeBSD I/O 11.9 Linux I/O 11.10 Windows 7 I/O 12.8 UNIX File Management 12.9 Linux File Management 12.10 Windows 7 File System 13.3 eCOS 13.4 TinyOS |
6 |
|
|