lOMoARcPSD|42440652
Operating-System-1 - notes
Business information technology
, lOMoARcPSD|42440652
MINISTRY OF EDUCATION
DIPLOMA IN
INFORMATION COMMUNICATION
TECHNOLOGY
STUDY NOTES
Operating Systems
Page 1 of 101
, lOMoARcPSD|42440652
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 2 of 101
, lOMoARcPSD|42440652
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 3 of 101
Operating-System-1 - notes
Business information technology
, lOMoARcPSD|42440652
MINISTRY OF EDUCATION
DIPLOMA IN
INFORMATION COMMUNICATION
TECHNOLOGY
STUDY NOTES
Operating Systems
Page 1 of 101
, lOMoARcPSD|42440652
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 2 of 101
, lOMoARcPSD|42440652
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 3 of 101