Operating Systems (CS240)
Welcome to Operating Systems CS240.
This course is offered in the Spring Semester 2020 at the University of Idaho in Moscow.
The course is taught by Dr. Axel Krings.
contains information about the course, e.g. syllabus, class notes, pointers
to interesting places etc.
Material can be down-loaded in pdf (or postscript) format, and will be made
available in the updated form as the class goes on.
To get an idea of what this class is about, take a look at
last semester's page.
However, materials and topics constantly change, and this class will
be no exception.
If you have comments, please let me know.
Course description from UI General Catalog:
CS 240 Computer Operating Systems (3 cr),
Overview of operating systems, Operating system principles, Concurrency, Scheduling and dispatch,
Memory management, Introduction to net-centric computing, OS security. Process management.
Concurrent programming using threads.
Prereq: CS 121 and 150,
Coreq: CS 270.
Text: William Stallings, Operating System: Internals and Design Principles, Prentice Hall.
- Axel Krings (PhD), JEB 320,
- Phone: 208-885-4078, fax: 208-885-9052.
- Email: email@example.com (see comments in syllabus on email procedures)
- Office Hours:
- Class times: MWF 10:30-11:20 pm room EP 122.
Class Support Material:
- The handouts are ordered by sequence numbers and the material covered in the lectures are indicated next to the date.
Specifically, the numbers in parentheses indicate the slides covered during class, i.e., [a/b-c/d] indicates that the material covered is from sequence a (slide b) to sequence c (to slide d).
- If there are any problems with accessing the handouts,
please let me know (email, phone, smoke signs, drums, ...)!
- Corrections: some slides may contain formatting errors, typos etc.,
which have been addressed in class, but have not been reflected
in the notes posted here.
- Lecture Notes
- Lecture 1 (01/15/20): [1/01-1/16]
Sequence 1, (pdf),
Introduction, Processors, Instruction and program execution
- Lecture 2 (01/17/20): [1/17-1/29]
DMA, Interrupts, Multiprogramming, Memory hierarchy
- Lecture 3 (01/22/20): [1/30-1/42]
Sequence 2, (pdf),
OS objectives, OS services, Kernel, Linux
- Lecture 4 (01/24/20): [1/43-2/08]
Sequence 3, (pdf),
Mini-Exam 1, Evolution of OSs, JCL, I/O Devices - Speedup, uniprogramming, multiprogramming, time sharing,
major achievements in OSs,
- Lecture 5 (01/27/20): [2/09-3/15]
Sequence 4, (pdf),
Microkernel, multithreading, SMP, Overview of Unix Architecture
- Lecture 6 (01/29/20): [3/14-3/36] Assignment 1 discussion,
Processes, process execution states
- Lecture 7 (01/31/20): [4/01-5/05]
Sequence 5, (pdf),
Virtual memory, security, and more.
- Lecture 8 (02/03/20): [5/06-5/23]
Modern Operating Systems,
Process Description and Control
(control blocks, traces, state models), Traces
- Lecture 9 (02/05/20): [5/24-6/19]
Sequence 6, (pdf),
Processes cont.: OS Control Structures, Tables (Memory, I/O, File, Process), Process Image,
Process Control Block, Process State Information,
Discussion about the status of assignment 1.
- Lecture 10 (02/07/20): [6/20-6/33]
Sequence 7, (pdf),
Processes cont.: Modes of Execution (e.g., Creation, Switching),
Kernel types (from separate to process implemented), examples (Unix, SVR4),
using fork() system call.
- Lecture 11 (02/10/20): [7/01-7/03]
unix fork commands, (demonstrations of examples), [preliminary discussion of upcoming shell assignment]
Check out Assignment 2.
- Lecture 12 (02/12/20): [7/04-7/05]
Sequence 8, (pdf),
unix exec commands, (demonstrations of examples),
For more detailed discussion of fork and exec etc. also see
- Lecture 13 (02/14/20): [7/07-7/09] [res-talk/13]
Threads, single and multithreaded process model,
state of a process/thread or computation and issues of checkpointing it.
- Lecture 14 (02/19/20): [7/10-research talk]
Sequence 9, (pdf),
Discussion of Mini-Exam4,
Threads, Remote procedure calls, user-level threads (ULT), kernel-level threads (KLT), examples: Solaris,
relationship between threads and processes
- Lecture 15 (02/21/20): [8/01-9/06] (class canceled)
Sequence 10, (pdf),
- Lecture 16 (02/24/20): [9/07-09/18] (class canceled)
Sequence 11, (pdf),
Threats (ULT, KLT), multithreading,
- Lecture 17 (02/26/20): [10/01-12/03]
Sequence 12, (pdf),
System Taxonomies, Flynn's Taxonomy, microkernel
SMP, Microkernel Architecture and design,
Solaris and Linus processes and process management
- Lecture 18 (02/28/20): [12/04-12/10]
Sequence 13, (pdf),
Assignment 3 discussion,
intro to mutual exclusion.
- Lecture 19 (03/02/20): [12/11-13/04]
Mutual exclusion using test-an-set and exchange instructions,
Lamport's Bakery Algorithm,
- Lecture 20 (03/04/20): [13/05-13/13]
Sequence 14, (pdf),
Mutual exclusion cont., Lamport's Bakery Algorithms, Peterson's Algorithm,
- Lecture 21 (03/06/20): [14/01-15/06]
Sequence 15, (pdf),
Semaphores cont., Producer/Consumer Problem,
- Lecture 22 (03/09/20): [15/06-15/22]
Sequence 16, (pdf),
- Lecture 23 (03/11/20): [16/01-16/08]
Sequence 17, (pdf),
Deadlock, resource allocation graph, conditions for deadlock
- Lecture 24 (03/13/20): [16/09-xx]
conditions for deadlock,
class does not meet.
- Check out assignment 3!
- New chapter in our course. We will be going to on-line course delivery. I will let you know soon via email how this is going to work.
- Lecture 25 (03/23/20): [17/01-17/14]
Sequence 18, (pdf),
Deadlock prevention, avoidance
- Lecture 26 (03/25/20): [18/01-18/18]
Dining Philosopher Problem, Unix Concurrency Mechanisms
- Lecture 27 (03/27/20): [18/99-19/10]
Sequence 19, (pdf),
Dining Philosopher Problem, Unix Concurrency Mechanisms,
- Lecture 28 (03/30/20): [19/11-20/10]
Sequence 20, (pdf),
Memory management, fixed and dynamic partitioning
dynamic partitioning (buddy system), hardware support
- Lecture 29 (01/01/20): [21/01-21/06]
Sequence 21, (pdf),
Paging and segmentation, virtual memory
- Lecture 30 (04/03/20): [21/07-22/05]
Sequence 22, (pdf),
Mini-exams: we need to catch up. As a result we will have two min-exams. Don't miss the class period!
Mini-exam 7 (about mutual exclusion), Mini-exam 8 (semaphores and monitors).
Virtual Memory cont.
- Lecture 31 (04/06/20): [22/06-22/17]
Sequence 23, (pdf),
Paging, Translation Lookaside Buffer, Page replacement algorithms
- Lecture 32 (04/08/20): [23/01-23/15]
Sequence 24, (pdf),
Segmentation, Page replacement algorithms
- Lecture 33 (04/10/20): [23/16-23/20]
Mini-Exam 8, (about memory management, e.g., partitioning, paging etc.)
Page replacement algorithms and comparison, resident sets, cleaning policy, and load control,
Unix, Solaris and Linux memory management overview
- Lecture 34 (04/13/20): [24/02-24/13]
Sequence 25, (pdf),
Memory management cont.
- Lecture 35 (04/15/20): [24/14-25/03]
Sequence 26, (pdf),
Intro to Scheduling
- Lecture 36 (04/17/20): [25/04-26/04]
Sequence 27, (pdf),
Mini-Exam 9, (still about memory management),
- Lecture 37 (04/20/20): [26/05-26/16]
- Lecture 38 (04/22/20): [27/01-27/12]
Sequence 28, (pdf),
Assignment 4 discussion,
Scheduling wrapped up: SRT, HRRN, Feedback scheduling, Fair-Share Scheduling,
traditional unix scheduling, Bands
- Lecture 39 (04/24/20): [27/13-28/31]
Sequence 29, (pdf),
Mini-Exam 10 (scheduling),
File system directory structure, file allocation strategies, Unix file system
- Lecture 40 (04/27/20): [28/32-29/20]
File system cont.
- Lecture 41 (04/29/20): [29/21-29/46]
Sequence 30, (pdf),
general I/O management,
- Lecture 42 (05/01/20): [30/01-30/16]
Mini-Exam 11, catching up.
- Lecture 43 (05/04/20): [30/17-31/16]
Sequence 31, (pdf),
Disk scheduling, RAID systems, disk caching
- Lecture 44 (05/06/20): (05/01/20):
Sequence 32, (pdf),
Networking, [Check it out: RFC1180 - TCP/IP tutorial]
- Lecture 42 (05/08/20): Wrapping up networking and the semester
- Final mini-exam: Wednesday, May 13 starting at 10:15am. This is a timed exam!
Sample exam questions: NOTE, we have switched to mini-exams, but the type of questions are the same as those in the traditional exams below.
- Expectations: Homeworks/Assignments/Project reports are expected to look professional!
Depending on the type of writeup, e.g. if mathematical derivations are included,
they do not have to be typed in order to look good,
but be aware that I will not accept scribbles etc.
Use a new page for each problem and staple the final submission.
- Assignment 1 (pdf)
- Assignment 2 (pdf)
- Assignment 3 (pdf)
- Assignment 4 (pdf)