SlideShare a Scribd company logo
Operating System Concepts: 4
Functions of OS
Prof Neeraj Bhargava
Vaibhav Khanna
Department of Computer Science
School of Engineering and Systems Sciences
Maharishi Dayanand Saraswati University Ajmer
Operating-System Operations
• Bootstrap program – simple code to initialize the
system, load the kernel
• Kernel loads
• Starts system daemons (services provided outside of
the kernel)
• Kernel interrupt driven (hardware and software)
– Hardware interrupt by one of the devices
– Software interrupt (exception or trap):
• Software error (e.g., division by zero)
• Request for operating system service – system
call
• Other process problems include infinite loop,
processes modifying each other or the operating
system
Multiprogramming and Multitasking
• Multiprogramming (Batch system) needed for efficiency
– Single user cannot keep CPU and I/O devices busy at all times
– Multiprogramming organizes jobs (code and data) so CPU always has
one to execute
– A subset of total jobs in system is kept in memory
– One job selected and run via job scheduling
– When it has to wait (for I/O for example), OS switches to another job
• Timesharing (multitasking) is logical extension in which CPU switches jobs
so frequently that users can interact with each job while it is running,
creating interactive computing
– Response time should be < 1 second
– Each user has at least one program executing in memory process
– If several jobs ready to run at the same time  CPU scheduling
– If processes don’t fit in memory, swapping moves them in and out to
run
– Virtual memory allows execution of processes not completely in
memory
Memory Layout for Multiprogrammed System
Dual-mode and Multimode
Operation
• Dual-mode operation allows OS to protect itself and
other system components
– User mode and kernel mode
– Mode bit provided by hardware
• Provides ability to distinguish when system is
running user code or kernel code
• Some instructions designated as privileged,
only executable in kernel mode
• System call changes mode to kernel, return
from call resets it to user
• Increasingly CPUs support multi-mode operations
– i.e. virtual machine manager (VMM) mode for
guest VMs
Transition from User to Kernel Mode
• Timer to prevent infinite loop / process hogging resources
– Timer is set to interrupt the computer after some time period
– Keep a counter that is decremented by the physical clock
– Operating system set the counter (privileged instruction)
– When counter zero generate an interrupt
– Set up before scheduling process to regain control or terminate
program that exceeds allotted time
Process Management
• A process is a program in execution. It is a unit of work within the
system. Program is a passive entity, process is an active entity.
• Process needs resources to accomplish its task
– CPU, memory, I/O, files
– Initialization data
• Process termination requires reclaim of any reusable resources
• Single-threaded process has one program counter specifying
location of next instruction to execute
– Process executes instructions sequentially, one at a time, until
completion
• Multi-threaded process has one program counter per thread
• Typically system has many processes, some user, some operating
system running concurrently on one or more CPUs
– Concurrency by multiplexing the CPUs among the processes /
threads
Process Management Activities
• Creating and deleting both user and system
processes
• Suspending and resuming processes
• Providing mechanisms for process
synchronization
• Providing mechanisms for process
communication
• Providing mechanisms for deadlock handling
The operating system is responsible for the following
activities in connection with process management:
Memory Management
• To execute a program all (or part) of the instructions must
be in memory
• All (or part) of the data that is needed by the program
must be in memory
• Memory management determines what is in memory and
when
– Optimizing CPU utilization and computer response to users
• Memory management activities
– Keeping track of which parts of memory are currently being
used and by whom
– Deciding which processes (or parts thereof) and data to
move into and out of memory
– Allocating and deallocating memory space as needed
File-system Management
• OS provides uniform, logical view of information
storage
– Abstracts physical properties to logical storage unit - file
– Each medium is controlled by device (i.e., disk drive, tape
drive)
• Varying properties include access speed, capacity, data-
transfer rate, access method (sequential or random)
• File-System management
– Files usually organized into directories
– Access control on most systems to determine who can
access what
– OS activities include
• Creating and deleting files and directories
• Primitives to manipulate files and directories
• Mapping files onto secondary storage
• Backup files onto stable (non-volatile) storage media
Mass-Storage Management
• Usually disks used to store data that does not fit in main
memory or data that must be kept for a “long” period of time
• Proper management is of central importance
• Entire speed of computer operation hinges on disk subsystem
and its algorithms
• OS activities
– Mounting and unmounting
– Free-space management
– Storage allocation
– Disk scheduling
– Partitioning
– Protection
• Some storage need not be fast
– Tertiary storage includes optical storage, magnetic tape
– Still must be managed – by OS or applications
Caching
• Important principle, performed at many levels
in a computer (in hardware, operating system,
software)
• Information in use copied from slower to faster
storage temporarily
• Faster storage (cache) checked first to
determine if information is there
– If it is, information used directly from the cache
(fast)
– If not, data copied to cache and used there
• Cache smaller than storage being cached
– Cache management important design problem
– Cache size and replacement policy

More Related Content

PPTX
Operating system 05 functions of os
PPTX
Operating system concepts
PPTX
Os unit 2
PPTX
Unit v: Device Management
PPTX
Processes and operating systems
PPT
Opearating System
PPTX
Operating system 17 process management
Operating system 05 functions of os
Operating system concepts
Os unit 2
Unit v: Device Management
Processes and operating systems
Opearating System
Operating system 17 process management

What's hot (20)

PPTX
Operating system 18 process creation and termination
PPT
Process management
PPT
Lecture5
PPTX
Os unit 3 , process management
PPTX
Unit 1 operating system
PPTX
Operating system 06 operating system classification
PPT
Processes Control Block (Operating System)
PPTX
Introduction to operating systems
PPTX
Mis unit iii by arnav
PPT
PDF
Unit 4 Real Time Operating System
PDF
ITFT_Device management in Operating System
PDF
Operating System / System Operasi
PDF
02.Os Structure
PPTX
The cpu cycle
PPTX
Central Processing Unit (CPU) – Part 2
PPTX
os assignment -individual presenation.pptx
Operating system 18 process creation and termination
Process management
Lecture5
Os unit 3 , process management
Unit 1 operating system
Operating system 06 operating system classification
Processes Control Block (Operating System)
Introduction to operating systems
Mis unit iii by arnav
Unit 4 Real Time Operating System
ITFT_Device management in Operating System
Operating System / System Operasi
02.Os Structure
The cpu cycle
Central Processing Unit (CPU) – Part 2
os assignment -individual presenation.pptx
Ad

Similar to Os concepts 4 functions of os (20)

PPTX
introduction to operating systems and services.pptx
PPTX
CSE3120- Module1 part 1 v1.pptx
PDF
PB1MAT_TIF17 - Pertemuan 1-2ghfctrerdxt.pdf
PPT
Module 1 Introduction.ppt
PPT
chapter1.ppt
PPTX
list of all Functions of operating system.pptx
PPT
cs-intro-os.ppt
PDF
Kernel security Concepts
PPTX
Evolution, Strutcture and Operations.pptx
PDF
Ch1 introduction
PPTX
os unit 1 (2).pptx. introduction to operating systems
PPT
operating-system-objectives-and-functions-d2.ppt
PPT
Os concepts
PPTX
Computer system architecture
PDF
Ch3 processes
PPTX
Write the short notes on operating systems and its types
PPTX
What is an Operating Systems?
PPTX
Lec # 1 chapter 2
PPTX
Operating system Chapter One
PDF
Operating System
introduction to operating systems and services.pptx
CSE3120- Module1 part 1 v1.pptx
PB1MAT_TIF17 - Pertemuan 1-2ghfctrerdxt.pdf
Module 1 Introduction.ppt
chapter1.ppt
list of all Functions of operating system.pptx
cs-intro-os.ppt
Kernel security Concepts
Evolution, Strutcture and Operations.pptx
Ch1 introduction
os unit 1 (2).pptx. introduction to operating systems
operating-system-objectives-and-functions-d2.ppt
Os concepts
Computer system architecture
Ch3 processes
Write the short notes on operating systems and its types
What is an Operating Systems?
Lec # 1 chapter 2
Operating system Chapter One
Operating System
Ad

More from Vaibhav Khanna (20)

PPTX
Information and network security 47 authentication applications
PPTX
Information and network security 46 digital signature algorithm
PPTX
Information and network security 45 digital signature standard
PPTX
Information and network security 44 direct digital signatures
PPTX
Information and network security 43 digital signatures
PPTX
Information and network security 42 security of message authentication code
PPTX
Information and network security 41 message authentication code
PPTX
Information and network security 40 sha3 secure hash algorithm
PPTX
Information and network security 39 secure hash algorithm
PPTX
Information and network security 38 birthday attacks and security of hash fun...
PPTX
Information and network security 37 hash functions and message authentication
PPTX
Information and network security 35 the chinese remainder theorem
PPTX
Information and network security 34 primality
PPTX
Information and network security 33 rsa algorithm
PPTX
Information and network security 32 principles of public key cryptosystems
PPTX
Information and network security 31 public key cryptography
PPTX
Information and network security 30 random numbers
PPTX
Information and network security 29 international data encryption algorithm
PPTX
Information and network security 28 blowfish
PPTX
Information and network security 27 triple des
Information and network security 47 authentication applications
Information and network security 46 digital signature algorithm
Information and network security 45 digital signature standard
Information and network security 44 direct digital signatures
Information and network security 43 digital signatures
Information and network security 42 security of message authentication code
Information and network security 41 message authentication code
Information and network security 40 sha3 secure hash algorithm
Information and network security 39 secure hash algorithm
Information and network security 38 birthday attacks and security of hash fun...
Information and network security 37 hash functions and message authentication
Information and network security 35 the chinese remainder theorem
Information and network security 34 primality
Information and network security 33 rsa algorithm
Information and network security 32 principles of public key cryptosystems
Information and network security 31 public key cryptography
Information and network security 30 random numbers
Information and network security 29 international data encryption algorithm
Information and network security 28 blowfish
Information and network security 27 triple des

Recently uploaded (20)

PPTX
Construction Project Organization Group 2.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PPT
Project quality management in manufacturing
PDF
Digital Logic Computer Design lecture notes
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Current and future trends in Computer Vision.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Geodesy 1.pptx...............................................
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Construction Project Organization Group 2.pptx
UNIT 4 Total Quality Management .pptx
Project quality management in manufacturing
Digital Logic Computer Design lecture notes
Embodied AI: Ushering in the Next Era of Intelligent Systems
Current and future trends in Computer Vision.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Geodesy 1.pptx...............................................
Foundation to blockchain - A guide to Blockchain Tech
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
R24 SURVEYING LAB MANUAL for civil enggi
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
bas. eng. economics group 4 presentation 1.pptx
CYBER-CRIMES AND SECURITY A guide to understanding
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx

Os concepts 4 functions of os

  • 1. Operating System Concepts: 4 Functions of OS Prof Neeraj Bhargava Vaibhav Khanna Department of Computer Science School of Engineering and Systems Sciences Maharishi Dayanand Saraswati University Ajmer
  • 2. Operating-System Operations • Bootstrap program – simple code to initialize the system, load the kernel • Kernel loads • Starts system daemons (services provided outside of the kernel) • Kernel interrupt driven (hardware and software) – Hardware interrupt by one of the devices – Software interrupt (exception or trap): • Software error (e.g., division by zero) • Request for operating system service – system call • Other process problems include infinite loop, processes modifying each other or the operating system
  • 3. Multiprogramming and Multitasking • Multiprogramming (Batch system) needed for efficiency – Single user cannot keep CPU and I/O devices busy at all times – Multiprogramming organizes jobs (code and data) so CPU always has one to execute – A subset of total jobs in system is kept in memory – One job selected and run via job scheduling – When it has to wait (for I/O for example), OS switches to another job • Timesharing (multitasking) is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing – Response time should be < 1 second – Each user has at least one program executing in memory process – If several jobs ready to run at the same time  CPU scheduling – If processes don’t fit in memory, swapping moves them in and out to run – Virtual memory allows execution of processes not completely in memory
  • 4. Memory Layout for Multiprogrammed System
  • 5. Dual-mode and Multimode Operation • Dual-mode operation allows OS to protect itself and other system components – User mode and kernel mode – Mode bit provided by hardware • Provides ability to distinguish when system is running user code or kernel code • Some instructions designated as privileged, only executable in kernel mode • System call changes mode to kernel, return from call resets it to user • Increasingly CPUs support multi-mode operations – i.e. virtual machine manager (VMM) mode for guest VMs
  • 6. Transition from User to Kernel Mode • Timer to prevent infinite loop / process hogging resources – Timer is set to interrupt the computer after some time period – Keep a counter that is decremented by the physical clock – Operating system set the counter (privileged instruction) – When counter zero generate an interrupt – Set up before scheduling process to regain control or terminate program that exceeds allotted time
  • 7. Process Management • A process is a program in execution. It is a unit of work within the system. Program is a passive entity, process is an active entity. • Process needs resources to accomplish its task – CPU, memory, I/O, files – Initialization data • Process termination requires reclaim of any reusable resources • Single-threaded process has one program counter specifying location of next instruction to execute – Process executes instructions sequentially, one at a time, until completion • Multi-threaded process has one program counter per thread • Typically system has many processes, some user, some operating system running concurrently on one or more CPUs – Concurrency by multiplexing the CPUs among the processes / threads
  • 8. Process Management Activities • Creating and deleting both user and system processes • Suspending and resuming processes • Providing mechanisms for process synchronization • Providing mechanisms for process communication • Providing mechanisms for deadlock handling The operating system is responsible for the following activities in connection with process management:
  • 9. Memory Management • To execute a program all (or part) of the instructions must be in memory • All (or part) of the data that is needed by the program must be in memory • Memory management determines what is in memory and when – Optimizing CPU utilization and computer response to users • Memory management activities – Keeping track of which parts of memory are currently being used and by whom – Deciding which processes (or parts thereof) and data to move into and out of memory – Allocating and deallocating memory space as needed
  • 10. File-system Management • OS provides uniform, logical view of information storage – Abstracts physical properties to logical storage unit - file – Each medium is controlled by device (i.e., disk drive, tape drive) • Varying properties include access speed, capacity, data- transfer rate, access method (sequential or random) • File-System management – Files usually organized into directories – Access control on most systems to determine who can access what – OS activities include • Creating and deleting files and directories • Primitives to manipulate files and directories • Mapping files onto secondary storage • Backup files onto stable (non-volatile) storage media
  • 11. Mass-Storage Management • Usually disks used to store data that does not fit in main memory or data that must be kept for a “long” period of time • Proper management is of central importance • Entire speed of computer operation hinges on disk subsystem and its algorithms • OS activities – Mounting and unmounting – Free-space management – Storage allocation – Disk scheduling – Partitioning – Protection • Some storage need not be fast – Tertiary storage includes optical storage, magnetic tape – Still must be managed – by OS or applications
  • 12. Caching • Important principle, performed at many levels in a computer (in hardware, operating system, software) • Information in use copied from slower to faster storage temporarily • Faster storage (cache) checked first to determine if information is there – If it is, information used directly from the cache (fast) – If not, data copied to cache and used there • Cache smaller than storage being cached – Cache management important design problem – Cache size and replacement policy