R19CS204
Operating System
Objective
• To understand the services provided by and the design of an operating
system.
• To understand what a process is and how processes are synchronized
and scheduled
• To understand different approaches to memory management
• Students should be able to use system calls for managing processes,
memory, and the file system.
Syllabus
1. KERNEL
AND
PROCESS MANAGEMENT
Operating System Overview
• Introduction to OS
• An Operating system is a
program that manages the
computer hardware.
• It also provides a basis for
Application program and acts as
an intermediary between a user
of a computer and the
computer hardware
Goals of OS
• Convenience
• Makes more convenient to use
• Efficiency
• Resources used in an efficient manner
• Ability to evolve
• Permits the effective development , testing and introduction of new system
functions without interfacing with service.
Functions of OS
Memory Management
• It is the management of the main or primary memory.
• Whatever program is executed, it has to be present in
the main memory.
• Main memory is a quick storage area that may be
accessed directly by the CPU.
• When the program is completed, the memory region is
released and can be used by other programs.
• Therefore, there can be more than one program present
at a time.
• Hence, it is required to manage the memory.
Device Management
▪ An operating system regulates device
connection using drivers.
▪ The processes may require devices
for their use.
• Allocates and deallocates devices to
different processes.
• Keeps records of the devices.
• Decides which process can use which
device for how much time
Process Management
▪ The operating system determines the
status of the processor and processes,
▪ selects a job and its processor,
▪ Allocates the processor to the process,
▪ And de-allocates the processor after
the process is completed.
Security
• The operating system uses password
protection to protect user data and similar
other techniques.
• It also prevents unauthorized access to
programs and user data.
• Modern operating systems employ a firewall.
• A firewall is a type of security system that
monitors all computer activity and blocks it if
it detects a threat.
Error Detection
• The operating system constantly monitors the system to
detect errors and avoid the malfunctioning of a computer
system.
Coordination between S/W and User
• The operating system (OS) allows
hardware components to be
coordinated and directs
• Allocates assemblers, interpreters,
compilers, and other software to
different users of the computer
system.
Job Accounting
• As the operating system keeps track of all the functions of a computer system.
• Hence, it makes a record of all the activities taking place on the system.
• It has an account of all the information about the memory, resources, errors,
etc.
• Therefore, this information can be used as and when required
File Management
▪ It specifies which process receives the
file and for how long.
▪ It also keeps track of information,
location, uses, status, and so on.
▪ These groupings of resources are
referred to as file systems
Booting Process
• The process of starting or restarting
a computer is referred to as
booting.
• Cold booting occurs when a
computer is totally turned off and
then turned back on.
• Warm booting occurs when the
computer is restarted.
• The operating system (os) is in
charge of booting the computer.
Control over System Performance
• Monitors overall system health to
help improve performance.
• Records the response time
between service requests and
system response to having a
complete view of the system
health.
• This can help improve
performance by providing
important information needed to
troubleshoot problems.
Why OS Evolves?
• Controls all the computer resources.
• Provides valuable services to user programs.
• Coordinates the execution of user programs.
• Provides resources for user programs and an interface (virtual machine) to the
user.
• Hides the complexity of software.
• It supports multiple execution modes.
• It monitors the execution of user programs to prevent errors.
Operating System - Definition
OS is a resource allocator OS is a control program
• Manages all resources • Controls execution of
• Decides between programs to prevent
conflicting requests for errors and improper use
efficient and fair resource of the computer
use
Layers & Views of Computer System
• End user views a computer system in terms of a
set of applications
• Applications are developed in a programming
language and is developed by application
programmer
• To make the applications reachable to computer
hardware system programs or utilities are
provided
• OS comprises of collection of system programs
• OS masks the details of the hardware from the
programmer and provides the programmer with a
convenient interface for using the system.
Types of OS
• Single user , Single task
• Single user , Multiple task
• Multiple user, Multiple task
• Real time Operating Systems (RTOS)
Basics of OS - Computer System Operation
• A modern general purpose
computer consists of one or
more CPUs and a number of
device controllers connected
through a common bus that
provide a shared memory
• Each device controller is
in-charge for specific task
device
• CPU and device controller
executer concurrently
• Memory controller works in a
synchronize way
Some Important Terms
• Bootstrap Program:
• When power on the system, the first program loads is called
• It is stored in ROM
• Loads our OS and start executing the system
• Locate and load the OS kernel into the memory
• Interrupt:
• The occurrence of the event is usually signalled by an interrupt either from
h/w or s/w
• Hardware may trigger the interrupt by sending signals to the CPU, with the
help of system bus
• Monitor call (System Call):
• Software can trigger an interrupt by executing a special operation called
System call
What is ISR?
Expensive Small in
but faster Size Volatile
Cost/bit
Increases
Non-
Access Volatile
time
increases
Larger size