Download as pdf or txt
Download as pdf or txt
You are on page 1of 81

Fundamentals of Operating Systems

UNIT-I

Bindu Madhavi Tummala

July 13, 2023

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 1 / 81


Where OS Resides?

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 2 / 81


OS Usage

Hardware Abstraction: makes hardware useful to the end user


applications.
Resource Management: Managing the computer resources.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 3 / 81


Sample Program

How the string is printed on the monitor?


Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 4 / 81
Background Schema

Very complex and tedious process


Hardware dependent
Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 5 / 81
Without OS ...

The programmer has to care about all the core hardware details.
What hardware is used in the system?
How the hardware components work?’
How and what hardware components should cordinate with each
other?

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 6 / 81


What is the role of OS now? ABSTRACTION

Easy to program applications.


Reusable functionality.
Portablity i.e. applications need
not to be changed even though
the underlying hardware
changes.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 7 / 81


OS as Resource Manager

Multiple applications with limited hardware.


So, the hardware needs to be shared.
Protects apps from each other.’
Improves efficiency or the overall performance by effective
utilization of resources.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 8 / 81


Sharing the CPU

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 9 / 81


Sharing the Memory

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 10 / 81


Share but Isolate

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 11 / 81


Operating Systems Types: Application specific

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 12 / 81


Operating Systems Types: Processor Specific
An operating system is a set of programs that enables a user to operate
and interact with a computer. There are many types of operating
systems based on processor type:
Batch OS
Time sharing OS
Distributed OS
Network OS
Real-time OS
Embedded OS
Multiprogrammed OS
Multiprocessor OS
Mobile OS
Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 13 / 81
Operating Systems Types: Processor Specific: Batch
OS

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 14 / 81


Operating Systems Types: Processor Specific: Batch
OS

A batch operating system grabs all programs and data in the batch form
and then processes them. The main aim of using a batch processing
system is to decrease the setup time while submitting similar jobs to the
CPU. A batch monitor is started for executing all pooled jobs, after
reading them. These jobs are divided into groups, and finally, precede
the same jobs in a similar batch. Now all batched jobs are ready for
execution one by one, and due to this system enhances the system
utilization while decreasing the turnaround time.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 15 / 81


Batch OS:Advantages
In a batch system, all jobs are performed in repeating form without
the users permission.
Can be feed input data without using extra hardware components.
Small scale businesses can use it for executing small tasks to their
benefit.
It consumes less time for executing all jobs and can manage
repeated large work easily.
Sharing with multiple users is possible and the idle time is very less.
You can assign a specific time for each batch and when the
computer is idle it starts processing the next batch.
Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 16 / 81
Batch OS:Disadvantages

Time-varying process characteristics. If any job halts, then the


workload will increase.
Due to any mistake, any job can enter into an infinite loop. If your
protection system is not well then that job can affect pending jobs.
Computer operators must be trained for using batch systems. It is
difficult to debug batch systems and are sometimes costly.
If some job takes too much time i.e. if an error occurs in the job
then other jobs will wait for an unknown time.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 17 / 81


Batch OS:Examples

Payroll System
Bank Invoice System
Transactions Process
Daily Report
Research Segment
Billing System

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 18 / 81


Operating Systems Types: Processor Specific:
Time-sharing OS

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 19 / 81


Time-sharing OS

Time-sharing is a logical extension of multiprogramming. The CPU


executes multiple jobs by switching, among them, but the switches
occur so frequently that the users can interact with each program while
it is running. It provides direct communication between the user and the
system. A time-shared OS uses CPU scheduling and multiprogramming
to provide each user with a small portion of a time-shared computer.
When a process executes, it executes for only a short time before it
either finishes or needs to perform I/O. Several jobs will be kept
simultaneously in memory, so the system must have memory
management and protection services.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 20 / 81


Time-sharing OS: Advantages

Each task gets an equal opportunity.


Fewer chances of duplication of software.
CPU idle time can be reduced.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 21 / 81


Time-sharing OS:Disadvantages

Reliability problem.
One must have to take of security and integrity of user programs
and data.
Data communication problem.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 22 / 81


Time-sharing OS: Examples

Windows 2000 server


Windows NT server
Unix
Linux
Time-sharing operating system

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 23 / 81


Operating Systems Types: Processor Specific:
Distributed OS

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 24 / 81


Distributed OS

In distributed OS all processors are connected by valid communication


mediums such as high-speed buses and telephone lines, and in which
every processor contains its local memory along with other local
processors. The Distributed operating systems are also known as loosely
coupled systems. They involve multiple computers, nodes, and sites.
These components are linked to each other with LAN/WAN lines. A
distributed OS is capable of sharing its computational capacity and I/O
files while allowing virtual machine abstraction to users.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 25 / 81


Distributed OS: Advantages
It may share all resources from one site to another, increasing data
availability across the entire system.
It reduces the probability of data corruption because all data is
replicated across all sites.
The entire system operates independently of one another, and as a
result, if one site crashes, the entire system does not halt.
It is an open system since it may be accessed from both local and
remote locations.
It helps in the reduction of data processing time.
It is made up of several nodes that interact to make them
fault-tolerant. If a single machine fails, the system remains
operational.
Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 26 / 81
Distributed OS: Disdvantages

The system must decide which jobs must be executed when they
must be executed, and where they must be executed. A scheduler
has limitations, which can lead to underutilized hardware and
unpredictable runtimes.
It is hard to implement adequate security in a distributed operating
system since the nodes and connections must be secured.
The underlying software is extremely complex and is not understood
very well compared to other systems.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 27 / 81


Distributed OS: Examples

Solaris
Micros
DYNIX
Locus
Mach

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 28 / 81


Operating Systems Types: Processor Specific:
Network OS

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 29 / 81


Network OS

Network Operating System has special functions for connecting


computers and devices into a local-area network or Inter-network. Some
popular network operating systems are Windows NT/2000, Novell
Netware, Linux, UNIX, Sun Solaris, and IBM OS/2. The network
operating system which was first developed is Novell Netware, in 1983.
An operating system that provides connectivity among several
autonomous computers is called a network operating system. A
configuration for a network operating system is a collection of personal
computers along with a common printer, server, and file server for
archival storage, all tied together by a local network.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 30 / 81


Network OS
There are two basic types of network operating systems, discussed as
follows:
Peer-to-Peer Network OS: allow users to share network
resources saved in a common, accessible network location. In this
architecture, all devices are treated equally in terms of functionality.
Peer-to-peer usually works best for small to medium LANs and is
cheaper.
Client/Server Network OS: provide users with access to
resources through a server. All functions and applications are
unified under one file server that can be used to execute individual
client actions regardless of physical location.
Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 31 / 81
Network OS:Advantages

Highly stable centralized servers


Security concerns are handled through servers
New technologies and hardware up-gradation are easily integrated
into the system
Server access is possible remotely from different locations and types
of systems

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 32 / 81


Network OS: Disadvantages

Servers are costly


User has to depend on a central location for most operations
Maintenance and updates are required regularly

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 33 / 81


Operating Systems Types: Processor Specific:
Real-time OS

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 34 / 81


Real-time OS

A real-time operating system (RTOS) runs multi-threaded applications


and can meet real-time deadlines. It include a scheduler, resource
management, and device drivers. An RTOS can be a powerful tool if
youre creating complex embedded programs. They help isolate tasks and
give you the ability to run them concurrently. You can set prioritization
levels of tasks in most RTOSes, which allow some tasks to interrupt and
run before other tasks. This is known as preemption. If you need
concurrency or are getting into deeper embedded concepts like IoT or
machine learning, it’s wise to add RTOSes and multi-threaded
programming to your toolkit.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 35 / 81


Real-time OS: Advantages
Priority-Based Scheduling.
Abstracting Timing Information.
Maintainability/Extensibility.
Modularity.
Promotes Team Development.
Easier Testing.
Code Reuse.
Improved Efficiency.
Idle Processing.
Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 36 / 81
Real-time OS: Examples
Limited Tasks.
Use Heavy System resources.
Complex Algorithms.
Device driver and interrupt signals.
Thread Priority.
Airline traffic control systems.
Command Control Systems.
Airlines reservation system.
Heart Peacemaker.
Network Multimedia Systems.
Robotics.
Real-time operating systems
Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 37 / 81
Operating Systems Types: Processor Specific:
Embedded OS

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 38 / 81


Embedded OS:

An embedded operating system is a specialized OS for embedded


systems. It aims to perform with certainty specific tasks regularly that
help the device operate. It often has limited features and functions. The
OS may perform only a single action that allows the device to work, but
it must execute that action consistently and timely. Embedded operating
systems are built into Internet of Things devices. They are also part of
many other devices and systems. In most cases, embedded hardware
doesn’t have much capacity and has fewer resources. So, the amount of
processing power and memory is limited.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 39 / 81


Embedded OS:Advantages

The OS is often low-cost.


The OS tends to use few resources, including minimal power.
The performance is generally trouble-free.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 40 / 81


Embedded OS:Disadvantages

The OS can usually only run a single or very few applications.


It is difficult to modify the OS once you establish a framework and
build it into the device.
Trouble-shooting the OS when there are issues can be difficult.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 41 / 81


Embedded OS: Examples

Windows Mobile/CE (handheld Personal Data Assistants)


Symbian (cell phones)
Ubuntu Touch

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 42 / 81


Operating Systems Types: Processor Specific:
Multiprogrammed OS

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 43 / 81


Multiprogrammed OS
A multiprogramming operating system runs multiple programs on a
single processor computer. If a program waits for an I/O transfer, the
other programs are ready to use the CPU. As a result, various jobs may
share CPU time. A multiprogramming OS is of the following two types:
Multitasking OS: Enables execution of multiple programs at the
same time. The operating system accomplishes this by swapping
each program in and out of memory one at a time. When a
program is switched out of memory, it is temporarily saved on disk
until it is required again.
Multiuser OS: This allows many users to share processing time on
a powerful central computer from different terminals. The
operating system accomplishes this by rapidly switching between
Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 44 / 81
Multiprogrammed OS:Advantages

It may help to run various jobs in a single application


simultaneously.
It helps to optimize the total job throughput of the computer.
Various users may use the multiprogramming system at once.
Short-time jobs are done quickly in comparison to long-time jobs. It
may help to improve turnaround time for short-time tasks, in
improving CPU utilization and never gets idle and the resources are
utilized smartly.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 45 / 81


Multiprogrammed OS:Disadvantages

It is highly complicated and sophisticated.


The CPU scheduling is required.
Memory management is needed in the operating system because all
types of tasks are stored in the main memory.
The harder task is to handle all processes and tasks. If it has a
large number of jobs, then long-term jobs will require a long wait.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 46 / 81


Multiprogrammed OS:Examples

Apps like office, chrome, etc.


Microcomputers like MP/M, XENIX, and ESQview.
Windows OS, UNIX OS

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 47 / 81


Operating Systems Types: Processor Specific:
Multiprocessor OS

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 48 / 81


Multiprocessor OS

Multiprocessor operating system utilizes multiple processors, which are


connected with physical memory, computer buses, clocks, and peripheral
devices (touchpad, joystick, etc). The main objective is to consume high
computing power and increase the execution speed of the system.
Following are four major components, used in the Multiprocessor
Operating System: CPU , Input Output Processor, Input/Output
Devices, Memory Unit.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 49 / 81


Multiprocessor OS: Advantages

Great Reliability.
Improve Throughput.
Cost-Effective System.
Parallel Processing.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 50 / 81


Multiprocessor OS: Disadvantages

It is more expensive due to its large architecture.


Its speed can get degraded due to failing any one processor.
It has more time delay when the processor receives the message and
takes appropriate action.
It has big challenges related to skew and determinism.
It needs context switching which can be impacted its performance.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 51 / 81


Operating Systems Types: Processor Specific: Mobile
OS

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 52 / 81


Mobile OS:
A mobile operating system is an operating system that helps run
application software on mobile devices. It is the same kind of software as
the famous computer operating systems Linux and Windows, but they
are light and simple to some extent. The operating systems found on
smartphones include Symbian OS, IOS, BlackBerryOS, Windows Mobile,
Palm WebOS, Android, and Maemo. Android, WebOS, and Maemo are
all derived from Linux. The iPhone OS originated from BSD and
NeXTSTEP, which are related to Unix. It combines the power of a
computer and the experience of a hand-held device. It typically contains
a cellular built-in modem and SIM tray for telephony and internet
connections.
Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 53 / 81
Mobile OS: Advantages

Convenience inoperability.
It also includes open-source platforms.
Gives notification ease.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 54 / 81


Mobile OS: Disadvantages

Instability.
It also includes poor battery quality.
Not sufficient computational power.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 55 / 81


Mobile OS: Examples

Android
IOS
HarmonyOS
PalmOS

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 56 / 81


Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 57 / 81
System Calls
A system call is a function that a user program uses to ask the
operating system for a particular service. User programmers can
communicate with the operating system to request its services
using the interface that is created by a system call.
System calls serve as the interface between an operating system
and a process.
System calls can typically be found as assembly language
instructions.
When a process in user mode needs access to a resource, system
calls are typically generated. The resource is then requested from
the kernel via a system call.
Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 58 / 81
System Calls
A system calls in computing is the programmatic method by which
a computer programme asks the kernel of the operating system it is
running on for a service.
Programs can interact with the operating system by making a
system call.
When a computer programme requests something from the kernel
of the operating system, it performs a system call.
It offers a point of contact between processes and the operating
system so that user-level processes can ask for the operating
system’s assistance.
The only ways to access the kernel system are through system calls.
System calls are required for all programmes that require resources.
Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 59 / 81
System Calls
This diagram shows how the processes normally run in user mode until a
system call interrupts them. The system call is then carried out in kernel
mode according to priority. The control switches back to user mode
after the system call has been completed, allowing user processes to
continue running. This procedure is called mode switching.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 60 / 81


System Call Types

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 61 / 81


System Call Types: 1. Process Control

The following services are provided by Process Control System calls that
are used to control a process:
End and Abort
Loading and Execution of a process
Creation and termination of a Process
Wait and Signal Event
Allocation of free memory

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 62 / 81


System Call Types: 2. File Management

The following services are provided by system call for file management:
Making and erasing files
Open the file, then close it.
Write to a specific file, read from a specific file.
To obtain a file’s attribute and to change a file’s attribute

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 63 / 81


System Call Types: 3. Device Management

The following services are offered by a system call that controls I/O
devices:
Requesting and releasing devices
Attaching and detaching devices logically
Getting and setting device attributes

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 64 / 81


System Call Types: 4. Information Maintenance
The system calls for information maintenancecall moves data from the
user programme to the operating system. Considering this, the services
offered by this type of system call are:
Obtain the system’s time or date. Set the system’s time or date.
Obtain system-related information. Configure the system data.
Obtain the characteristics of a specific operating system process.
Alternatively, of a specific file on the system or on any attached
devices.
Set the characteristics of a specific operating system process.
Alternatively, of a specific file on the system or on any attached
devices.
Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 65 / 81
System Call Types: 5.Communication

This system call facilitates the system’s network connection. The


services that these system calls offer are:
Creation and deletion of communications connections
Sending and receiving messages
Helping OS transfer status information
Attaching or detaching remote devices

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 66 / 81


Process

A process is a program in execution.


A program is a passive entity, such as a file containing a list of
instructions stored on disk called as executable file.
A process is an active entity, with a program counter specifying the
next instruction to execute and a set of associated resources.
A program becomes a process when an executable file is loaded into
memory.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 67 / 81


Process Structure
A process is more than the program code, which is sometimes known as
the text section. It also includes the current activity, as represented by
the value of the program counter and the contents of the processors
registers. A process generally also includes the process stack, which
contains temporary data (such as function parameters, return addresses,
and local variables), and a data section, which contains global
variables. A process may also include a heap, which is memory that is

dynamically allocated during process run time.


Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 68 / 81
Process states

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 69 / 81


Process States
As a process executes, it changes state. The state of a process is defined
in part by the current activity of that process. Each process may be in
one of the following states:
New: The process is being created.
Ready: The process is waiting to be assigned to the processor.
Running: The process is being executed.
Waiting: The process is waiting for some event to occur (such as
an I/O completion or reception of a signal).
Terminated: The process has finished execution.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 70 / 81


Process Control Block (PCB):
Each process is represented in the operating system by a process control
block (PCB) also called a task control block. A PCB is shown below:

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 71 / 81


Process Control Block (PCB):
Process state: The state may be new, ready, running, waiting,
halted, and so on.
Program counter: The counter indicates the address of the next
instruction to be executed for this process.
CPU registers: The registers vary in number and type, depending
on the computer architecture. They include accumulators, index
registers, stack pointers, and general-purpose registers.
CPU-scheduling information: This information includes a
process priority, pointers to scheduling queues, and any other
scheduling parameters.
Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 72 / 81
Process Control Block (PCB):
Memory-management information: This information may
include such information as the value of the base and limit registers,
the page tables, or the segment tables, depending on the memory
system used by the operating system.
Accounting information: This information includes the amount
of CPU and real time used, time limits, account numbers, job or
process numbers, and so on.
I/O status information: This information includes the list of I/O
devices allocated to the process, a list of open files, and so on.
In brief, the PCB simply serves as the repository for any information
that may vary from process to process.
Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 73 / 81
A context switching is a process that involves switching of the CPU
from one process or task to another. In this phenomenon, the execution
of the process that is present in the running state is suspended by the
kernel and another process that is present in the ready state is executed
by the CPU. It is one of the essential features of the multitasking
operating system. The processes are switched so fastly that it gives an
illusion to the user that all the processes are being executed at the same
time. Context switching can happen for the following reasons:
When a process of high priority comes in the ready state.
When an interrupt occurs.
When a transition between the user mode and kernel mode is
required.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 74 / 81


Context Switching

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 75 / 81


Process Queues
All PCBs are kept in Process Queues by the OS. The OS has a distinct
queue for each process state, and all PCBs in the same execution state
are put in the same Process queue. When a process’s status changes, its
PCB is unbound from the current queue and transferred to the new

stateBindu
queue.
Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 76 / 81
The Operating System manages the following queues:
Job Queue: In starting, all the processes get stored in the job
queue. It is maintained in the secondary memory. The long term
scheduler picks some of the jobs and put them in the primary
memory.
Ready Queue: The ready queue is kept in primary memory. We
select the job for processing from the ready queue using the
short-term scheduler, then dispatch it to the CPU.
Waiting Queue: If the process in the ready queue requires some
actions, such as input/output operations, to complete its execution,
the operating system must alter the process status from running to
waiting. The context is saved in the waiting queue, which the CPU
will use after the I/O is complete.
Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 77 / 81
Process Queues Example

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 78 / 81


Process Schedulers

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 79 / 81


Process Schedulers

The long-term or job scheduler controls the degree of


multi-programming and the number of processes in a ready state at
any time. This scheduler brings the new processes from the process
queue to the ready state. Long-term scheduler carefully selects
both I/O and CPU-bound processes. This scheduler increases the
efficiency of CPU utilization since it maintains a balance between
I/O and CPU-bound processes.

Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 80 / 81


Process Schedulers
Short-term or CPU scheduler is responsible for selecting a
process from the ready state maintained by the job scheduler
(long-term) for scheduling it on the running state. And this is
where all the scheduling algorithms are used. This scheduler job is
to select the process only and not to load the process. A short-term
scheduler ensures that there is no starvation due to owing to high
burst time processes.
Medium-term scheduler is responsible for suspending and
resuming the process. A running process can become suspended,
when makes an I/O request then this scheduler moves processes
from main memory to disk and vice versa. It also increases the
balance between I/O and CPU-bound processes.
Bindu Madhavi Tummala Fundamentals of Operating Systems July 13, 2023 81 / 81

You might also like