CSC 343 - Operating Systems, Spring 2023, TuTh 12-1:20 or 1:30-2:50.

IT outages planned for spring break
 
Dr. Dale E. Parson
, http://faculty.kutztown.edu/parson
Class-time Zoom link for CSC343 OR See D2L Course CSC343 -> Content -> Overview for the link.

Student instructions for using Zoom
PRIVATE ZOOM CHAT to me for questions.
Please fill out & email Dr. Parson this permission to record slip. I will use it to take attendance in week 1.
The course is 100% via Zoom at class time. I will record & post class videos, but want you there at class time. Thanks.
 
Dr. Dale E. Parson, parson@kutztown.edu, Office hours: https://kutztown.zoom.us/j/94322223872
Office Hours Monday 3-5 PM, Tuesday 3-4 PM, Friday (Zoom only) 3-5 PM, or by appt.
Monday & Tuesday office hours are either Zoom using the above link or at Old Main 260.

Final exam time slot is Tuesday 8 AM for noon class and Thursday 8 AM for 1:30 class.
Modality is same (Zoom, in person, or recording). I will go over Assignment 4 solution.
I must have late assignments before 8 AM Tuesday the 9th to grant any points.
 

First day handout (syllabus that is specific to this semester).

Handouts

Windows users can download the WinSCP file transfer client in the Computer Science sub-menu below here.

Here is initial documentation on the State Machine language (STM) that we will use for projects.
    STM.doc.txt documents the STM's library functions and events.
    (Edit 8/26/14: Added :/usr/bin to the PATH in the above document. Added export TERM="xterm".
     We will ssh mcgonagall to run our projects. Do not run them on acad!)
Here is a conference paper on the Fall 2013 use of STM in the course.
We will use one or more of these models under ~parson/OpSys/ on acad / mcgongall to introduce the state machines.
    Make sure to attend and watch the Zoom videos.
    [:-) ~/OpSys] ls -ld hi* demo* prisonerd2020*
    -rw-r--r--. 1 parson domain users 17983 Aug 23 10:42 demo1fall2020.zip
    -rw-r--r--. 1 parson domain users 26781 Sep  1 23:24 hitakeslo2020.solution.zip
    -rw-r--r--. 1 parson domain users 26895 Aug 21 16:09 prisonerd2020.zip

UNIX "man -s3" library functions and "man -s2" system calls and the user mode / kernel mode diagram.


Textbook slides (KU password protected, use full userid@live.kutztown.edu, works better with Firefox)

    Chapter 1 -- Introduction
    Chapter 2 -- Operating System Structures
    Chapter 3 -- Processes
    Chapter 4 -- Threads
    Chapter 5 -- Process Synchronization
       
A mutex without a condition variable versus a mutex with a condition variable.       
        ~parson/OpSys/PipesPrisoners2018.problem.zip and PipesPrisoners2018.solution.zip,
            Player*.java files show synchronization solutions using atomics, locks, and semaphores.
        Here are Java doc pages for java.util.concurrent, java.util.concurrent.atomic, and java.util.concurrent.locks.
    Chapter 6 -- CPU Scheduling
   
The handout on the STM sample(...) function will be useful in upcoming assignments.
    State machines for first-come first-served, shortest job first, and round robin CPU schedulers
    Chapter 7 -- Deadlocks
    Chapter 8 -- Main Memory
    Chapter 9 -- Virtual Memory
    Chapter 10 -- Mass Storage Systems
    Chapter 11 -- File System Interface
    Chapter 12 -- File System Implementation
    Chapter 13 -- I/O Systems
    Chapter 14 -- Protection
    Chapter 15 -- Security
    Chapter 16 -- Virtual Machines
    Chapter 17 -- Distributed Systems
    Chapter 18 -- The Linux System
    Chapter 19 -- Windows 7
    Appendix A -- Free BSD

ASSIGNMENTS

    Users of the vim editor: Nathan Rew has graciously coded vim config files for syntax highlighting of our STM source code.
        Please see ~parson/OpSys/STMSyntax/ for instructions in READMEstm.txt and the two config files. Thanks, Nathan!

    Assignment 1 Game of Hide & Seek, due date via make turnitin is 11:59 PM Thursday February 16.

    Assignment 2 Multithreaded kernel access models, make turnitin due by 11:59 PM on Sunday March 12.

    Assignment 3 on Multi-level queue processor scheduling, make turnitin due by 11:59 PM Friday April 14.

    Assignment 4 on Using Reference Strings to simulate page replacement algorithms in demand paging,
        make turnitin due by 11:59 PM on Sunday May 7.

        I must have late assignments before 8 AM Tuesday the 9th to grant any points.


ZOOM Recordings

Jan 24 class into to course plans and project cycles.
Jan 26 class went over an Introductory State Machine (STM) diagram, source code, & testing.
Jan 31 class finished above, also examined hitakeslo2020 example STM on acad/mcgonagall
    $ pwd
    /home/kutztown.edu/parson/OpSys
    $ ls -ldrt hitakeslo2020.*
    -rw-r--r--. 1 parson domain users 26799 Sep  1  2020 hitakeslo2020.problem.zip
    -rw-r--r--. 1 parson domain users 26781 Sep  1  2020 hitakeslo2020.solution.zip
    drwxr-xr-x. 3 parson domain users  4096 Jan 28 15:32 hitakeslo2020.problem
    drwxr-xr-x. 3 parson domain users  4096 Jan 28 15:45 hitakeslo2020.solution
Feb 2 class Went over all of Assignment 1 handout & code. Tuesday Feb 7 will be a work session.
Feb 7 class work session with questions & answers on Assignment 1.
Feb 9 class went over Chapter 1 slides & related example commands on mcgonagall & acad.
Feb 14 class Chapter 2 slides & Chapter 3 slides up to slide 13 Process Scheduling, acad examples.
Feb 16 class More Chapter 3 up to message send/receive slide 40 and then Assignment 1 Q&A.
Feb 21 class Finished Assignment 1, state machine debugging, slide for Chapters 3 & 4.
    Thursday February 23 we will go over Assignment 2 handout above.
     Following Tuesday February 28 will be a work session on Assignment 2.
Feb 23 class went over Assignment 2 spec & handout code.
Feb 28 class went over README for Assignment 2, Q&A about processor.KernelLock[region]
    and processor.WaitQueues[region] with examples from Mutex.stm, a few other questions.
Mar 2 class Went over Chapter 5 slides through Mutex (slide 24) and 2 state machines Unsafe & Mutex.
    Those state machines are on acad / mcgonagall in ~parson/OpSys/criticalSection2023.
Mar 7 class slides & state machines on condition variables, semaphores, and read-write locks. Do atomics on 3/9.
Mar 9 class Finished Chapter 5 slides & state machine example & Java example on atomic instruction synchronization,
    compared performance of atomic variables (no system calls or wait queues) versus condition variables (with
    system calls & wait queues) for low-contention and high-contention among threads,
    started Chapter 6 on processor scheduling through slide 6 CPU Scheduler.
Mar 21 class Chapter 6 Processor scheduling through first-come first-served scheduling including looking at STM code.
Mar 23 class CPU scheduling: shortest-job first, preemptive shortest-remaining-time-first, & round-robin, including STM code.
Mar 28 class Multi-level Queue/Processor scheduling for interactive (preemptive) vs batch (non-preemptive) threads
    IO-bound are interactive, CPU-bound are batch.
Mar 30 class Went over Assignment 3 in detail, work session will be Tuesday April 4.
April 6 class Deadlock (ch 7 slides) start Memory (ch 8) with Linux examples on mcgonagall.
April 11 class Memory (ch8) up to TLB (translation lookaise buffer), slide 40. Mcgonagall examples.
April 13 class Finish Chapter 8 & do all of Chapter 9 on demand paging.
April 18 class prerecorded on April 16, README answers for Assignment 3.
April 20 class -- memory swapping STM models from spring 2021.
April 25 class Went over Assignment 4 handout instructions & code.
April 27 class Work session for assignment 4, a few repeated questions answers. See addition in red at top of assn4 handout.
May 4 class Slides & Linux interactive examples on mcgonagall & acad from Chapters 11 and 12 (above) on file systems.
May 9 final exam session went over extended solution to Assignment 4 including an enhanced, "aging" solution to LRUDirty.