Queen's University, Kingston, ON, Canada

CISC 324: Operating Systems

Winter 2019

Course Syllabus

The course deals with the basic concepts of multitasking systems and the foundations of operating systems. The course covers processes and threads management including process creation, execution, management, context switching, and termination, interrupts handling (e.g., hardware interrupts, traps, and exceptions), processes synchronization including critical section problem, synchronization tools (e.g., mutex, semaphores, and monitors), deadlocks, race condition, known classical synchronization problems (e.g., consumer/producer and dining philosophers problems), and memory management covering virtual memory, paging, and segmentation. The course also provides practical mapping (through labs) of what is presented in the course lectures.

Instructor

Karim Lounis, Goodwin 631, lounis@cs.queensu.ca. Research: https://lounis.weebly.com/

Teaching Assistants

The teaching assistants answer questions by email, and in person during office hours. If you have a scheduling conflict with office hours then email the TA to set up an alternate meeting time.

Taher Ahmed Mohammed Ghaleb, 17tamg@queensu.ca.
Office hours: Wednesday 10:30am-12:00pm, Goodwin 241.

Thomas Parker, 12tpjp@queensu.ca.
Office hours: Thursday 10:30am-12:00pm, Goodwin 241.

Omar El Zarif, 18oez@queensu.ca.
Office hours: Monday 2:00pm-3:30pm, Goodwin 241.

Junlu Zhou (a.k.a., Sylvia), jz52@queensu.ca.
Office hours: Friday 10:30am-12:00pm, Goodwin 241.

Guoliang Zhao, g.zhao@queensu.ca.
Office hours: Tuesday 2:00pm-3:30pm, Goodwin 524.
Guoliang Zhao will be marking the second midterm and part of the final exam.

Textbook and Course Reader

The textbook and course reader are for sale at the bookstore:

Course Schedule

assgnment
Weeks Dates Topics Slides Textbook Sections
1 Jan 7, 8, 10. Course info: Introduction, motivation, overview, and review.
Operating system overview: features and provided services
Review computer architecture (Von Neumann model).
Single-processor system and multiprocessor system.
Review of instruction execution cycle.
Process management: processes, process state, and PCB (Process Control Block)
Interrupt system: software and hardware interrupts, interrupts handlers, and system calls.
Context switching, interrupt with and without context switching.
Concurrent processes: fake concurrency and real concurrency.
Notion of threads: threads, types of threads, threads vs processes, and user-level and kernel-level threads.
Direct Memory Access (DMA), device controllers and drivers.
Lecture_01

Lecture_02

Lecture_03

Lecture_04

Lecture_05

Lecture_06
1, 2, and 3.1-3.3.
2 Jan 14, 15, 17.
3 Jan 21, 22, 24. Process synchronization.
Data race problem: Shared data corruption in concurrent programming.
Solving synchronization using boolean (failure). Critical section problem.
Assignment 1, Lab 1, and Lab 2 [due Jan 22 lecture].
Synchronization mechanisms: mutex and semaphores.
Problem of busy waiting and queue-based implementation.
Semaphores for process ordering and mutual exclusion.
Semaphores implementation on uniprocessor and multiprocessor systems.
Binary and counting semaphores.
Peterson's Algorithm for critical section problem.
Classical synchronization problems: Readers/Writers problem, Dinning philosophers, and Producer/Consumer problem.
Brief introduction on deadlock handling techniques
Resource allocation graph (request, assignment, and claim edges)
Lecture_07

Lecture_08

Lecture_09

Lecture_10

Lecture_11

Lecture_12
5 and 7
4 Jan 28, 29, 31.
5 Feb 4, 5, 7. Deadlock prevention using static rules
Deadlock avoidance using Banker's algorithm
Deadlock detection and recovery.
Memory management.
Assignment 2 [due Feb 5 lecture].
Memory pyramid, memory types, and backup memories.
Review program processing cycle (Compile, Linking, Loading and executing).
Dynamic linking and dynamic loading.
Logical and physical addresses.
Address binding: Compile time, load time, and runtime address binding.
Swapping.
Memory allocation strategies (contiguous and noncontiguous).
Assignment 3 [due Feb 11 Lecture] and Lab 3 [due Feb 18].
Address space and address translation.
Exam 1 (Feb 14)
Lecture_13

Lecture_14

Lecture_15

Lecture_16

Lecture_17

Lecture_18

7, 8 and 9.
6 Feb 11, 12, 14.
  Feb 18, 19, 21.
Reading week, no class.
   
7 Feb 25, 26, 28 Memory management continued.
Runtime Address Translation.
Single-level paging memory management scheme.
Virtual address translation in paging.
Translation Look-aside Buffer: TLB-hit and TLB-miss.
Effective memory access time.
Memory protection in paging.
Multilevel paging memory management system.
Segmentation memory management scheme.
Segmentation with paging.
Page fault and segmentation fault
Lab 4 [due Mar 1].
Assingment 4 [due Mar 5].
Virtual memory.
Page fault handling.
Page replacement algorithms
Thrashing and prevention techniques (working set and PFF)
Process synchronization (Con't)
Introduction to Monitors
Assingment 5 [due Mar 14].
Lecture_19

Lecture_20

Lecture_21

Lecture_22

Lecture_23

Lecture_24

Lecture_25

Lecture_26

Lecture_27

8 and 9
8 Mar 4, 5, 7
9 Mar 11, 12, 14
10 Mar 18, 19, 21. Monitors (Con't) and Java Monitors
CPU scheduling (FCFS, RR, PRI, SJF, SRTF, MLQ, MLFQ)
Exam 2 (Mar 19).
Message passing (Primitive signals, Sockets, RPCs)
Lab 5 [due Mar 24].
Lecture_28

Lecture_29

Lecture_30

5.8, 3.4,
and 6.1-6.3
11 Mar 25, 26, 28. Security in Operating systems
Security threats: Intentional Vs accidental, attack vs intrusion.
Security aspects: Physical, social, network, software, application, and OS.
Security services in OS: authentication, confidentiality, access control, data integrity, availability, and non-repudiation.
OS threats: Malware, system configuration, programming errors, social threads (phishing & vishing), squatting (Zombie)
Malware (Viruses, Worms, Trojan, Ransomware, Backdoor, Rootkit, Spyware, bots, and Keyloggers), hoax, and pop-up/under.
Prevention tools: Anti-virus, anti-spyware, IDS, IPS, firewall, and honypots.
Buffer overflow on the stack, overflow on the heap, and integer overflow.
Lecture_31

Lecture_32

Lecture_33

14
12 Apr 1, 2, 4. Security threats in OSs.
Protection mechanisms in OSs: Access control, ACL, and Capabilities.
Hard Disk Drive scheduling
Operating systems architectures: monolethic and micokernel, layer-based OS and loadable modules.
Assignment 6 [due Apr 2].
Correct and discuss midterm exam 2, and discuss final exam.
Lab 6 [due Apr 6].
Lecture_34

Lecture_35

Lecture_36

2.7, 16.3, 21, and 22.

Assignments

Assignment general directions:

Assignment documents:

Labs

Labs general directions:

Lab Instructions and Files:

Grade distribution

Assignments and Labs are 24% (12% for Assignments and 12% for Labs), mid-terms are 26% (13% each), and the final exam is 50%.