COSC 450 Operating System, Spring 2025 (Jan. 27 ~ May 13)

Week

Lecture Notes

Announcement

Week-01

(01/27/25~01/31/25)

Note #0  .PDF

·         Introduction to COSC450

Note #1  .PDF

Overview of Operating System

·         What is operating system

·         Macroscopic view of computer system

·         Computer Structure – Von Newmann Architecture

o   Von Newmann Bottleneck

·         Instruction cycle

·         History of Computer system

o   First Generation

o   Second Generation

o   Third Generation

o   Fourth Generation

o   Fifth Generation

 

 

Week-02

(02/03/25~02/07/25)

Note #2  .PDF

Overview of Operating System

·         Computer system architecture

·         Operating System Implementation

o   Multiprogramming

o   Multitasking

o   Dual-Mode Multimode Operation

·         Multiprocessor System Types

o   Multiprocessor System with single core Chip

o   Multiprocessor System with multiple core Chip

o   Symmetric multiprocessing(SMP) – one physical memory shared

o   Non-Uniform memory access (NUMA) – each processor has local memory, but share one physical address space

o   Clustered System

·         Asymmetric clustering

·         Symmetric clustering

·         Multiprogramming

·         Operating System Operation

o   Dual-Mode and Multimode Operations

Note #3  .PDF

Overview of Operating System

·         OS as a Resources Manager

o   Process Management

o   Memory Management

o   File Management

o   Input / Output System Management

o   Deadlock Management

o   Cache Management

·         Operating System Structures

o   Monolithic

o   Layered System

o   Microkernels

o   Virtual machine

o   Client-Server module

o   Exokernels

 

 

Week-03

(02/10/25~02/14/25)

Note #4  .PDF

Process & Thread Management

·         Process Model

·         Process Creation

·         Process Termination

·         Process States

·         Process Table (Process Control Block)

·         Process with Multiple-Threads

·         Process Scheduling

o   Scheduling Queues

o   CPU Scheduling

o   Context Switch

·         Process Creation in Linux

·         Process Termination in Linux

·         Android Process Hierarchy

 

 

Mini-Test #1 (2/13/25)

Note #1, #2, #3

Solution .PDF

Week-04

(02/17/25~02/21/25)

Note #5  .PDF

Process &Thread Management

·         Interprocess Communication

o   With Shared Memory (shared memory in Linux)

o   With Message Passing (message Queue, socket in Linux)

·         Threads

o   Overview of Threads

o   Benefit of Threads

o   Multicore Programming with Threads

 

Note #6  .PDF

Process & Thread Management

·         Thread Implementation

o   User level thread

o   Kernel level thread

·         Multithreading Model

o   Many-to-one

o   One-to-One

o   Many-to-Many

·         The Thread Library

·         The Threading Issues

o   Issues with fork(), exec()

o   Signal handling

o   Thread termination

o   Thread local storage

o   Scheduler Activations

 

 

 

Week-05

(02/24/25~02/28/25)

Note #7  .PDF

Process & Thread Management

·         Scheduler

o   Long-Term, Short-Term (CPU), Memory

·         Scheduling Queues

·         Preemptive or Non-preemptive Scheduling

·         Scheduling Criteria

·         CPU Scheduling (Shot-term Scheduler)

o   FCFS (First Come First Serve)

o   Shortest Job First

o   Shortest Remaining Time

o   Round Robin

o   Priority Queue

o   Guaranteed Scheduling

o   Lottery Scheduling

 

Note #8  .PDF

Process & Thread Management

·         Multi-Processor Scheduling

o   Approaches to Multiple Processor Scheduling

o   Scheduling for Multicore processors

·         Fine Grained multithreading

·         Coarse-Grained multithreading

·         Load Balancing

 

 

Note #9  .PDF

Process & Thread Management

·         Real-Time CPU Scheduling

o   Minimizing Latency

o   Preemptive Priority-Based Scheduling

o   Rate-Monotonic Scheduling

o   Earliest-Deadline-First Scheduling

o   Proportional Share Scheduling

·         Criteria for selecting an algorithm

 

Week-06

(03/03/25~03/07/25)

Note #10  .PDF

Process & Thread Management

·         Inter-Process Communication

·         Race Condition

·         Critical Section (or region)

·         Solutions for Mutual Exclusion in a Critical Section

o   With Busy Waiting

·         Disabling Interrupts

·         Lock Variables

·         Strict Alternation

·         Peterson’s Solution

·         Hardware Solution

o   Test and Set Lock

o   Memory Barriers

o   Atomic Variable

·         Priority Inversion problems with busy waiting

 

Note #11  .PDF

Process & Thread Management

·         Mutual Exclusion in a Critical Section

o   With Sleep and Wake up

·         Producer Consumer Problem

·         Race Condition Producer Consumer problem

·         Semaphore

o   Concept of Semaphore

o   Semaphore Operation

o   Semaphore Implementation

o   Producer Consumer problem with semaphores

o   Careless Usage of semaphore causes deadlock

·         Dining Philosophers Problem

·         Reader’s and Writer’s Problem

·         Mutexes

·         Monitor

o   Implementation of Monitor

o   Producer Consumer with Monitor

·         Message Passing

o   Producer Consumer with Message Passing

 

 

Week-07

(03/10/25~03/14/25)

Note #12  .PDF

Memory Management

·         With Mono-Process

·         With Multi-Processes

·         Multi-process with Fixed partition-

o   With separate input Queue

o   With single input Queue

·         Multi-process with variable partition

·         Modeling Multiprogramming

·         Swapping

·         Free Memory Space Management

o   With Bitmap

o   With Free-List

 

Note #13 .PDF

Memory Management

·         Virtual Memory

·         Virtual Memory with Paging

o   Page tables

o   Physical Address Mapping(MMU)

 

 

Mini-Test #2(3/11/25)

Note #4, #5, #6, #7, #10, #11

Solution .PDF

Week-08

(03/17/25~03/21/25)

Spring Break

 

Week-09

(03/24/25~03/28/25)

Note #14  .PDF

Memory Management

·         Virtual Memory with Paging

o   Page Table with Hardware Support

·         Translation Look-Aside Buffer

o   Page Table Structure

·         Shared Pages

·         Multilevel Page Table

·         Hashed Page Table

·         Inverted Page table

 

Note #15  .PDF

Memory Management

·         Demand Page and Page Fault

·         Free-Frame List

·         Performance of Demand Page with Page Fault

·         Swapping with Paging

·         Copy-on-Write between Parent and Child

·         Page Table Entries

·         Page Replacement Algorithms

o   Optimal Algorithm

o   Not Recently Used

o   First In First Out

o   Second Change

o   The Clock Page Replacement

o   Least Recently Used

 

 

 

Week-10

(03/31/25~04/04/25)

Note #16  .PDF

Memory Management

·         Belady’s Anomaly

o   Structure of Stack Algorithm

o   Stack Algorithm

·         Design Issues for Paging System

o   Local versus Global allocation

o   Load Control

o   Page Size

·         Segmentation

o   Hardware for Segmentation Implementation

o   Advantage and Disadvantage with Segmentation

·         Segmentation with Paging (case study MULTICS)

 

Note #17  .PDF

File Management

·         File System

o   File Name

o   File Structure

o   File Types

o   File Access

o   File Attributes

o   File Operation

·         Directories

·         Directory Operations

·         File System Layout

·         Implementing File –How to save file in the disk

o   Contiguous Allocation

o   Linked List Allocation

o   Linked List Allocation with File Allocation Table

o   Index-Node

·         Implementing Directories

Midterm 1 Review Note .PDF

Midterm #1 (4/3/25)

Note #1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14

Solution .PDF

Week-11

(04/07/25~04/11/25)

Note #18  .PDF

File Management

·         Shared File in multiuser system

o   Save i-node index

o   Symbolic link

·         Log-Structured File System (extension of i-node + contiguous)

·         Journaling File System

 

Note #19  .PDF

File Management

·         Disk Space Management

·         Free Block Management

o   Linked List

o   Bit Map

·         Disk Quota

·         File System Backup

o   Physical Backup

o   Logical Backup

 

 

Week-12

(04/14/25~04/18/25)

Note #20  .PDF

Deadlock Management

·         What is Deadlock?

·         Resource Allocation Graph

o   Deadlock example with Resources Allocation Graph

·         Resource Types for a Process

·         Sequence for Resource Use

·         Implementation of Resource request, use and release

·         Deadlock Condition

·         Four Strategies for Dealing Deadlock

 

 

 

Mini-Test #3 (4/15/25)

Note #12, 13, 14, 15, 16

Solution .PDF

Week-13

(04/21/25~04/25/25)

Note #21 .PDF

Deadlock Management

·         Deadlock detection and Recovery.

o   Detection with one resource of each type

o   Detection with multiple resource of each type

·         Detection Algorithm with multiple matrix

o   Recover from Deadlock after a deadlock detection

 

Note #22  .PDF

Deadlock Management

·         Deadlock Avoidance

o   Safe and Unsafe State

o   Banker’s Algorithm for a Single Resource per each Type

o   Banker’s Algorithm for Multiple Resource per each Type

·         Deadlock Prevention

o   Attack Mutual Exclusion

o   Attack Hold and Wait

o   Attack No Preemption

o   Attack Circular Wait

 

 

Mini-Test #4 (4/24/25)

Note #17, #18, #19

Solution .PDF

Week-14

(04/28/25~05/02/25)

Note #23  .PDF

Input/Output Management

·         Input / Output

o   I/O Devices (categories, components)

o   Device Controllers

o   How CPU communicate with Device controller

§  Memory-Mapped I/O (Indirect)

§  Non-Memory-Mapped I/O (Direct)

§  Hybrid

o   Direct Memory Access (DMA)

o   Interrupt Revisited

 

Note #24  .PDF

Input/Output Management

·         Principle of I/O Software

o   Goal of I/O Software

o   Implementation of I/O

§  Programmed I/O

§  Interrupt-Driven I/O

§  I/O using DMA

·         Input /Output Software Layer

o   Interrupt Handler

o   Device Driver

·         Hard Disk Driver (HDD)

 

 

Midterm #2 Review note .PDF

Midterm #2 (5/1/25)

Note #13, 14, 15, 16,17,18, 19, 20, 21, 22

Solution .PDF

Week-15

(05/05/25~05/09/25)

Note #25  .PDF

Input/Output Management

·         Solid State Driver (SSD)

o   Structure of Solid State Driver

o   Architecture of a SSD

o   Basic Operations in SSD (read, write erase)

o   Flash Translation Layer (FTL)

o   Garbage Collection

 

 

Final Exam Review Note .PDF

Class Pictures

Pic1

Pic2

Pic3

Pic4

 

Week-16

(05/12/25~05/13/25)

 

 

 

 

Final Exam

(05/15/25~05/21/25)

Final Exam: Comprehensive

Date: 5/16/25

Time:1:30 P.M. ~ 4:00 P.M.