In-class notes for 09/28/2020
CS 273 (OS), Fall 2020
Exam Wednesday - in-person in RNS 310 (except for remote students)
45 minutes
No computers, technology, book, notes, etc.
Seating will be assigned; papers will be upside down on desk (keep upside down until I give the signal)
Turn in by leaving upside down on desk or box at front of room.
Wash in, wash out
To study for quiz
General items
Terms: operating system, process, system call, kernel, shell, user vs system portions of a process, (Linux) signal
Understand these terms enough to be able to read and write about them.
Four main services of an operating system
- Process management
- Memory management
- Devices
- File system
Process states -- be ready to discuss how OS services (e.g., I/O operations, scheduling, system calls such as
wait()
, interrupt handling) relate to the process-state diagramSystem calls
General familiarity with behavior of most emphasized system calls:
open()
,read()
,write()
,close()
,fork()
,execve()
,wait()
,dup()
,kill()
,getpid()
.Know arguments and return for
fork(), execve(), wait()
Arguments/return would be provided if needed for the others
Relationship between open-file data structures and file descriptor table
Process diagrams -
fork/exec/wait
, redirection of standard input/standard output (only)
Process diagrams, including
fork/execve/wait
, redirection of output, pipelines, etc.Algorithms and data structures for processes:
Process table -- Array of process table entries; each PTE contains information relevant to a particular process. Have a general familiarity with type of information (see examples).
Interrupt vector
Algorithm for handling interrupts -- study these steps, and ask any questions on Piazza or on questions of the day for next class meeting.
Programming with system calls: be prepared to write segments of C code that may use any of the following system calls: fork(), execve(), wait()
References:
~rab/os/mopen.c
,~rab/os/forkeg.c
, and steps 2-4 of Strategy for developing a shellArguments - see man pages for system calls fork, execve, wait
IPC strategies
Busy wait, TSL, ______
Race conditions (correct behavior depends on timing) and four conditions for correct IPC - understand each
Mutual exclusion; bounded wait; independence of speed; progress
Know them - be able to describe them and apply them
Semaphores, monitors, message passing:
Data structures and primitives; see also class notes on these IPC strategies
Review the shared data structure in-class exercises (semaphores, monitors, message passing)
Review text's producer/consumer examples
Usage contexts for each of these IPC strategies, e.g., monitors are implemented within a programming language
Race conditions: definition; locating race conditions.
pthreads programming -
Reading knowledge (e.g.,
~rab/os/pthreads.c
)Coding similar to homework or modifications of given code.
Scheduling
Memory management overview
Technical challenge? Effect on the programmer? Effect on user?
< >