Operating Systems



Course Description

An operating system (OS) is a software platform that permits shared (multi-user/multi-program) usage of a computer's hardware resources. Sharing is intended to be "isolated," "secure," and "efficient" by the OS. From the early days of digital computers (in the form of dinosauric mainframes) to the era of workstations and PCs and modern miniature computers in tablets, cell phones, and so on, the operating system has evolved. Although OS technology has changed, its main principles have remained largely unchanged and unaffected by advancements in hardware technology. These "main principles" provide answers to questions like:

  • How to handle competitive users sharing sacred resources
  • How to block active users while still enabling legal trade
  • How to reduce the risks associated with concurrent access to shared resources
  • How to feel wealthy despite being poor (in terms of costly resources)

The answers to these questions are the primary focus of this course.

This course will focus more on understanding general concepts than discussing specific features of any special operating system. Topics include kernel architectures, process abstraction, process scheduling, system calls, concurrency within the OS, virtual memory management, and file systems.

There will be at least three tricky programming assignments and some theoretical ones dealing with the OS's fundamentals.

This is a hands-on course!

Install Ubuntu ASAP, start with the shell (ls, cd, rm, cp, cd, etc.), choose an editor (emacs, gedit, etc.), write some C/C++ code, compile it with gcc, and automate it with make (start with the Lab Tutorial).

It is high recommended to take "The Operating Systems' Lab" concurrently with this course to get the most out of it.


Why Take an Operating Systems Course?

  • Since the 1970s, the ACM curriculum has recognized it as a core course (regardless of the specifics depending on the technology).
  • It is about principles of managing a complex system:
    • OS is like a government!
    • Operating systems deal with a variety of problems that are common to many different computer fields. Many complex software systems have multiple users, run programs written by third-party developers, and/or must coordinate multiple activities at the same time.
      • Cloud computing
      • Web browsers
      • Multi-user database systems
      • Internet
  • Good opportunity for employment

Prerequisites

It should go without saying that basic computer science knowledge is needed.

You should also be aware of what a computer program does when it is running.

  • A programming language course, preferably in C/C++
  • A course on computer architecture and organization
  • A course on data structures would also be helpful but not necessary.
If you have not taken such courses or have not had a fair amount of practical experience with these concepts, this course is probably too tough for you. So it is strongly advised that you do not enroll in this course. Otherwise, proceed with caution and quickly study the following necessary resourcces before moving forward:
  • “Computer Systems: A Programmer’s Perspective” by R. Bryant and D. O’Hallaron. Addison-Wesley, 2010
  • “Introduction to Computing Systems: From Bits and Gates to C and Beyond” by Yale N. Patt, Sanjay J. Patel. McGraw-Hill, 2003

References

There is no required textbook for this class; the lectures define the course material. However, if you want to supplement the lectures with additional material, the following references are recommended:

Main textbook:

Operating systems: Three easy pieces, by Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau, Arpaci-Dusseau Books, 2018

Available online: http://pages.cs.wisc.edu/~remzi/OSTEP/

Optional references:

  • Operating Systems: Principles and Practice, by Anderson, Thomas and Dahlin, Michael, 2014
  • Operating System Concepts Essentials, by Abraham Silberschatz, Peter B. Galvin, Greg Gagne, Wiley, 2013
  • Computer Systems: A Programmer's Perspective, by Randal Bryant, David O'Hallaron, ‎ Pearson, 2015


Topics & Course Schedule

The schedule listed below is tentative and may change during the semester.

Session No. Subject References
2 & 3 Introduction & History Ch2, AT&T video , Linux video, Kernighan2019
Process
4 What is a process, process API, states, PCB, Xv6 Ch4, [Bryant2015, ch7] : for information about ELF, linker, and loader
5 More details on PCB, Posix API: fork, exit, wait, exec Ch5, [Stevens2013, ch8]
6 Shell, HW supports for OS Ch6
7 Syscall & CPU virtualization mechanism Ch6
8 Scheduler 1: FIFO, SJF, STCF, RR, MLFQ Ch7, Ch8
9 Scheduler 2: MLFQ, Lottery, CFS, Multicore Ch9, Ch10
Virtual Memory
10 Preliminaries, Time sharing, static Ch15, [Bryant2015, ch6]: for information about the memory hierarchy
11 Bae+bounds, Segmentation Ch16
12 Fragmentation, Paging Ch18
13 TLB Ch19
14 Smaller pages Ch20, [Bryant2015, ch6]: for information about cache structure
15 Swap Ch21
16 Swap policy Ch22
Concurrency
20 Introduction Ch26, Ch27
21 Spinlocks Ch28
22 Yield, Queue locks Ch28, Ch29
23 Condition Variable Ch30
24 Semaphore Ch31, “The Little Book of Semaphores”
25 Dining philosophers, Zemaphore, Bugs Ch31, Ch32

In the event of a special situation, we may consider an online mode for the class.

The lecture notes are available at this address in printable format. It is recommended that you print out the lecture notes and bring them with you to class so you can add notes throughout.


Assignments

DO NOT put off assignments until the last minute. Start early!

Descriptions of assignments will be made available as the semester progresses.

Assignments release dates and due dates are as follows:

Name Date Posted (12:00 AM, IRST/IRDT) Due Date (11:59 PM, IRST/IRDT) Questions Solutions Grades
Assignment 1 Sunday, 30 October 2022 Friday, 11 November 2022 As1_Que As1_Sol As1_Grades
Assignment 2 Friday, 2 December 2022 Friday, 16 December 2022 As2_Que As2_Sol As2_Grades
Assignment 2 Friday, 23 December 2022 Wednesday, 4 January 2023 As3_Que As3_Sol As3_Grades

Note that your solutions will be assessed based on their correctness as well as their presentation and justification.

Keep in mind that "Any work you submit must be your own."

If two assignments are judged to be very similar (meaning that we believe they were constructed together), all students involved in the incident will each be penalized by -100 points on their assignment. More serious cases of academic dishonesty, such as cheating on exams or reoccurring offenses, will result in students receiving a severe penalty, such as a fail mark for the course.

You may find this course challenging, so please refrain from committing academic dishonesty in your work if you've ever felt pressured to meet a deadline. Instead, get in touch with your TAs; they are here to assist!

Late Policy:

  • You have one additional week after the due date for the assignments, but each day costs you 5% of your overall mark. As a matter of fact, this penalty will be calculated hourly, so your late submissions will be penalized by about 0.2% per hour.


Grading Policy

The class grades will be based on a 100-point total score calculated as follows:
  • Midterm Assessment: 35
  • Final Assessment: 35
  • Assignments: 15
  • Class Participation: 15
  • Class Attendance: 5
Attending class, participating in discussions, responding to in-class questions, and getting to know your TAs are always important. They will give important details about the course's practical components, such as tools, techniques, and ideas. It is good to know that TAs can move borderline cases up or down based on your participation.

Teaching Assistants

It would be best if you start a private conversation on Yekta before emailing staff since all of the staff checks there frequently, so you're more likely to receive a quicker response. If you need to contact Professor directly send an email.

Important announcements will be emailed to students and posted on the website. Please make frequent mailbox checks.

Here is the contact information for your carefully selected and highly qualified course assistants:

Bachelor of Computer Engineering at The Isfahan University of Technology
Bachelor of Computer Engineering at The Isfahan University of Technology
Bachelor of Computer Engineering at The Isfahan University of Technology

News

  • Monday, 30 January 2023: Final grades have been published and finalized!
  • Monday, 9 January 2023: Grades for Assignment 3 were released!
  • Saturday, 7 January 2023, 8:30 AM: Final Exam
  • Wednesday, 5 January 2023, 3:00 PM: The problem-solving session for assignment 3 will take place.
  • Tuesday, 4 January 2023: Grades for Assignment 2 were released!
  • Monday, 2 January 2023: Class has ended!
  • Saturday, 31 December 2022, 9:30 AM: The problem-solving session for assignment 2 will take place.
  • Friday, 23 December 2022: Assignment 3 released!
  • Saturday, 3 December 2022: Grades for Assignment 1 were released!
  • Friday, 2 December 2022: Assignment 2 released!
  • Saturday, 19 November 2022, 4:30 PM: Midterm Exam
  • Thursday, 17 November 2022, 1:00 PM: The problem-solving session for assignment 1 will take place.
  • Sunday, 30 October 2022: Assignment 1 released!
  • Monday, 19 September 2022: Class Starts!