Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit


Cmp Sci 4760 – Operating Systems

Department of Computer Science

Spring 2022


Welcome This is a course about operating systems and system programming.  You will learn the algorithms to manage the internals of operating systems, specifically interprocess communications, process scheduling, resource management, memory management, file systems, and I/O scheduling. The course will help you with the ability to explain the internals of operating systems and improve your programming skills through large projects. I use the lessons learned in operating systems in my research and consulting work to optimize the code that I write. I’ll like

for you to improve your understanding of programming in C for tasks involving interactions with the system. We’ll do all programming in Linux using the Gnu C compiler on opsys.

This is one of the most difficult courses you will encounter in the curriculum. However, I emphasize that I’ll like you to succeed and am here to help you in any possible way, short of doing your projects.

Teaching Philosophy I believe in learning by doing things. Thus, I’ll be assigning a number of projects to simulate the algorithms you learn for operating systems. The tests will be created to assess your mastery of the concepts while the projects will assess your ability to apply the right procedure by analyzing a situation and create code to solve complex problems. I’ll be happy to help any student who gets stuck while working on the project. You are welcome to get in touch with me via Zoom at any time, or send me a message to meet over zoom to discuss any issue related to class, or even related to your career.

Course Description This course covers the structure of a generic operating system, considering in detail the al- gorithms for interprocess communications, process scheduling, resource management, memory management, file systems, and device management.  It presents examples from contemporary operating systems.  This course also requires practical projects implemented within a modern operating system or simulator environment.

Texts

•  Stallings. Operating Systems: Internals and Design Principles. Prentice-Hall, Englewood Cliffs, NJ. 2017. Required.

• Robbins/Robbins. Unix Systems Programming Communication, Concurrency, and Threads. Prentice-Hall,

2003. Required.

• Bic. Operating Systems. zyBooks, 2021. Optional. It has good exercises that can help you prepare for tests. It also has some animations that can explain some points better.

Goals of the course This course will deepen your understanding of system programming, building on the foundation acquired in CMP SCI 2750.  You will use your programming skills to design and implement data structures and algorithms used in the innards of an operating system. The overall goals of the course are:


• Understand the internals of a generic operating system

• Improve your programming skills by working on non-trivial simulations

• Become an expert programmer, ready to tackle industrial strength projects

Topics We’ll discuss the structure of a generic operating system, with an emphasis on the algorithms and data structures needed to perform various tasks to manage processes, resources, memory, files, and IO devices.  We’ll touch on the security aspects of the operating systems throughout the course. There will be extensive programming in C under Linux environment. The sequence of topics will be as follows (in that order):

• Function, Types, and Structure of Operating Systems.

• Concurrent Programming, Process Interaction and Synchronization.

• Process Management and Scheduling.

• Resource Management and Deadlock Problem.

• Memory Management.

• File System and I/O management.

Outcomes At the end of this course, you are expected to be able to proficiently perform system programming tasks. You should also be able to explain different operating systems topics outlined above. You should know the algorithms to achieve various tasks in operating systems and use the knowledge to improve the performance of your programs.

Online Learning and Time Requirements This is a fully online asynchronous course, meaning that there is no requirement for you to meet face-to-face or virtually.  The course was designed this way to allow for maximum flexibility, so you can integrate learning course content into your busy lives.  That said, this is not a self-paced course, meaning that you do have to turn in assignments and participate in discussions by specific due dates. These

due dates will require good time management on your part. You will notice that with the magnitude of projects, you may get stuck on some point/bug and end up wasting a lot of time; so it is prudent to start on your projects early.

Overall, this is an active class with online instruction complemented with extensive programming projects.  The course is a 3-credit hour course and requires 3 hours of your time each week to imbibe the online lectures in addition to the time it takes you to read the required materials, watch the videos, and complete the projects, with the programming projects taking up a lot of your time. That means that you need to plan to spend a minimum of 8 hours every week (possibly up to 10-12 hours a week) on activities related to this course.

If this is your first blended or online course, it is recommended that you log into Canvas and complete the Online Course Overview listed in your Canvas course list. If you have already completed the orientation, you do not have to retake it but you can refer to itfor helpful videos and tutorials about the technologies used in this course.

How to Succeed in This Course I truly believe in your success as a student and adapting my instruction to ensure your success. Below you will find several different instructional methods to help me accomplish my goal:

• I’ll like good participation in the course.  Therefore, I am allowing 5% points for participation.  To have objectivity, I’ll expect you to give me a one-minute audio-visual report every week on what you learned that week. You can also say things about what is going well with the course and what needs improvement. The comment will come using a tool called Voice Thread. The use of web cam will allow me to put a face to your name. You will receive 1 point for submitting the voice thread every week. At the end of the semester, all of

the points will be aggregated towards 5% of your grade. For each week, I can reasonably expect the comment by Sunday midnight. I will not accept any late submission on this and so, please submit this diligently.

• The lectures cover theoretical aspects of the course.  You’ll need to figure out the use of system calls and library functions from the Unix textbook and by reading the man pages online. I’ll be happy to guide you to whatever you need to read if you get stuck.

• The lecture notes will be available to you in the form of PDF documents. You can print those and annotate on them during lectures.

• It will be nice to see some discussions on Canvas regarding the material discussed in class, or even on new technology that you come across.  I’ll also provide you with a forum on Microsoft Teams to discuss your projects and help you prepare for the tests.

Supplemental Instruction (SI) This course offers Supplemental Instruction (SI), a free service available to all students in the course. Supplemental Instruction is an academic support program that uses study sessions to promote student success. The SI Leader is a student who has taken this course before and done well. Throughout the semester, the SI Leader will hold regular study sessions to help students with developing study skills and mastering the course content. Participation in SI is voluntary, but encouraged.

SI Leader’s Contact Information: Tan Nguyen

Email Requirements All correspondence should be made through your UMSL-provided email. Any unsigned email will go unanswered by me. Please do not send me any attachments, like screenshots or code segments, without talking to me first.

Attendance Present in class for the online component of our course is determined by participation in an “academ- ically related activity,” i.e. submission of an assignment, assessment or discussion forum posting. The last day of attendance is the last day a student is academically participating in the online course.

Documentation that a student has logged into the Canvas course site alone is not sufficient by itself to demonstrate academic attendance.

Projects You will be given programming assignments, typically a programming project every two weeks. Assign- ments will be due at 11:59pm on the due date.  Assignments should be submitted on opsys and must execute properly on opsys for proper credit. You should start working on the project as soon as it gets assigned as some of them may get tricky. If you do not know how to work on a project, see me as soon as possible for help. In the past, the students who have asked a lot of questions have scored better grades. Do not hesitate to ask a question in Teams, in my office hours, or over email, especially if you do not have an idea on how to start working on the project.

Grading The grade will be based on programming and homework assignments and three tests.  All tests will be given online and will be open book and open notes. Tests will not be proctored but you will have to take them online during the day it is announced (you can do it from home). Each assignment must be meticulously documented and clearly identify its purpose, author, and date. I will like to read your submitted code; I should not have to figure it out. It will do you good if you peruse theGnu coding standards. When you come to me for help with the code, or when you submit the code, make sure that you follow good indentation practices. If you miss any test or assignment without making prior arrangements, you will have a zero.  I will not give any make up tests.  The distribution of grades will be as follows:

Participation                  5%

Programming Projects    50%

Three Tests                    15% each

Students taking the course in graduate standing will be required to show a greater mastery of the material. This can be shown by additional work and additional mastery shown in exams.

Failure to hand in any assignment will result in an automatic zero for that assignment. If some student is unable to hand in an assignment by the deadline, he/she must discuss it with me before the deadline. I’ll encourage you to talk to other students regarding homework but you should not collaborate to the extent that two submissions are copies of each other. If you are found copying an assignment (from another student or internet), or if your submission has unreasonable similarity to another submission, you get a zero for that assignment automatically. A second offense will be reported to the university officials and students involved will face serious consequences. I may ask you to explain your code to me, possibly in a zoom call; in case you are not able to explain the code to my satisfaction, I’ll assign you a zero in that project. I’ll allow you to submit up to two projects over the semester that are seven days beyond the deadline for no penalty. However, you must let me know before the deadline that you are going to be late with submission.

Feedback and Grading Timeline: I expect that you will have feedback and grade on your submitted projects within two weeks of submission. I’ll try my best to return the graded tests to you within a week after the test. Under normal circumstances, I’ll update your participation grade within 48 hours of the due date. You can find your grade in the Grades button on Canvas.  The overall grade on Canvas is normally incorrect and does not account for different weights for participation, projects, and tests.

Miscellaneous If you have any disability that requires an accommodation (as per UMSL policy), you must notify me in advance. If you cannot attend the class due to a religious holiday or a university-sanctioned event, please let me know in advance as well. For a religious holidy, please also fill in the form available on the class web site.

You will have an account on the Linux machine opsys.cs.umsl.edu in the CS department and you should use it for all assignments. All programs must be done in C. Any assignment that fails to run on opsys automatically gets a zero. You can access opsys from home by signing on to campus VPN, or by logging on to delmar and then, ssh’ing from there.

Exam Dates

Test 1    Feb 17, 2022

Test 2    Mar 24, 2022

Test 3    May 06, 2022

Tests will be non-comprehensive but there may be a slight overlap from one test to next. There is no final exam.

Other important dates


Jan 22, 2022 Last day to enroll in the course

Feb 14, 2022 Last day to drop without receiving a grade

Mar 14, 2022 Last day to drop the course without instructor approval

Apr 18, 2022 Last day to drop the course with instructor approval


Anyone desiring an EXC grade after March 31, 2022 must be passing the course at that point to get EXC .

Tentative Calendar

Week

Week

Week

Week

Week

Week

Week

Week

Week

Week

Week

Week

Week

Week

Week

Overview of operating systems and concepts

Overview of operating systems and concepts; Interprocess Communications Interprocess Communications

Interprocess Communications

Interprocess Communications; Test 1

Process Management

Process Management

Process Management

Resource Management

Resource Management; Test 2

Memory Management

Memory Management

File Systems

File Systems; I/O Management

I/O Management; Test 3


Detailed course outline

1. Introduction

• Basic elements of a computer system: processor, memory, I/O modules

• Evolution of a microprocessor

• Instruction execution

• Interrupts

• Processor registers

• Memory hierarchy

• Multiprocessor and multicore organization

• Classification of operating systems

• Process execution modes in Unix/Linux

• Overview of operating systems structuring methods like monolithic, layered, and object-oriented

•  I/O communication

• Multiprogramming and multitasking

2. Process Coordination and Synchronization

• Process concept

• Overview of multitasking and role of interrupts

• Concurrent execution and precedence graphs (process flow diagrams)

• Race conditions, Sharing access

• Critical Section Problem

– Models for two processes, including Dekker’s Algorithm

– Models for multiple processes, including Bakery Algorithm

– Semaphores, mutex locks, and monitors

3. Process Scheduling and Dispatch

• Preemptive and non-preemptive scheduling strategies

•  Short term, medium-term, and long-term scheduling

4. Deadlocks – Causes, conditions, avoidance, prevention, and resolution

5. Physical and Virtual Memory Organization

• Offset registers, partitions, pages, segments, swapping, overlays

• Caching and associative buffers

• Fetch, placement, and replacement policies

• Thrashing and working sets

6. Device and File Management

• File systems

• File types

• File access and directory management

• Distributed file systems

• Equivalence of files and devices

• Organization of I/O subsystems, free space management, and file layout

• Disk scheduling algorithms



Appendix A

Technology Requirements: As a computer science major and a student in an online course, you are expected to have reliable internet access almost every day. Please reach out to your academic advisor or student success network if you need hardware or access to the Internet. If you have computing problems, it is your responsibility to address these through the ITS Helpdesk ([email protected]) or to use campus computing labs. Problems with your computer or other technology issues are not an excuse for delays in meeting expectations and missed deadlines for the course. If you have a problem, get help in solving it immediately from helpdesk. At a minimum, you will need the following software/hardware to participate in this course:

1. Computer with an updated operating system (e.g. Windows, Mac, Linux)

2. Updated Internet browsers (Google Chrome or Mozilla Firefox)

3. A pseudo terminal application to connect to server, for example PuTTy

4. Ability to navigate Canvas (Learning Management System)

5. Minimum Processor Speed of 1 GHz or higher recommended.

6. Reliable and stable internet connection.

7. Adobe Reader or alternative PDF reader (free)

8. A webcam and/or microphone is highly recommended.

Course Plan for the Unexpected Please stay informed about university policies, instructions and resources as they relate to the COVID-19 pandemic. It is important to me that you stay on track toward your degree completion. This section presents our course continuity plans for how we will handle situations to avoid disruption to your learning.

• All the lecture material will be available to you as PDF documents on the class web page.

• I’ll record and post all the lectures in Canvas.

• All the assignments will be available online. I’ll ask you to explain your code to me for some of the projects via zoom.

• If I am unable to lecture due to sickness or emergency, I’ll inform you before the beginning of class.Please keep a watch on your email and pay attention to announcements on Canvas.