Chapter 3 Operating System Overview
Chapter 3 Operating System Overview
System
• Definition:
A program that controls the execution of application programs
An interface between applications and hardware
• 2. Efficiency
Allows computer system resources to be used in an efficient manner – as
a resource manager
• 3. Ability to evolve
Permit effective development, testing, and introduction of new
system functions without interfering with service.
Obj. 1: OS as a User/Computer
• Interface
Obj. 1: OS as a User/Computer Interface
• Hardware and software used in providing applications to a
user can be viewed in a
• layered or hierarchical fashion as shown in figure below:
Program development
• Provides editors and debuggers (as utilities program) to assist
programmer in creating programs.
Program execution
• A number of steps need to be performed to execute a program;
loaded data to memory, initializes the I/O devices and files, prepared
the processor. OS will handled these scheduling duties for the user.
OS as a User/Computer
Access Interface..
to I/O devices
• Provides a uniform interface where programmer can access the
I/O using simple read and write
System access
• For shared or public systems OS controls access to the system.
OS as a User/Computer Interface..
Error detection and response
Errors occur while computer run:
•– Internal and external hardware errors
•– Software errors
•– OS cannot grant request of application
OS provide response that clear the error condition with least impact
to running applications
•– Ending program that cause error
•– Retrying the operation
•– Reporting error to application
OS as a User/Computer Interface..
Accounting
•-collect statistics
•-monitor performance
•-used to anticipate future
enhancements
Obj. 2: OS as Resource Manager
A computer is a set of resources for the movement, storage
and processing of data and for the control of these functions.
OS is responsible for managing the resources.
In the alternative view, the job of the operating system is to
provide an orderly and controlled allocation of the
processors, memories, and i/o devices among the
various programs competing for them.
Obj. 3: Ease of Evolution of an
OS
OS will evolved over the time because:
Hardware upgrades and new types of
hardware
New services
Evolution of
Serial Processing
OS
Simple Batch
System
Multiprogrammed Batch
System
Time Sharing
System
Serial
Processing
No operating system
User interact directly with
computer hardware.
Machines run from a console with
display lights and toggle
switches.
This mode of operation could be
termed as serial processing
because users have access to
the computer in series.
Serial
Processing..
How it works?
Programs in machine code were loaded via the input
device (e.g.. Card Reader)
If there is an error (indicating by the lights) halt
the program.
Then the programmer will proceed to examine processor
registers and main memory to determine the cause of
error.
If the program proceeds to normal completion, the output
will be printed.
Serial
Processing..
Has TWO main problems:
1. Scheduling
2. Setup Time
Uniprogramming:
Processor execute a job, when job
need for I/O, processor must wait
for I/O instruction to complete
before proceed to execute the
other job.
Multiprogramming
System..
Multiprogramming:
Processor execute a job, When job needs to wait for I/O, the processor
can switch to the other job
Multiprogramming
System..
Time
Sharing
A need to provide a mode in which the user interacts directly
with the computer.
Transaction processing
Batch multiprogramming does not support interactions
with users.
Time sharing extends multiprogramming to handle
multiple interactive jobs.
It is called time sharing because the processor’s time is
shared among multiple users.
Evolution of Operating
Systems..
Both batch OS and time sharing
implement multiprogramming.
Major
Achievements
OS is the most complex
pieces of software ever Memory
Proces
developed. s
Managemen
t
System
Structur
e
Major Achievements –
Process
Introduced to obtain a systematic way of monitoring and controlling
program
execution.
Definitions of process:
A program in execution
An instance of a program running on a computer
The entity that can be assigned to and executed on a processor
A unit of activity characterized by a single sequential thread of
execution, a current state, and an associated set of system resources
Major Achievements –
Process..
Difficulties with Designing OS (with regards to process)
Improper synchronization
ensure a process waiting for an I/O device receives the signal
Failed mutual exclusion
Must permit only one program at a time to perform a transaction
on a portion of data.
Non-determinate program operation
program should only depend on input to it, not relying on
common memory areas
Major Achievements –
Process..
Deadlocks
• Two or more programs wait endlessly after each other to perform an
operation.
Consists of three components
An executable program
Associated data needed by the program
Execution context of the program
• All information the CPU needs to execute the process
• All information the operating system needs to manage the
process
Major Achievements –
Memory
Management
Five principle storage management responsibilities:
Process isolation
The OS must prevent independent processes from interfering with each other’s memory, both data and instructions.
Long-term storage
Many application programs require means for storing information for extended periods of time, after the computer has
been powered down.
Major Achievements –
Information Protection and
Security..
Protection of information is needed since the growth in the use of
time- sharing systems and
• computer network.
Work in security and protection as it relates to OS can be roughly
grouped into four
• categories.
Availability
• Protecting the system against interruption
Confidentiality
• Assures that user cannot read data for which access is unauthorized
Major Achievements –
Information Protection and
Security..
Data Integrity
• Protection of data from unauthorized modification
Authenticity
• Proper verification of identity of users and the
validity of messages or data
Major Achievements –
Scheduling and Resource
Management
A key task of the OS is to manage the various resources available and
to schedule their use by the various active process.
Resource allocation and scheduling policy must consider three factors:
Fairness
• give equal and fair access to all processes
Differential responsiveness
• discriminate between different classes of jobs
Major Achievements –
Scheduling and Resource
Management
Efficiency
• maximize output, minimize response time, and accommodate as
many uses as possible
Major Achievements –
System Structure
Because of it’s enormous complexity,
the OS can be viewed as a series of
levels
Each level performs a related subset
of functions
Each level relies on the next lower
level to perform more primitive
functions
Well defined interfaces: one level can
be modified without affecting other
levels
Characteristics of Modern
OS
New design elements were introduced
recently.
In response to new hardware development
multiprocessor machines
high-speed networks
faster processors and larger memory
In response to new software needs
multimedia applications
Internet and Web access
Client/Server applications
Characteristics of Modern
OS
Changes not only in modification and enhancement to existing
architectures
but also in new ways of organizing the operating system.
Much of the works fits into:
• 1. Microkernel architecture
• 2. Multithreading
• 3. Symmetric multiprocessing
• 4. Distributed OS
• 5. Object-oriented design.
Characteristics of Modern OS
- Microkernel Architecture
Only a few essential functions in the kernel
primitive memory management (address space)
Inter process communication (IPC)
basic scheduling
Other OS services are provided by processes running in
user mode Such as device drivers, file system, virtual
memory
Provide more flexibility, extensibility, portability
Characteristics of Modern OS
- Multithreading
A process is a collection of one or more threads that can
run simultaneously.
Useful when the application consists of several tasks that do not
need to be serialized.
Gives the programmer a greater control over the timing
of application-related events.
All threads within the same processshare the same data
and resources and a part of the process’s execution context
Characteristics of Modern OS
- Symmetric
Refers to aMultiprocessing
computer hardware architecture and also to
the operating system behavior
that reflects that architecture.
Standalone computer system with the following
characteristics:
A computer with multiple processors
These processors share the same main memory and I/O
facilities, interconnected by a communication bus or
other internal connection scheme.
Characteristics of Modern OS
- Symmetric
Multiprocessing..
All processor can perform the same functions.
Existence of multiple processors is transparent to the
user.
Advantages over uniprocessor architecture:
• 1. Performance
• 2. Availability
• 3. Incremental Growth
Characteristics of Modern OS
- Distributed OS
DOS is a collection of independent computers that appears to
the users of the system as a single computer.
Provides the illusion of a single main memory and
single secondary memory space, i.e. appearing as a single
system.
E.g.. Cluster computer.
Characteristics of Modern OS
- Object Oriented Design