
Operating Systems Summary Fabian Damken Contents 1 Introduction 5 1.1 History . .5 1.2 Definition over Hardware Abstraction . .5 1.2.1 Portable Operating System Interface (POSIX) . .5 1.2.2 Linux Standard Base (LSB) . .5 1.2.3 x86 Rings . .6 1.2.4 Monolithic vs. Micro-Kernel . .6 1.3 Definition over Coordination . .6 2 Processes and Inter-Process-Communication 7 2.1 Processes . .7 2.1.1 Process Family and Hierarchy . .7 2.2 Concurrency . .8 2.3 Process Management . .9 2.3.1 Process Control Block . .9 2.3.2 Process Creation (POSIX) . 10 2.3.3 Process Termination . 11 2.3.4 Inter-Process-Communication . 11 2.4 Inter-Process-Communication Models . 12 2.4.1 Shared Memory . 12 2.4.2 Message Passing . 13 3 Threads 16 3.1 Process vs. Thread Model . 16 3.2 Example: Multi-Threaded Web Server . 17 3.3 Theoretical Speedup (Amdahl’s Law) . 17 3.4 Implementations . 17 3.4.1 Many-to-One . 17 3.4.2 One-to-One . 18 3.4.3 Many-to-Many . 18 3.4.4 Two-level Model . 18 3.5 Linux Threads/Tasks . 18 3.6 POSIX Threads (C) . 19 3.7 Single to Multi-Threaded . 19 4 Deadlocks and Resource Management 20 4.1 Resource Management . 20 4.1.1 Google Chubby Lock Service . 20 4.1.2 Resource Sharing and Inter-Process-Interaction . 20 4.2 Deadlock/Livelock and Starvation . 21 4.3 Deadlock Conditions . 21 4.4 Deadlock Modeling and Visualization . 21 4.5 Deadlock Strategies . 22 4.5.1 Detection . 22 4.5.2 Recovery . 23 1 4.5.3 Avoidance . 24 4.5.4 Prevention . 25 5 Scheduling 27 5.1 Scheduling Criteria (Optimizations) . 27 5.2 Issues . 27 5.3 Determining Length of next CPU Burst . 28 5.4 Flavors of Scheduling . 28 5.4.1 First Come, First Serve (Non-Preemptive) (FCFS) . 28 5.4.2 Shortest-Job-First (SJF; SRFT/A.SJF) . 29 5.4.3 Round Robin (RR/TDMA) with Fixed Slots . 29 5.4.4 Priority Scheduling (PS) . 30 5.5 Scheduler Location . 31 5.6 Multilevel Feedback Queue . 31 5.7 OS Examples (Solaris, Windows, Linux) . 32 5.7.1 Solaris . 32 5.7.2 Windows . 32 5.7.3 Linux . 32 6 Mutual Exclusion 33 6.1 Concurrent Access to Shared Resources . 33 6.2 Taxonomy of Software Misbehavior . 33 6.2.1 Types of Bugs . 33 6.3 Critical Sections . 33 6.4 Mutual Exclusion and Critical Sections . 33 6.5 Mutual Exclusion Strategies . 34 6.5.1 Interrupts . 34 6.5.2 Process Alternation . 35 6.5.3 Locks . 35 6.5.4 Semaphores . 35 6.6 Classical Problems . 38 6.6.1 Dining Philosophers . 38 6.6.2 Readers/Writers Problem . 38 7 Memory Management 40 7.1 Abstraction . 40 7.2 Avoiding Slow Disk Loads in Commodity Systems . 40 7.2.1 Address Spaces and Implementations . 40 7.3 Base and Bounds . 41 7.3.1 Memory Layout . 42 7.3.2 Memory Safety . 42 7.3.3 Requirements . 42 7.3.4 OS/Hardware Interactions . 43 7.3.5 Pros and Cons . 47 7.4 Segmentation . 48 7.4.1 Memory Layout . 48 7.4.2 Address Translation . 48 7.4.3 Stack Address Calculation . 48 7.5 Paging . 48 7.5.1 Implementation . ..
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages58 Page
-
File Size-