Principles of Operating Systems Notes | B.Sc. (Computer Science) Semester 3 | Mumbai University | munotes
Official Notes munotes.in
Principles of Operating Systems
B.SC. (COMPUTER SCIENCE) · SEMESTER 3
Strictly as per the University of Mumbai NEP syllabus in force for B.Sc. (Computer Science)
For B.Sc. (Computer Science) students of the University of Mumbai and all its affiliated colleges
Open the book ↓munotes.in Second Year
Contents
Module I Fundamentals of Operating Systems, Processes and Threads, Process Synchronization, and CPU Scheduling
- What an Operating System Is 1
- The Two Jobs: Handing Out the Machine, and Hiding It 5
- Interrupts, Traps and the Two Modes 10
- The Timer, and Why the Operating System Always Gets the Processor Back 15
- The Functions of an Operating System 20
- Where Operating Systems Run 24
- The Services an Operating System Offers 28
- The Command Line and the Desktop 32
- What a System Call Is 36
- Watching System Calls Happen 40
- The Six Families of System Call 44
- How an Operating System Is Built 48
- Microkernels, Modules and What Linux Actually Is 51
- What a Process Is 55
- The Five States of a Process 59
- The Process Control Block 63
- The Queues, the Schedulers and the Context Switch 67
- Creating a Process: fork 71
- Running a Different Program: exec 75
- Waiting, Exiting, the Zombie and the Orphan 79
- Inter-process Communication: The Two Models 84
- Shared Memory, in Code That Runs 88
- Pipes 92
- Message Queues 96
- Blocking and Non-blocking Communication 100
- What a Thread Is 104
- Making Threads, and Waiting for Them 108
- Multicore Programming, and the Limit on It 112
- The Three Multithreading Models 116
- Thread Pools, and Handing Work Out 120
- Measuring It: Sequential Against Threaded 124
- The Shape of Every Concurrent Program 129
- A Race Condition, Made to Happen 133
- The Critical Section Problem, and the Three Conditions 138
- Peterson's Solution 142
- Hardware Help: Test and Set, and Compare and Swap 146
- The Mutex Lock 150
- The Semaphore 154
- The Bounded Buffer, Solved 158
- The Readers and the Writers 163
- The Dining Philosophers 167
- Monitors and Condition Variables 172
- Why Scheduling Exists: The Burst Cycle 177
- The Dispatcher, Preemption, and What a Switch Costs 181
- The Five Criteria, and the Arithmetic of Each 185
- Reading and Drawing a Gantt Chart 188
- First Come First Served 191
- Shortest Job First 194
- Shortest Remaining Time First 197
- Priority Scheduling, Starvation and Ageing 200
- Round Robin, and Choosing the Quantum 203
- Multilevel Queue Scheduling 206
- Multilevel Feedback Queue Scheduling 209
- All Seven Algorithms on One Problem 213
- Thread Scheduling, and What Linux Actually Does 217
Module II Deadlocks, Memory Management, Virtual Memory and Mass Storage, and the File System
- What a Deadlock Is, and the System Model 221
- The Four Conditions 225
- The Resource Allocation Graph 229
- The Four Ways to Handle a Deadlock 233
- Deadlock Prevention 236
- Safe States, and Avoidance 240
- The Banker's Algorithm 244
- The Resource Request Algorithm 248
- Deadlock Detection 252
- Recovery from Deadlock 257
- Why Memory Needs Managing 261
- Binding an Address: Compile, Load, Run 265
- The Memory Management Unit 269
- Swapping 273
- Contiguous Allocation, and the Holes It Leaves 277
- First Fit, Best Fit and Worst Fit 281
- Fragmentation, Internal and External 285
- Segmentation 289
- Paging 293
- Splitting an Address, and Translating One 298
- The TLB, and the Effective Access Time 302
- Protection and Sharing in a Paged System 307
- The Page Table Is Too Big: Hierarchical Paging 312
- Hashed and Inverted Page Tables 317
- Virtual Memory: Running What Will Not Fit 321
- Demand Paging, and the Page Fault 326
- The Effective Access Time Under Demand Paging 331
- Copy on Write 335
- Page Replacement: The Problem 340
- FIFO Replacement, and Belady's Anomaly 344
- Optimal Replacement 348
- LRU Replacement 351
- Second Chance, and the Counting Algorithms 355
- Comparing the Algorithms, and the Hit Ratio 360
- Allocation of Frames 364
- Thrashing, and the Working Set 368
- What a Disk Is, and What It Costs 373
- Disk Structure, and the Logical Block 377
- Disk Scheduling: FCFS and SSTF 381
- SCAN, C-SCAN, LOOK and C-LOOK 385
- Random Scheduling, and All Six Compared 389
- Disk Management 392
- What a File Is 397
- Opening a File, and What the Kernel Keeps 401
- Access Methods 405
- Directories, and the Shapes They Take 409
- Mounting 415
- File Sharing, and Locking 419
- The Layers a Read Passes Through 424
- On the Disk: Superblock, Inode, Data Blocks 428
- Directory Implementation 432
- Contiguous and Linked Allocation 436
- Indexed Allocation, and What a Real File System Does 441
- Free Space Management 446
- Designing a Small File System 451
The chapters
Every chapter of this book comes with the B.Sc. (Computer Science) Semester 3 notes.
The cover and the contents are free to look through. Buy the notes once to read every chapter of every subject in this semester.
Notes + practical solutions + solved papers: ₹798 Already bought it? Sign in
Or notes + practical solutions: ₹499
Or solved papers only: ₹499
Free either way: question papers, the syllabus, and the cover and contents of every book.
The rest of this subject
These notes are cut from the University's printed syllabus. Open the syllabus itself, or the past papers, for the same subject.