1.1 OS: An Intro 1.2 Types of OS: 1.4.2 Schedulers
1.1 OS: An Intro 1.2 Types of OS: 1.4.2 Schedulers
1.1 OS: an intro (a) Pointer (to the next process’s PCB)
(b) Process ID
1.2 Types of OS (c) Process State
(d) Program Counter
1. Batch Processing
(e) CPU Registers
2. Time-sharing
(f) Memory Mgmt Info
3. Distributed
(g) List of opened files
4. Network
(h) Protection Info
5. Real-time (Hard and Soft)
6. Mainframe
7. Server 1.4.2 Schedulers
8. Multiprocessor
1. Short Term (Dispatcher or CPU Scheduler) [Ready → Running]
9. Embedded
2. Middle Term (Swapping) [Suspended/Blocked/Waiting → Ready]
10. Smart Card
3. Long Term (Job Scheduler) [New → Ready]
1.3 Properties of OS (a) I/O-bound Process
(b) CPU-bound Process
1. Batch processing
2. Multitasking
3. Multiprogramming 1.4.3 Preemption
4. Multiuser
1.4.4 Process/CPU Scheduling
5. Real-time
6. Distributed 1. Scheduling Algorithm Goals
7. Interactivity (a) All Systems
8. Spooling
• Fairness
• Policy Enforcement
1.4 Process Management • Balance
1.4.1 Processes (b) Batch Systems
• Throughput
1. Process
• Turnaround Time
2. Process States
• CPU Utilization
(a) New
(c) Interactive Systems
(b) Ready
(c) Running i. Response Time
(d) Waiting ii. Proportionality
(e) Terminate (d) Real-time Systems
3. Context Switching • Meeting Deadlines
4. Process Control Block (PCB) • Predictability
2
2. Scheduling Algorithms 5. Semaphores [Wait = P(), Signal = V()]
(a) FCFS [Convoy Effect] (a) Counting
(b) Shortest Job First (SJF) (b) Binary
(c) Longest Job First (LJF) 6. Mutexes
(d) Shortest Remaining Time Next (SRTN) 7. Classic Problems of Synchronization
(e) Priority Based (Preemptive and Non-preemptive)
t − ns (a) The Producer-Consumer (or bounded-buffer) Problem
(f) Round Robin [q ≤ ] (b) The Readers-Writers Problem
n−1
(g) Guaranteed (c) The Dining-Philosophers Problem
(h) Lottery 8. Monitors
(i) Fair-share 9. Message Passing
(j) Highest Response Ratio Next (HRRN)
(k) Multilevel Queue
(l) Multilevel Feedback Queue
1.4.7 Deadlocks
1.4.5 Multi-Threading
1. Resources (Preemptable and Nonpreemptable)
1. Thread 2. Resource Allocation
2. Types of Thread (a) Request
(a) User Level Thread (b) Use
(b) Kernel Level Thread (c) Release
3. Multi-Threading 3. Resource Allocation Graph
4. Multi-Threading Models 4. Conditions for Deadlocks
(a) One to One (a) Mutual Exclusion
(b) One to Many (b) Hold-and-wait
(c) Many to Many (c) No-preemption
(d) Circular wait
1.4.6 Process Synchronization 5. Deadlock Handling Mechanisms
(a) Deadlock Detection
1. Inter Process Communication
2. Race Conditions i. Resource Allocation Graph
3. Critical Sections (b) Deadlock Prevention
(a) Safe and Unsafe State i. Indirect Method - prevent one of the first 3 conditions to occur
(b) Banker’s Algorithm ii. Direct Method - prevent only last condition to occur
4. Critical-Section Problem (c) Deadlock Avoidance
(a) Mutual Exclusion i. Process Initiation Denial
i. Disabling Interrupts ii. Resource Allocation Denial [Banker’s Algorithm]
ii. Lock Variables (d) Deadlock Recovery
iii. Strict Alternation i. Abort all at once.
iv. Peterson’s Solution ii. Successively abort.
(b) Progress iii. Backup and restart.
(c) Bounded Wait iv. Successively preempt resources.
1.5 Memory Management 5. I/O Devices
(a) Human Readable
1. Address Binding (Compile Time, Load Time and Execution Time) (b) Machine Readable
2. Loading and Linking (Static and Dynamic) (c) Communication
3. Base and Limit Registers
4. Logical and Physical Address and Address Spaces 6. I/O Device Selection Criteria
5. Word and Byte Addressable (a) Data Rate
6. Swapping (b) Application
7. Fragmentation (Internal and External) (c) Complexity of Control
8. Memory Allocation (d) Unit of Transfer
(a) Low Memory [OS] (e) Data Representation
(b) High Memory [User Processes] (f) Error Conditions
9. Memory Allocation Mechanisms 7. Direct Memory Access (DMA)
8. Device Controllers
(a) Single-partition 9. Interrupts
(b) Multiple-partition 10. Device Driver
10. Virtual Memory 11. Disks
(a) Paging and Multilevel Paging (a) Magnetic
(b) Demand Paging i. Platters
(c) Page Replacement Algorithms ii. Surfaces
i. FIFO [Beledy Anomaly] iii. Tracks
ii. Second Chance FIFO iv. Sectors
iii. Least Recently Used (LRU) v. Cylinders
iv. Most Recently Used (MRU) (b) Electronic
v. Optimal (c) Optical
vi. Least Frequently Used (LFU) (d) RAID
vii. Most Frequently Used (MFU)
viii. Clock i. RAID 0 “Striping”: Not redundant.
ix. Working Set ii. RAID 1 “Mirroring”: Copying.
x. WSClock (Working Set Clock) iii. RAID 2 “Parallel Access”: Redundant via Hamming code.
iv. RAID 3 “Parallel Access”: Bit-interleaved parity.
(d) Segmentation v. RAID 4 “Independent Access”: Block-level parity.
(e) Segmented Paging (Multilevel) vi. RAID 5 “Independent Access”: Block-level distributed parity.
vii. RAID 6 “Independent Access”: Dual redundancy.
1.6 I/O Device Management (e) Disk Arm Scheduling Criteria
1. Daisy Chain i. Seek Time
2. Controller ii. Rotation Time
3. I/O Port iii. Rotation Speed
(a) Status Register iv. Rotation Latency
(b) Control Register v. Transfer Time
(c) Data-in Register vi. Data Transfer Rate
(d) Data-out Register vii. Recording Density
viii. Inner and Outer Diameter
4. Polling
ix. Inter Track Distance (c) exFAT (Extended FAT)
(f) Disk Arm Scheduling Algorithms (d) NFS (Network File System)
i. FCFS
ii. Shortest Seek Time First (SSTF) 1.7.2 Directories
iii. SCAN 1. Types
iv. Circular SCAN (C-SCAN)
v. LOOK (a) Single-level
vi. C-LOOK (b) Two-level
(c) Hierarchical
(d) Tree-structured
1.7 File Management (e) Acyclic-graph
1.7.1 Files (f) General Graph
2. Directory Operations
1. File Naming
2. File Structure
3. File Types
(a) Regular Files - user info
(b) Directories - system file, maintains structure of file system
(c) Character Special Files - I/O
(d) Block Special Files - Disks
4. File Access
(a) Sequential
(b) Direct/Random-access
(c) Indexed Sequential
5. File Attributes
6. File Operations
7. Space Allocation
(a) Contiguous
i. Fixed Partitioning [First, Next, Best and Worst Fit]
ii. Variable Partitioning
(b) Linked
(c) Indexed
8. Free Memory Management
(a) Bit Maps or Vectors
(b) Linked List
(c) Grouping
(d) Counting
(e) Space Maps
9. File Systems
(a) FAT (File Allocation Table)
(b) NTFS (New Technology File System)