2.OS Operations
2.OS Operations
OPERATING SYSTE
MS
Dr. P. Devaki & Dr. K.R. Baskaran
Department of Computer Science and
Engineering
Introduction
• What Operating Systems Do
• Operating-System Structure
• Operating-System Operations
• Process Management
• Memory Management
• Storage Management
• Protection and Security
What is an Operating System?
• Operating system
• Controls and coordinates use of hardware among various applications and
users
• Users
• People, machines, other computers
What Operating Systems Do
• Depends on the point of view
• Users want convenience, ease of use and good
performance
• Don’t care about resource utilization
• But shared computer such as mainframe or minicomputer
must keep all users happy
• Users of dedicate systems such as workstations have
dedicated resources but frequently use shared resources from
servers
• Handheld computers are resource poor, optimized for usability
and battery life
• Some computers have little or no user interface, such as
embedded computers in devices and automobiles
Operating System Definition
• OS is a resource allocator
• Manages all resources
• Decides between conflicting requests for efficient
and fair resource use
• OS is a control program
• Controls execution of programs to prevent errors
and improper use of the computer
Operating System Definition (Cont.)
• Multiprogramming organizes jobs (code and data) so CPU always has one to execute,
improves the CPU utilization.
• The jobs are kept initially on the disk in the job pool, waiting for main memory.
• When it has to wait (for I/O for example), OS switches to another job whereas in non
multiprogramming system CPU sits idle.
Operating System Structure
CPU scheduling
• If several jobs ready to run at the same time
• If processes don’t fit in memory, swapping moves them in and out to run
• 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
• Free-space management
• Storage allocation
• Disk scheduling
• Some storage need not be fast
• Tertiary storage includes optical storage, magnetic tape
• Still must be managed – by OS or applications
• Varies between WORM (write-once, read-many-times) and RW
(read-write)
Performance of Various Levels of Storage