Operating System



Course Description

An operating system is a software platform which enables the shared (multi-user/multi-program) usage of the hardware resources inside a computing machine. The OS tries to provide sharing in an "isolated", "secure", and "efficient" manner. The OS has been along all the way since the infancy of the digital computers (in the form of dinosauric mainframes) to the era of work-stations and PCs, and modern miniature computers in the tablets, cell phones and so on. Although, the OS technology has evolved, the main principles are general enough such that they have remained almost intact and independent of changes in the hardware technologies. These "main principles" are the answers to the general questions such as:

  • How to manage sharing the sacred resources among competitive users?
  • How to isolate active users while allowing lawful trade?
  • What are the challenges of concurrent access to shared resources and how to avoid them?
  • How to be poor (in the amount of expensive resources) and still make the feeling of being rich?

The answers to such questions are the main topics of this course. We will discuss and practice about them in the context of computing resources (CPUs, memories, ...) but you will learn techniques for your entire life.

This course is hands-on

As soon as possible: Install ubuntu, play with shell (ls, cd, rm, cp, cd, ...), choose an editor (emacs, gedit, ...), write C codes, compile with gcc, and automate with make (you can start with Lab Tutorial)

Flipped Mode (mostly!)

Video of lectures will be provided prior to the class and an interactive discussion session based on the lecture videos will be held every week during class hours.


Topics & Course Plan

Session No. Subject Homework & Project Resources
2 & 3 Introduction & history Ch2, AT&T video , Linux video, Kernighan2019
Process
4 (5mhr-Arbaein) what is a process, process API, states, PCB, xv6 Ch4, [Bryant2015, ch7] : for information about ELF, linker, and loader
5 (10mhr) more details on PCB, Posix API: fork, exit, wait, exec Ch5, [Stevens2013, ch8]
6 (12mhr) shell, HW supports for OS Ch6
7 (17mhr) syscall & cpu virtualization mechanism Ch6
8 (19mhr) scheduler 1: FIFO, SJF, STCF, RR, MLFQ HW1, Prj1 Ch7, Ch8
9 (24mhr) scheduler 2: MLFQ, Lottery, CFS, multicore Ch9, Ch10
Virtual Memory
10 (26mhr) preliminaries, Time sharing, static Ch15, [Bryant2015, ch6]: for information about the memory hierarchy
11 (1abn) Bae+bounds, segmentation Quiz1 (29mhr-1abn) Ch16
12 (3abn) fragmentation, paging Ch18
13 (8abn) TLB Ch19
14 (10abn) Smaller pages Ch20, [Bryant2015, ch6]: for information about cache structure
15 (15abn) swap Ch21
16 (17abn) swap policy HW2 Ch22
17 (22abn) miscellaneous Ch21, Ch23
18 (24 abn) memory API Ch14, Ch17
[Virtual Machine]
19 (29abn) Virtual Machine Midterm (exact date: TBA) Appendix
Concurrency
20 (1azr) introduction Ch26, Ch27
21 (6azr) spinlocks Ch28
22 (8azr) yield, queue locks Proj2 Ch28, Ch29
23 (13azr) condition variable Ch30
24 (15azr) semaphore HW3 Ch31, “The Little Book of Semaphores”
25 (20azr) dining philosophers, zemaphore, bugs Ch31, Ch32
Persistence
26 (22azr) I/O Devices Ch36, intel white paper
27 (27azr) HDD Quiz3 (25-27azr) Ch37, HDD internal videos: video 1, video 2
28 (29azr) RAID Ch38
29 (4day) filesystem API Ch39
30 (6day) VSFS: very simple filesystem HW4, Quiz4 (16-18day) Ch40

Homeworks' deadlines: HW1: 07/30, HW2: 08/28, HW3: 09/26, HW4: 10/17


Marking

  • Homeworks: 15%
  • Projects: 15%
  • Quiz: 15% (ignoring the least)
  • Midterm: 25%
  • Final: 30%
  • Activity (discussion questions): 5%
For each homework/project, late submission for one week is accepted but with a penalty of 5% per day.

Resources

Required 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 resources:
  • 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


Importance

  • As a core course (independent of details depending on the technology) in ACM curriculum recommendation since 1970s
  • It is about principles of managing a complex system:
    • OS is like a government!
    • The challenges that operating systems address are not unique — they apply to many different computer domains. Many complex software systems have multiple users, run programs written by third party developers, and/or need to coordinate many simultaneous activities.
      • Cloud computing
      • Web browsers
      • Multi-user database systems
      • Internet
  • Good job opportunity

Prerequisite

You should already have some idea of what a computer program does when it runs.
  • A course on programming languages
  • A course on computer organization
  • A data structure course is helpful but not necessary
If not, this course is going to be difficult— so you should probably drop this course, or quickly study the necessary background material before continuing:
  • “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

TA Team

Bachelor student at Isfahan University of Technology.
  • Email: mnaeimi@ec.iut.ac.ir
  • linkedin: https://www.linkedin.com/in/mhmdnmi
Bachelor student at Isfahan University of Technology.
  • Email: majidfarhadi78@ec.iut.ac.ir
Bachelor student at Isfahan University of Technology.
  • Email: d.mehraeen@ec.iut.ac.ir

Mailing List

Important announcements will be sent to the class mailing list (yekta.iut.ac.ir) and also posted to the web page. Please check your mailbox frequently. The preferred method to contact me is through my email: mrheidar@iut.ac.ir

Class News

  • 06/30: Marking scheme changed
  • 06/27: Class starts!