Operating Systems, ICS 332
This page is
http://www2.hawaii.edu/~esb/2018fall.ics332/index.html
This page is subject to change without notice -- please reload it
in your browser if an item that might affect you may have changed.
The organization of the course is described here. Please review it at the
beginning of the course and occasionally during the course.
It includes information about course goals, class time and
location, contacting the instructor or the TA, the textbook, grading,
and the no cheating policy.
If you have any questions, please contact the instructor.
Schedule
This schedule is subject to change.
The class is scheduled Mondays and Wednesdays 12-1:15pm in Watanabe 112.
The instructor's office hours are 10:30-11:30am on Mondays and 3-4pm
Thursdays in POST 305F
-- see here for details.
I usually post the presentation notes no later than the
day before the lecture.
Chapter references are to the textbook,
Operating Systems: Three Easy Pieces,
by Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau, 2018.
- Mon Aug 20, class introductions, course summary
Outline
- introductions
- course overview
Homework 0 Getting access to a Linux platform,
due August 29th.
- Wed Aug 22, overview of computer architecture
Outline
- a brief history of computers
- memory
- indirection
- Central Processing Unit
- instruction execution
- memory hierarchy
- Mon Aug 27, operating systems: overview and structure (chapter 2)
Outline
- what is an OS?
- virtualization
- resource abstraction, resource allocation
- context switching
- concurrency
- persistence
- kernel
- boot process
- kernel programming
- OS history
Homework 1 Learning about System calls,
due September 5th.
- Wed Aug 29, operating systems: overview and structure
(finishing the slides from Monday)
- kernel
- boot process
- kernel programming
- OS history
Homework 2 Processes and fork (),
due September 12th.
- Wed Sep 5, the process abstraction (chapter 4)
Outline
- processes
- single-tasking OSs and overlays
- multi-tasking OSs and multiprocessing
- process lifecycle
- process control block
- process table
- Mon Sep 10, the Unix process API (chapter 5)
Outline
- process hierarchy: parents and children
- fork
- exec
- process termination and zombie processes
- signals
- wait
- Windows and Java
Homework 3 Implementing a simple shell,
due September 26th.
- Wed Sep 12, processes (chapter 6)
Outline
- OS Mechanisms
- user mode and kernel mode
- traps
- time interrupts
- context switching
- Mon Sep 17, inter-process communications (sections 5.4 and (48.5 or 47.5, depending on which edition of the book you are using))
Outline
- message passing
- message passing APIs
- shared memory
- remote procedure calls and RMI
- Unix redirection
- pipes
See also the code for posix_shm_example.c
- Wed Sep 19, threads (section 26.1)
Outline
- threads
- Java threads
- kernel threads vs. user-level threads
Firefox technical page explaining their use of processes.
- Mon Sep 24, Exam 1 (see this study guide)
Homework 4, due October 3rd. Dr. Casanova has
an introductory video for this assignment.
- Wed Sep 26, scheduling (Chapter 7)
Outline
- long- and short-term scheduling
- CPU-bound and I/O-bound processes
- the scheduler
- objectives and algorithms to achieve these objectives
- Windows and Linux schedulers
- Mon Oct 1, scheduling
finishing up the presentation from Wednesday
- Wed Oct 3, synchronization and concurrency (Chapters 26, 27, and 28)
Outline
- race conditions
- atomic operations
- spinlocks and blocking locks
- Java locks and synchronization
CounterTestV1.java,
CounterTestV2.java, and
CounterTestV3.java.
Homework 5, due October 17th.
- Mon Oct 8, synchronization and concurrency (Chapter 32)
Outline
- deadlocks
- deadlock prevention
- deadlock avoidance
- deadlock detection and recovery
video of gridlock
- Wed Oct 10, counting and addressing
Outline
- units of storage
- exponents and logarithms
- number of address bits
additional information about
exponents and logarithms
- Mon Oct 15, main memory (Chapters 15, 16.1-2, 17.1-3)
Outline
- main memory
- virtual memory
- segmentation
- swapping
- memory allocation
Homework 6, due October 31st.
- Wed Oct 17, main memory
Outline
- dynamic loading, static loading
- static linking, dynamic linking
- overriding shared libraries
Code:
- Mon Oct 22, virtual memory (Chapter 18)
Outline
- virtual memory pages
- page tables
- exercises
- paging and shared memory
- paging and segmentation
- Wed Oct 24, exam review
Outline
- scheduling of processes and threads
- race conditions
- synchronization primitives, including atomic operations, spinlocks, mutexes, and java synchronized methods
- deadlocks
- counting, addressing, exponents (and 2x), logarithms
- main memory, swapping
- segmentation, and standard Unix segments
- allocation of contiguous blocks of memory
- static vs. dynamic loading, static vs. dynamic linking
- virtual memory
- Mon Oct 29, Exam 2
Homework 7, due November 14th.
- Wed Oct 31, virtual memory (continued from Oct 22)
- Mon Nov 5, virtual memory
Outline
- realities of page tables
- Translation Lookaside Buffer, TLB
- multi-level page tables
- inverted and hashed page tables
Code:
- Wed Nov 7, virtual memory
Outline
- demand paging
- page faults
- performance of virtual memory
- copy-on-write (CoW)
- page replacement
Homework 8, due November 28th.
- Wed Nov 14, virtual memory: page replacement algorithms
and frame allocation algorithms
Outline
- optimal page replacement
- FIFO
- Least Recently Used and approximate LRU
- Second Chance
- frame allocation algorithms
- swapping and thrashing
- memory-mapped files
- memory-mapped I/O
- Mon Nov 19, storage, Chapter 37
Outline
- magnetic disks
- disk controllers
- disk scheduling
- Shortest Seek Time First algorithm
- elevator algorithms (SCAN)
- disk reliability
- RAID: Redundant Array of Independent Disks
Link:
- Wed Nov 21, storage, Chapter 38
- disk reliability
- RAID: Redundant Array of Independent Disks
- OS management of disks
- bad blocks
- SSD: Solid State Drives
- Mon Nov 26, file system interface, Chapter 39
Outline
- disks and file systems
- file structures
- file operations
- open file table
- file locking
- directories
- mounting file systems
- protection
Homework 9 File Systems,
due December 5th.
- Wed Nov 28, file system implementation, Chapter 40
Outline
- file system implementation layers
- internal file system data structures
- virtual file system
- disk allocation and indexing
- inodes
- free space
- performance
- journaling file systems
- Mon Dec 3, file systems
Outline (continued from Nov 28th)
- disk allocation and indexing
- inodes
- free space
- performance
- journaling file systems
- Wed Dec 5, course review
What to Review
- OS principles and APIs
- computer architecture
- processes and threads
- scheduling
- synchronization: race conditions, synchronization primitives such as atomic operations, spinlocks, mutexes, and java synchronized methods. deadlocks
- counting, addressing, exponents (and 2x), logarithms
- main memory, swapping, paging, virtual memory, page tables, segmentation, and standard Unix segments
- allocation of contiguous blocks of memory
- static vs. dynamic loading, static vs. dynamic linking
- hard disk properties
- file system interfaces, file system implementations
- assignments 1 through 8
- in the textbook, this material appears in Chapters 2, 4, 5, 6, 7, 15, 16, 17, 18, 19, 20, 21, 22, 26, 27, 28, 32, 37, 38, 39, 40, 42, 43, 48.5 (which is 47.5 in older versions of the book)
See also Dr. Casanova's review, the review for the second midterm, and the study guide for the first midterm.
The final exam for this class is
scheduled for Monday Dec 10th, from 12noon to 2pm.
The exam is on the material in the entire course, with emphasis on
the material since exam 2.
Anyone wishing to take the final exam early please contact the instructor before December 3rd.
Course-Specific Student Outcomes
- Understanding of the purpose of modern operating systems, with
an appreciation for the history of operating systems
- Knowledge of, and hands-on experience with, the way in which Operating Systems enable concurrent processes and threads
- Introductory notions about concurrency issues and the solutions to these issues
- Knowledge of, and hands-on experience with, the way in which Operating Systems manage memory
- Knowledge of the main features of storage media, mainly hard drives and solid state drives
- Knowledge of the way that file systems manage persistent storage
Program Student Outcomes
- An ability to define the computing requirements of a problem and to design appropriate solutions based on established design principles and with an understanding of the tradeoffs involved in design choices
- An ability to use sound development principles to implement computer-based and software systems of varying complexity, and to evaluate such systems
- An ability to use current techniques, skills, and tools necessary for computing practice
- An ability to apply mathematical foundations, algorithmic principles, and computer science theory to the modeling and design of computer-based systems