
Contents
CHAPTER 1: INTRODUCTION TO OPERATING SYSTEM ............................................................ 5
Introduction to Operating system .............................................................................................................. 5
Operating Systems Terminology’s ............................................................................................................ 6
The History of Operating Systems ............................................................................................................ 7
Operating System Structure ...................................................................................................................... 9
Operating System ─ Types ...................................................................................................................... 11
Operating System ─ Properties ............................................................................................................... 14
Job control .............................................................................................................................................. 18
CHAPTER 2: PROCESS MANAGEMENT .......................................................................................... 20
Definition of a Process and terms ........................................................................................................... 20
The Process Model .................................................................................................................................. 21
Process Levels ..................................................................................................................................... 21
Process States Life Cycle ..................................................................................................................... 28
Inter-process communication ................................................................................................................. 30
Race Conditions................................................................................................................................... 30
Critical Section .................................................................................................................................... 31
Mutual Exclusion ................................................................................................................................. 31
Using Systems calls 'sleep' and 'wakeup' ............................................................................................ 33
Semaphore & Monitor ........................................................................................................................ 34
Process scheduling .................................................................................................................................. 36
Definition ............................................................................................................................................ 36
Process Scheduling Queues ................................................................................................................ 36
Process scheduling and Job scheduling .............................................................................................. 38
Schedulers ........................................................................................................................................... 39
Context Switch .................................................................................................................................... 41
Process Scheduling Algorithms ........................................................................................................... 42
Deadlock ................................................................................................................................................. 45
Introduction ........................................................................................................................................ 45
Deadlock Characterization .................................................................................................................. 46
Resource-Allocation Graph ................................................................................................................. 46
Page 3 of 101
Method for Handling Deadlock //Detection ....................................................................................... 48
Description of Error Diagnosis ................................................................................................................ 52
CHAPTER 3: MEMORY MANAGEMENT ......................................................................................... 54
Introduction to Memory management ................................................................................................... 54
Memory management Objective ........................................................................................................ 54
Memory management Concepts ............................................................................................................ 54
Static vs Dynamic Loading ................................................................................................................... 55
Static vs Dynamic Linking .................................................................................................................... 56
Memory allocation technique ................................................................................................................. 56
Contiguous Allocation ......................................................................................................................... 58
Paging .................................................................................................................................................. 59
Virtual Memory ....................................................................................................................................... 62
Basic Concept of virtual memory ........................................................................................................ 62
Demand Paging ................................................................................................................................... 64
Page Replacement Algorithm ............................................................................................................. 66
Segmented paging and Paged segmentation?.................................................................................... 69
CHAPTER 4: DEVICE (1/0) MANAGEMENT .................................................................................... 74
Objectives of device (I/O) management ................................................................................................. 74
Principles of device (I/O) Hardware ........................................................................................................ 75
Device Controllers ............................................................................................................................... 76
Direct Memory Access (DMA) ............................................................................................................. 78
Principles of I/O Software ....................................................................................................................... 80
Goals of the I/O Software ................................................................................................................... 80
Introduction to I/O software ............................................................................................................... 81
Device Drivers ..................................................................................................................................... 82
Interrupt handlers ............................................................................................................................... 82
Device-Independent I/O Software ...................................................................................................... 83
User-Space I/O Software ..................................................................................................................... 83
Kernel I/O Subsystem .......................................................................................................................... 83
Disks and disk operations ....................................................................................................................... 84
Overview of Mass-Storage Structure .................................................................................................. 84
Page 4 of 101
Disk Structure ...................................................................................................................................... 86
Disk Performance Parameters ............................................................................................................ 86
Disk Scheduling ................................................................................................................................... 87
Disk Management ............................................................................................................................... 89
Swap Space Management ................................................................................................................... 89
Stable Storage Implementation .......................................................................................................... 90
Disk Reliability ..................................................................................................................................... 90
Summary ............................................................................................................................................. 90
Computer clocking system ...................................................................................................................... 91
Introduction to system clocking .......................................................................................................... 91
The hardware and software clocks ..................................................................................................... 91
Computer terminals ................................................................................................................................ 92
Computer Terminal Hardware ............................................................................................................ 92
Summary ............................................................................................................................................. 93
Input/Output software ....................................................................................................................... 93
Virtual devices ......................................................................................................................................... 93
Objective of Virtual devices ................................................................................................................ 93
History of Virtual devices .................................................................................................................... 93
Virtual Device Types ............................................................................................................................ 94
CHAPTER 5: FILE MANAGEMENT ................................................................................................... 96
File management .................................................................................................................................... 96
File system .............................................................................................................................................. 96
File Concept......................................................................................................................................... 96
File Structure ....................................................................................................................................... 96
File Attributes ...................................................................................................................................... 97
File Operations .................................................................................................................................... 97
File Types – Name, Extension ............................................................................................................. 98
File Management Systems: ..................................................................................................................... 98
File-System Mounting ........................................................................................................................... 100
File Access Mechanisms ........................................................................................................................ 100
Space Allocation .................................................................................................................................... 100
- Teacher: NICKSON KIPRONO