Skip to content

hacker-404-error/Operating_System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 

Repository files navigation

OPERATING SYSTEM

Table Of contents

ID CHAPTER NO.
1 INTRODUCTION
2 PROCESS MANAGEMENT
3 CPU SCHEDULING
4 THREADS & MULTITHREADING
5 PROCESS SYNCHRONISATION & DEADLOCK
6 MEMORY MANAGEMENT
7 VIRTUAL MEMORY
8 FILE SYSTEM

CHAPTER-1 INTRODUCTION

Sno. TOPICS
0. Introduction_Written_Notes
1. What is Operating System
2. Services Of OS
3. Goals Of OS
4. Parts Of OS
5. Protection In OS
6. Types Of OS

What is Operating System?


1-Interface between user and hardware.
2-Set of utilities to simplify application development.
3-Control Program.
4-Acts like Govt.

this is where operating system lies

Services Of Operating System


this is where operating system lies

Goals Of Operating System


1-Memory Management
2-Processor Management 
3-Device Management 
4-File Management 
5-Security 
6-Job Accounting 
7-Control Over System Performance 
8-Interaction with the Operators 
9-1-Error-detecting Aids 
10-Coordination Between Other Software and Users 

Parts Of Operating System

Parts Of OS

Protection In Operating System - DUAL MODE

Let: 
-user is writting something in MS Word (process is in user mode (mode bit=1)).
-If user want to save this file : 
-user and MS word do not have the authority to make changes in disk (saviing process).
-User calls (system call) to save this file.
-Operating system have all authorities to make changes in disk(saving file).
-Operating system change the mode bit to 1(kernel process (cannot accessible by users)and 
-execute system call (saving the file in the disk).
AND 
-Return to user process by changing mode bit to 1.

Parts Of OS

Types Of Operating System

Parts Of OS

CHAPTER-2 PROCESS MANAGEMENT

Sno. TOPICS
0. Process Management Notes
1. What Is Process?
2. Representation Of Process
3. Operation On Process
4. Attribute Of a Process
5. Process Control Block
6. Process State
7. Process Scheduling

What is Process?

PROGRAM (INSTRUCTION) + RUN TIME ACTIVITY = PROCESS

1-An instance of a program
2-Unit of executuion
3-Locus of control

Representation Of Process

Representation of process

1.Stack
 The process Stack contains the temporary data such as method/function parameters, return address and local variables.
	
2.Heap
 This is dynamically allocated memory to a process during its run time.
	
3.Text
 This includes the current activity represented by the value of Program Counter and the contents of the processor's registers.
	
4.Data
 This section contains the global and static variables.

Operation On Process

Operation

Attribute Of Process

1. PID Process id
2. List of Device
3. Program Counter
4. General Purpose Register
5. TYpe Of Process 
6. SIze Of Process
7. Memory limits
8. Priority
9. Stacks
10. List Of Files ETC.

Process Control Block

PCB

NOTE:

THESE ALL ATTRIBUTES ARE STORED IN ONE BLOCK - PROCESS CONTROL BLOCK.
PROCESS CONTROL BLOCK STORES IN OPERATING SYSTEM PROTECTED AREA.
PROCESS CANNOT ACCESS ITS OWN PCB.

Process State

Process state diagram

Process scheduling

1-The process scheduling is the activity of the process manager that handles the removal of the running process from the CPU
and the selection of another process on the basis of a particular strategy.

2-Process scheduling is an essential part of a Multiprogramming operating systems.
Such operating systems allow more than one process to be loaded into the executable memory at a time 
and the loaded process shares the CPU using time multiplexing.

Types Of Queues

1-Job Queue:
  All the process which are in new state are kept in job queue.
2-Ready Queue:
  All the process which are in raedy state are kept in job queue
3-Device Queue:
  All the process which are waiting for specific device are kept in job queue

Queue

Context Switch

When the scheduler switches the CPU from executing one process to execute another,
the state from the current running process is stored into the process control block.
After this, the state for the process to run next is loaded from its own PCB and
used to set the PC, registers, etc.
At that point, the second process can start executing.

Context Switches

Types Of Schedulers

1-Long Term Schedulers:
  Schedule the process from ready state to new state
2-Short Term Schedulers:
  Schedule one of all the process from ready state to running state
3-Mid Term Schedulers:
  Schedule the process from ready state to suspended state
  Schedule the process from waiting state to suspended state 

CHAPTER-3 CPU SCHEDULING

Id. Topics
1. What is CPU Scheduling
2. Goal Of CPU Scheduling
3. Scheduling Times
4. Process Execution ALgorithms

About

Hand Written Notes on Operating System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published