Lecture 02 - Operating System Principles
Lecture 02 - Operating System Principles
Convenience
Makes the computer more convenient to use
Efficiency
Allows computer system resources to be used in an
efficient manner
Ability to evolve
Permit effective development, testing, and introduction
of new system functions without interfering with
service
System access
Protection, authorization, resolve conflicts
File
Process & Manager
Resource
Manager
Memory Device
Manager Manager
Multiprogramming
When one job needs to wait for I/O, the processor can switch to another job
Memory management
Information protection and security
Scheduling and resource management
System structure
a program in execution
an instance of a running program
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
Availability
Concerned with protecting the system against interruption
Confidentiality
Assuring that users cannot read data for which access is
unauthorized
Data integrity
Protection of data from unauthorized modification
Authenticity
Concerned with the proper verification of the identity of users
and the validity of messages or data
Thread Process
A collection of one or
Dispatchable unit more threads and
of work associated system
resources e.g. memory
(code, data), open files
Includes a and devices
processor context
(PC and Stack Ptr)
and its own data By breaking a single
area for a stack application into multiple
threads, a programmer
has greater control over
Executes the modularity of the
sequentially and is application and the
interruptible timing of application-
related events
Dr. Noha Adly Operating Systems – CS x61
Multiprogramming & Multiprocessing
Multiprogramming: only one
process can execute at a
time; meanwhile all other
processes are waiting for
the processor
Multiprocessing: more than
one process can be running
simultaneously, each on a
different processor.
Multithreading and SMP are
independent:
Multithreading is useful,
even on a uniprocessor
SMP is useful even for non-
threaded processes
They complement each
other
Dr. Noha Adly Operating Systems – CS x61 38
Microkernel Architecture
Monolithic kernel
large kernel including scheduling, file system, networking, device
drivers, memory management
single process with all elements sharing the same address space
Modern OS use microkernel approach
Extensibility
Allows the addition of new services
Flexibility
New features added, Existing features can be subtracted
Portability
Changes to port the system to a new processor is limited to the microkernel
Reliability
Modular design allows rigorous testing
Distributed system support
A microkernel interacts with local and remote server processes in the same way,
facilitating construction of distributed systems.
Object-oriented operating system
Permanent
• A fault that, after it occurs, is always present
• The fault persists until the faulty component is replaced or
repaired
Temporary
• A fault that is not present all the time for all operating
conditions
• Can be classified as
» Transient – a fault that occurs only once
» Intermittent – a fault that occurs at multiple,
unpredictable times
Spatial
Temporal Information
(physical)
redundancy redundancy
redundancy
Involves
Involves the use of
repeating a
multiple components function or
operation when Provides fault
that either perform tolerance by
the same function an error is
replicating or
simultaneously or detected coding data in
are configured so
that one component such a way that
is available as a Is effective with bit errors can be
backup in case of temporary faults both detected
the failure of another but not useful and corrected
component for permanent
faults
Hardware is
surrounded by the
OS kernel
Kernel isolates
users and
applications
Comes with a
number of user
services and
interfaces
Shell
C compiler
vi editor
Almost a complete
rewrite of the System V
kernel
Small core of facilities
providing basic functions
Each of the outer circles
represents functions and
an interface that may be
implemented in a variety
of ways.
These Allows
functions developers
encapsulat to tap into Manages Provides
Manages Provides
e location- events, standardiz
application the user
application based such as ed
resources, interface
data that services, arriving messaging
such as (UI)
need to be whether by messages functions
localized primitives
shared GPS, cell and between
strings and as well as
between tower IDs, appointme application
bitmaps UI Events
application or local Wi- nts s
s such as Fi
contacts databases
Binder IPC
Camera Activity
Other Media
Service Manager Other Services
Services
Android Runtime/Dalvik
Linux Kernel
Audio Driver
Camera Driver Display Drivers
(ALSA, OSS, etc) Other Drivers