class: center, middle, title-slide ## CSCI 340 Operating Systems ### Final Exam Topics
--- name: cc-notice template: default layout: true .bottom-left[© Stewart Weiss. CC-BY-SA.] --- name: tinted-slide template: cc-notice layout: true class: tinted --- name:toc ### Table of Contents [Computer Systems](#chapter1)
[Operating System Overview](#chapter2)
[Processes](#chapter3)
[Threads](#chapter4)
--- name: threads ### Threads - Kernel level - Thread libraries - Implementations: 1:1, M:1, M:N, two-level - Scheduler Activations - Implicit Threading - Parallelizing Compilers - Types of Implicit Threading - Thread Pools - Fork-Join Parallelism - OpenMP - Grand Central Dispatch - Threading Issues related to fork() and exec() - Signals and Signal Handling --- name: scheduling ### Scheduling - FCFS - Shortest Job First - SRTF - Round Robin - Priority scheduling - Priority queues - Multilevel feedback queues - System Contention Scope - Process Contention Scope - Multiprocessor Scheduling Issues - Logical Versus Physical Processors - Asymmetric Multiprocessing System Scheduling - Symmetric Multiprocessor Scheduling - Shared Ready Queues - Per-Processor Ready Queues - Load Balancing - Migration Issues - Processor Affinity - NUMA Nodes - Hardware Multithreading --- name: synchronization-tools ### Synchronization Tools - Synchronization Mechanisms - Race Conditions - Race Conditions in the Kernel - Preemptive Kernels - Re-entrant Kernels - The Critical Section Problem - The Conditions A Solution Must Satisfy - Peterson's Algorithm - Limitations of Peterson's Algorithm - Memory Barriers - Hardware Support for Critical Section Solutions - Bus locking - Hardware Primitives - The Test-and-Set Instruction - Compare-and-Swap Instruction - Implementing Test-and-Set With Compare-and-Swap - Spinlocks - Ensuring Bounded Waiting Using Locks - Atomic Variables - Mutex Locks - Semaphores - Binary Semaphores for Mutual Exclusion - Counting Semaphores - Liveness - Priority Inversion --- ### Synchronization Problems - The Bounded Buffer Problem - Producer and Consumer Problem - The Readers-Writers Problem - Alternative Preferences in Readers Writers Problem - Reader-Writer Locks - The Dining Philosophers Problem - A Naive Solution Using Semaphores - Synchronization in the Modern Linux Kernel - Spinlocks in Linux - Mutexes in Linux - Semaphores in Linux --- name: deadlock ### Deadlock - Examples of Deadlock - Formal Model of a Resource Allocation System - Reusable Resource Graphs - Characterizing Deadlock: Four Necessary Conditions - Circular Waiting and Cycles: Theorems - Prevention Methods - Avoidance Algorithms - Safe and Unsafe System States - The Banker's Algorithm - Deadlock Detection - ~