You are on page 1of 21

Book Index Page (23)

Lecture 01 (Page 32)

❖ What is an operating system? ➔ Program that acts as an intermediary between


users/applications and the computer hardware
❖ Operating system functionalities/goals ➔
➢Start/terminate/control executing user programs
➢Make system convenient to use
➢Control and coordinate use of hardware
▪ Perform I/O, setup devices
▪ Allocate resources
▪ Use hardware efficiently
➢Implement common services
❖ Basic components of a computer system ➔ Hardware, Operating System, Application Programs,
Users
❖ Kernel ➔
• Kernel Definition (techterms.com)
• Portion of the operating system code at the core that is always resident in
memory” and facilitates interactions between hardware and software
components.
❖ Computer Startup ➔ Bootstrap program and Firmware
❖ Computer-System Organization ➔ Interrupts, Storage Structure, I/O Structure ➔ Page 35
Lecture 02 (Page 36)

❖ Interrupts ➔ Page 36
❖ Storage Structure ➔ Page 39
❖ Operating System Operations ➔ Page 49
o Dual Mode and Multimode Operation ➔ Page 52
o Multiprogramming (Batch system) ➔ Page 51
o Multitasking (Time sharing) ➔ Page 51
o Timer ➔ Page 54
❖ Computer-System Architecture ➔ Single-Processor Systems, Multiprocessor Systems, Clustered
Systems ➔ Page 43

❖ Resource Management ➔ Process Management, Memory Management, Mass-Storage


Management ➔ Page 55

❖ Virtualization ➔ Page 62
❖ Distributed Systems ➔ Page 63
❖ Computing Environments ➔ Page 68
o Traditional Computing
o Mobile Computing
o Client –Server Computing
o Peer-to-Peer Computing
o Cloud Computing
o Real-Time Embedded Systems
o Web Based Computing
❖ Open-Source Operating Systems ➔ Page 74
❖ Kernel Data Structures ➔ Page 65
o Lists, Stacks, and Queues
o Trees
o Hash Functions and Maps
o Bitmaps
❖ Chapter 01 Exercise ➔ Page 81
Lecture 03 (Page 86)

❖ Operating-System Services ➔ Page 86

❖ User and Operating-System Interface ➔ Page 88


o Command Interpreters
o Graphical User Interface
o Touch-Screen Interface
o Choice of Interface

❖ Operating System Structure ➔ Page 111


o Monolithic Structure
o Layered Approach
o Microkernels
o Modules
o Hybrid Systems ➔ macOS and iOS, Android
Lecture 04

❖ System Calls ➔ Page 92

Lecture 05

❖ System Calls ➔ Types ➔ Page 96


❖ Chapter 2 Exercise ➔ Page 131
❖ Process Concept ➔ Process, Process State, Process Control block, Threads ➔ Page 144
❖ Process Scheduling ➔ Scheduling Queues, CPU scheduling, Context switch ➔Page 148

Lecture 06

❖ Operations on Processes ➔ Process Creation (Fork), Process Termination, ➔ Page 154

Lecture 07
❖ Inter-process Communication ➔ Page 161

❖ IPC in Shared-Memory Systems ➔ Page 163


❖ IPC in Message-Passing Systems ➔ Page 165

Lecture 08

❖ IPC in Message-Passing Systems ➔ Naming, Synchronization, Buffering, Direct Communication,


Indirect Communication ➔ Page 166
❖ Examples of IPC Systems ➔ Page 170
❖ Other IPC methods ➔ Pipes, Named Pipes ➔ Page 178

Lecture 09

❖ Explanation Lecture 8
❖ Chapter 3 Exercise ➔ Page 193

Lecture 10 (Chapter 4)

❖ Overview ➔ Motivation, Benefits ➔ Page 217


❖ Processes, Threads and Processors
❖ Single and Multithreaded Processes
❖ Multicore Programming ➔ Programming Challenges, Types of Parallelism, AMDAHL’S LAW ➔
Page 219
❖ Multithreading Model ➔ Many-to-One Model, One-to-One Model, Many-to-Many Model, Two-
level model ➔ Page 223
❖ Thread Libraries ➔ Page 225
Lecture 11

❖ Pthreads ➔ Page 226


❖ Threading Issues ➔ Page 245
o The fork() and exec() System Calls
o Signal Handling
o Thread Cancellation
o Thread-Local Storage
o Scheduler Activations
o Thread Pools ➔ Page 234
❖ Operating-System Examples ➔ Linux Threads ➔Page 251
❖ Chapter 4 Exercise ➔ Page 255

Lecture 12

❖ Lecture 11 Explanation

Lecture 13

❖ Basic Concepts ➔ CPU – I/O Burst Cycle, CPU Scheduler, Preemptive and Non preemptive
Scheduling, Dispatcher ➔ Page 267
❖ Scheduling Criteria ➔ Page 271

❖ Scheduling Algorithms ➔ First-Come, First-Served Scheduling ➔ Page 272


Lecture 14

❖ Scheduling Algorithms ➔ Page 273


o Shortest-Job-First Scheduling
o Shortest Remaining Job First (SRJF)
o Round-Robin Scheduling
o Priority Scheduling
o Multilevel Queue Scheduling
o Multilevel Feedback Queue Scheduling

Lecture 15

❖ Explanation/Same as Lecture 14

Lecture 16

❖ Explanation/Same as Lecture 15

Lecture 17

❖ Thread Scheduling ➔ Pthread Scheduling ➔ Page 284


❖ Multiprocessor Scheduling ➔ Page 287
o Approaches to Multiple-Processor Scheduling
▪ Asymmetric multiprocessing
▪ Symmetric multiprocessing (SMP)
o Multicore Processors
o Load Balancing
o Processor Affinity
❖ Real-Time CPU Scheduling ➔ Page 294
o Soft real-time systems
o Hard real-time systems
Issues related to process scheduling in both soft and hard real-time operating systems ➔ Page 294

 Minimizing Latency
o Interrupt latency
o Dispatch latency
 Priority-Based Scheduling
 Rate-Monotonic Scheduling

Lecture 18

 Earliest-Deadline-First Scheduling ➔ Page 299


 Proportional Share Scheduling ➔ Page 300
 POSIX Real-Time Scheduling ➔ Page 300
❖ Algorithm Evaluation ➔ Page 311
o Deterministic Modeling/Evaluation
o Queueing Models ➔ Little’s formula

o Simulations
o Implementation
❖ Operating System Example: Linux Scheduling ➔ Page 301
❖ Practice Exercises Chapter 5 ➔ Page 318

Lecture 19 (Chap 6)

❖ Background ➔ Page 332 + Slides


o Producer Consumer Problem
o Race Condition
o Interleaved Execution sequence
o Applications and Kernel

❖ Critical-Section Problem ➔ Page 335


o A solution to the critical-section problem must satisfy the following three requirements:
▪ Mutual exclusion.
▪ Progress
▪ Bounded waiting
❖ Interrupt-based Solution
❖ Peterson’s Solution ➔ Page 337

Lecture 20

❖ Hardware Support for Synchronization ➔ Page 340


o Memory Barriers ➔ Book
o Hardware Instructions ➔ In Lecture 20
▪ Test-and-Set instruction
▪ Compare-and-Swap instruction
o Atomic Variables ➔ In Lecture 21

Lecture 21

o Atomic Variables ➔ In Lecture 21


❖ Mutex Locks ➔ Page 345
❖ Semaphores ➔ Page 347
o Semaphore Usage
o Semaphore Implementation

Lecture 22 (Page 375)

Lecture 23
❖ Monitors ➔ Page 351
o Monitor Usage
o Monitor with Condition Variables
o Implementing a Monitor Using Semaphores
o Resuming Processes within a Monitor
❖ Liveness ➔ Page 358
o Deadlock
o Priority Inversion

Lecture 24

❖ Condition Variables
❖ Monitor Solution to Dining Philosophers ➔ Page 381
❖ Spin Locks
❖ Synchronization within the Kernel ➔ Page 381
o Synchronization in Windows
o Synchronization in Linux
❖ POSIX Synchronization ➔ Page 385
❖ Chapter 7 Problems ➔ Page 401

Lecture 25 (Chapter 8)

❖ System Model ➔ Page 416


o Each process utilizes a resource as follows:
▪ request (may cause the process to wait)
▪ use
▪ release
❖ Deadlock in Multithreaded Applications ➔ Page 417
o Livelock

❖ Deadlock Characterization ➔ Page 419


❖ System resource-allocation graph ➔ Deadlocks can be described more precisely in terms of a
directed graph ➔ Page 421

❖ Methods for Handling Deadlocks ➔ Page 424

❖ Deadlock Prevention ➔ Page 425


Lecture 26

❖ Deadlock Avoidance ➔ Page 428


o Safe State

❖ Deadlock avoidance Algorithms ➔ Page 431

Lecture 27

❖ Banker’s Algorithm
o Safety Algorithm
o Resource-Request Algorithm
o Example

Lecture 28

❖ Deadlock Detection ➔ Page 435


o Single Instance of Each Resource Type
o Several Instances of a Resource Type
▪ Detection-Algorithm ➔ Page 438
❖ Recovery from Deadlock ➔ Page 439
o Process and Thread Termination
▪ Abort all deadlocked processes
▪ Abort one process at a time until the deadlock cycle is eliminated
o Resource Preemption
▪ Selecting a victim
▪ Rollback
▪ Starvation
❖ Chapter 8 Practice Exercises ➔ Page 442

Lecture 29 (Chapter 9)

❖ Background ➔ Page 456


o Basic Hardware
▪ Program addresses and memory
▪ Logical address space concept
▪ Base and Limit Registers
o Address Binding ➔ Page 458
o Logical vs. Physical Address Space ➔ Page 459
▪ memory-management unit (MMU)
▪ Dynamic relocation using a relocation register
o Dynamic Loading
o Dynamic Linking and Shared Libraries

❖ Contiguous Memory Allocation ➔ Page 462


o Memory Protection
▪ Hardware Support for Relocation and Limit Registers
o Memory Allocation ➔ Page 464
▪ Dynamic Storage-Allocation Problem
o Fragmentation
▪ External Fragmentation
▪ Internal Fragmentation
Lecture 30

❖ Paging ➔ Page 466


o Basic Method
o Address Translation Scheme

Lecture 31

❖ Paging ➔ Page 471


o TLB Associative Memory
o Paging Hardware With TLB
o Effective Memory Access Time
o Memory Protection
o Valid (v) or Invalid (i) Bit in A Page Table
❖ Shared Pages ➔ Page 475
❖ Structure of the Page Table ➔ Page 477
o Hierarchical Paging
▪ Two-Level Paging
▪ Three-level Paging Scheme
o Hashed Page Tables
o Inverted Page Tables
❖ Chapter 9 Exercise ➔ Page 491

Lecture 32

❖ Segmentation ➔ Slides

❖ Swapping ➔ Page 482

❖ Example: Intel 32- and 64-bit Architectures/


Intel Pentium ➔ Page 486
o Intel Pentium Segmentation
o Intel Pentium Paging
❖ Linux on Pentium: Segmentation
❖ Linux on Pentium: Paging
o Linear Address in Linux
o Three-level Paging in Linux
o Linux Paging: some kernel structures

❖ Chapter 10
❖ Background ➔ Page 501
o Benefits
o Virtual memory
o Virtual Address Space
❖ Implementing Virtual Memory ➔ Page 504

❖ Demand Paging
o Valid-Invalid Bit

Lecture 33

❖ Demand Paging
o Page Fault
▪ Steps in Handling a Page Fault
o Performance of Demand Paging
❖ Virtual memory allows other benefits during process creation:
o Copy-on-Write
o Memory-Mapped Files (later)
❖ Copy-on-Write ➔ Page 511

Lecture 34
❖ Page Replacement ➔ Page 513
o Basic Page Replacement
o FIFO Page Replacement ➔ Page 516
o Optimal Page Replacement ➔ Page 518
o LRU Page Replacement
o LRU-Approximation Page Replacement ➔ Page 521

o Counting-Based Page Replacement


❖ Allocation of Frames ➔ Page 525
❖ Allocation Algorithms ➔ Page 526

❖ Global versus Local Allocation ➔ Page 527


o When a page fault occurs for a process and we need page replacement, there are two
general approaches:
▪ Global replacement – select a victim frame from the set of all frames; ▪ one
process can take a frame from another
▪ Local replacement – select a victim frame only from the frames allocated to the
process. ▪ A process always uses its allocated frames
❖ Thrashing ➔ Page 531

o Working-Set Model ➔ Page 534

o Page-Fault Frequency ➔ Page 536


❖ Memory Mapped Files

Lecture 35

❖ Same as Lecture 34
Lecture 36

❖ Allocating Kernel Memory ➔ Page 538

❖ Methods ➔ Page 539


o Buddy System Allocator
o Slab Allocator
❖ The major decisions that we make for a paging system are the selections of a replacement
algorithm and an allocation policy, which we discussed earlier in this chapter. There are many
other considerations as well, and we discuss several of them here.
o Prepaging ➔ Page 542
o Page Size ➔ Page 543
❖ Chapter 10 Exercise ➔ Page 553

Lecture 37,38,39

❖ Slides

You might also like