Chapter 1
Chapter 1
S.NO. TOPIC
1. Overview of computer OS
2. OS functions
3. protection and security
4. distributed systems
5. Special purpose systems
6. OS structures and systems calls
7. OS generation
8. REVISION
What is an Operating System?
A program that acts as an intermediary between a user of
a computer and the computer hardware
Operating system goals:
Execute user programs and make solving user problems
easier
Make the computer system convenient to use
Use the computer hardware in an efficient manner
LECTURE 1
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
No universally accepted definition
“The one program running at all times on the computer” is the kernel.
Everything else is either a system program (ships with the operating
system) or an application program
Computer System Organization
Computer-system operation
One or more CPUs, device controllers connect through
common bus providing access to shared memory
Concurrent execution of CPUs and devices competing for
memory cycles
Computer-System Operation
A Dual-Core Design
Operating System Structure
Multiprogramming 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
Virtual memory allows execution of processes not completely in memory
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
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
The operating system is responsible for the following
activities in connection with process management:
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
Memory Management
All data in memory before and after processing
All instructions in memory in order to execute
Memory management determines what is in memory 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
Storage Management
OS provides uniform, logical view of information storage
Abstracts physical properties to logical storage unit - file
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 dirs
Mapping files onto secondary storage
Backup files onto stable (non-volatile) storage media
Protection and Security
Protection – any mechanism for controlling access
of processes or users to resources defined by the
OS