0% found this document useful (0 votes)
12 views36 pages

PPT OS_2_Process Management_Scheduling

The document provides an overview of operating systems, including their introduction, services, structure, and various types such as batch, multiprogramming, multitasking, real-time, and multiprocessor operating systems. It also discusses concepts like booting processes, process management, scheduling algorithms, and the significance of context switching. Additionally, it outlines the roles of different schedulers and CPU scheduling criteria in managing processes within an operating system.

Uploaded by

himanshu yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views36 pages

PPT OS_2_Process Management_Scheduling

The document provides an overview of operating systems, including their introduction, services, structure, and various types such as batch, multiprogramming, multitasking, real-time, and multiprocessor operating systems. It also discusses concepts like booting processes, process management, scheduling algorithms, and the significance of context switching. Additionally, it outlines the roles of different schedulers and CPU scheduling criteria in managing processes within an operating system.

Uploaded by

himanshu yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 36

Operating Systems

Introduction of OS
Services provided by an OS
Structure of an OS (Kernel & Shell)

Types of Kernel

Dr. Dinesh C. Dobhal


Types of Kernel
Operating System
Introduction of OS
Services provided by an OS
Structure of an OS (Kernel & Shell)
Types of Kernel
Types of OS

Dr. Dinesh C Dobhal


Types of OS

● Batch Operating System


● Multiprogramming Operating System
● Multitasking Operating System
● Real time Operating System
● Multiprocessor Operating System
What is Punch Cards?
How punch cards were used?
Batch operating system
Jobs with similar needs are batched together and run as a group.

● Firstly, user prepares his job using punch cards.


● Then, he submits the job to the computer operator.
● Operator collects the jobs from different users and sort the jobs into batches with similar needs.
● Then, operator submits the batches to the computer and the job are taken by CPU one by one
from the card reader.
● When the job is finished, the operator separate and keep the printed output.
The problems with Batch Systems are as follows −

● Lack of interaction between the user and the job.


● CPU is often idle, because the speed of the mechanical I/O devices is slower than the CPU.
● Low Throughput / Uniprogramming / Serial Processing [No Multiprogramming]
● Wastage of memory [ Internal fragmentation ]

User
Card Processo
Program r
Reader

Punch Cards OS
Memory
Multiprogramming OS Start
Load Complete
waiting Execution

I/O

Higher Throughput
Better utilization of RAM
Multitasking / Time Sharing OS Start
Load Complete
Waiting Execution

Timer Expire

I/O Request
I/O Complete
I/O

Higher Throughput
Better Utilization of RAM
Higher Interaction
Real Time Systems

Real time system means that the system is subjected to real time, i.e., response should be guaranteed within a
specified time constraint or system should meet the specified deadline. For example: flight control system,
Robotic surgery, etc.

Types of real time systems based on timing constraints:

1. Hard real time system –


This type of system can never miss its deadline. Missing the deadline may have disastrous consequences.The
usefulness of result produced by a hard real time system decreases abruptly and may become negative if
tardiness increases. Tardiness means how late a real time system completes its task with respect to its
deadline. Example: Flight controller system, Robotic surgery.
2. Soft real time system –
This type of system can miss its deadline occasionally with some acceptably low probability. Missing the
deadline have no disastrous consequences. The usefulness of result produced by a soft real time system
decreases gradually with increase in tardiness. Example: reservation system
Multiprocessor operating system
Multiprocessor operating system allows the multiple processors, and these
processors are connected with physical memory, computer buses, clocks, and
peripheral devices. Main objective of using multiprocessor operating system is to
consume high computing power and increase the execution speed of system.
Symmetric Multiprocessors
In these types of systems, each processor contains a similar copy of the operating system and they
all communicate with each other. All the processors are in a peer to peer relationship i.e. no
master - slave relationship exists between them.

UNIX and Windows NT support SMP.

Asymmetric Multiprocessors
In asymmetric systems, each processor is given a predefined task. There is a master processor that
executes OS and gives instruction to all the other processors. Asymmetric multiprocessor system
contains a master slave relationship. For example, IBM System/360
Parallel processing OS
It breaks the task or a process into sub-tasks and distribute these sub-tasks among all the available
processors present in the system. Thereby, executing the task in the shortest time. All the processors in the
system share the common secondary storage like the hard disk.
Distributed Operating System
Supports distributed system which is a model where computer application are running on a set of
computers that are interconnected by network. These are loosely coupled system which means they have
no hardware connection at CPU level. Distributed OS communicate with each other with LAN or WAN
technology and also allows for various resource sharing.
Operating System

Types of OS
Booting of Operating System
Booting is a startup sequence that starts the operating system of a computer when it is turned on.

Hard (Cold) Booting


POST is compulsory

Soft (Warm) Booting


POST is optional, No power cut

Shell---Kernel---MBR
Linux Booting Process

Stage I II
GRand Unified Bootloader

Run levels
0 Shutdown
1 Single User Mode
2 Multiuser Mode (Limited) Shell / GUI
3 Multiuser Mode (Full/CUI)
4 Not Used
5 Multiuser Mode (Full/GUI)
6 Restart
Linux Commands

1. Internal Commands
2. External Commands

User
Programs
CPU
Disk
Shell

Kernel
Operating System
Unit 2
[Process Management]

Program, Process, & PCB


Context Switching,
Process scheduling,
CPU scheduling criteria,
Types of Schedulers & Scheduling algorithms,
Multiple-processor scheduling,
Threads
Program and the Process
Finite set of instructions (a.k.a Code) that is written in a particular programming language of a computer for a
particular task. When a program is in running state, it is called as a process.

State Transition Diagram of a process


Process Control Block (PCB)
Operating System
Unit 2
[Process Management]

Program, Process, & PCB


Context Switching,
Process scheduling,
Types of Schedulers,
CPU scheduling criteria & Scheduling algorithms,
Multiple-processor scheduling,
Threads
Context Switching: is the process of storing the state of a process, so that it can be restored and
resume execution at a later point.
Process scheduling:
Scheduling is the process of controlling the execution of the processes, in which operating
system decides whether the currently running process should continue its execution, if not,
which process should run next.

There are two main objectives of the process scheduling and they are:
1. To keep the CPU busy at all times and
2. To deliver "acceptable" response times for all programs, particularly for interactive ones.

Process Scheduling is done in the following four circumstances:


1. When a process switches from the running state to the waiting state
2. When a process switches from the running state to the ready state (For example, when an interrupt occurs)
3. When process switches from the waiting state to the ready state (For example, at completion of I/O)
4. When the process is terminated
Types of Process Schedulers:
The process scheduler is the component of the operating system that is responsible for scheduling of the processes.

The long-term scheduler: It determines which programs are


admitted to the system for processing. Thus, it controls the degree
of multiprogramming.

The mid-term scheduler: It is part of swapping and


determines when processes are to be suspended and resumed.

The short-term scheduler: It determines which of the ready


processes can have CPU resources, and for how long.
Operating System
Unit 2
[Process Management]

Program, Process, & PCB


Context Switching,
Process scheduling,
Types of Schedulers,
CPU scheduling criteria & Scheduling algorithms,
Multiple-processor scheduling,
Threads
CPU scheduling criteria
Technical Terms:
● Burst time: The time for which a process holds the CPU is known as burst time.
● Arrival time: Arrival Time is the time at which a process arrives at the ready queue.
● Turnaround time: The interval from the time of submission of a process to the time of completion is the turnaround time.
● Waiting time: Waiting time is the amount of time a process has been waiting in the ready queue.
● Response Time: Time between submission of requests and first response to the request.
● Throughput: number of processes completed per unit time.
● Dispatch latency – It is the time it takes for the dispatcher to stop one process and start another running.
● I/O bound process: - The process which spends more of its time doing I/O operations than it spends doing computations are called I/O
bound process.
● CPU bound process: - The process that generates I/O request infrequently and uses more time for performing computations is called
CPU bound process.
.
Scheduling Algorithms
• CPU Scheduling is a process of determining which process will own CPU for execution while
another process is on hold.
• The main task of CPU scheduling is to make sure that whenever the CPU remains idle, the OS at
least select one of the processes available in the ready queue for execution.
• The selection process will be carried out by the CPU scheduler. It selects one of the processes in
memory that are ready for execution.

Types of CPU Scheduling


FCFS Scheduling Algorithms

Process Arrival Time CPU Burst I/O Burst

P1 0 24 0

P2 0 3 0

P3 0 3 0

The Gantt chart for the schedule is:


FCFS Scheduling Algorithms

Process Arrival Time CPU Burst

P1 0 5

P2 2 4

P3 3 3

The Gantt chart for the schedule is:

You might also like