OPERATING SYSTEM CONCEPTS
Download
Report
Transcript OPERATING SYSTEM CONCEPTS
OPERATING SYSTEM CONCEPTS
Prepared by
A.Shamila Ebenezer
FUNDAMENTALS
An operating system (OS) is software that
manages computer
hardware and software resources and
provides common services forcomputer
programs.
Operating systems can be found on almost
any device that contains a computer—
from cellular phones and video game
consoles to supercomputers and web
servers.
OPERATING
SYSTEM
Android
BSD
iOS
Linux
OS X
QNX
Microsoft Windows
Windows Phone
IBM z/OS
MOST POPULAR
OPERATING
SYSTEMS
MARKET STATUS
OF USAGE OF
OPERATING
SYSTEM
2013 Worldwide Device Shipments by Operating System
Operating System
2012 (Million of
Units)
2013 (Million of
Units)
Android
504
878
Windows
346
328
iOS/Mac OS
214
267
BlackBerry
35
24
Others
1,117
803
Total
2,216
2,300
management of
multiple processes
multiprogramming
on a uniprocessor
architecture
The main objective of
multiprogramming is to
of at all
have Objective
process running
times.
With
this
design,
multiprogramming
CPU utilization is said to be
maximized.
•FCFS
•SJF
•PREMPTIVE AND NON PREEMPTIVE SJF
•PREEMPTIVE SCHEDULING
• ROUND ROBIN
CPU SCHEDULING
management of
multiple processes
multiprocessing
on a multiprocessor
architecture
each processor is
Asymmetric
assigned
specific
tasks by a "Master
Multiprocessing
processor
With an increased number of
processors, there is
considerable increase in
throughput. It can also save
more money because they can
share resources. Finally,
overall reliability is increased
as well.
What are the
advantages of a
multiprocessor
system?
number of
processes that
complete their
Throughput
execution per time
unit.
amount of time to
execute a
Turnaround time
particular
process.
amount of time a
process has been
Waiting time
waiting in the
ready queue.
time it takes for the
computer system to
give response to the
service request
Response
Time
In a Time sharing system, the CPU
executes multiple jobs by
switching among them, also
known as multitasking. This
process happens so fast that users
can actually interact with each
program while it is running.
What are time
sharing systems?
bootstrap program is loaded at
power-up or reboot
•Typically stored in ROM or
EEPROM, generally known as
firmware
•Initializates all aspects of system
•Loads operating system kernel and
starts execution
Bootstrap
program
loading a
program into
dynamic loading
memory on
demand
loading a program
static
all at loading
once in
memory
library functions
can be
dynamic linking
connected at
load-time
all library
functions
static
linking
included in the
code
Switching the CPU to another process requires
saving the state of the old process and loading the
saved state for the new process. This task is known
as a context switch. Context-switch time is pure
overhead, because the system does no useful work
while switching. Its speed varies from machine to
machine, depending on the memory speed, the
number of registers which must be copied, the
existed of special instructions(such as a single
instruction to load or store all registers).
Context Switch
signal sent from
hardware or software
to CPU to transfer
execution to some
other instructions
Interrupt
Device drivers provides a
standard means of
representing I/O devices that
maybe manufactured by
different companies. This
prevents conflicts whenever
such devices are incorporated
in a systems unit.
What are device
drivers?
GUI is short for Graphical User Interface. It
provides users with an interface wherein
actions can be performed by interacting
with icons and graphical symbols. People
find it easier to interact with the computer
when in a GUI especially when using the
mouse. Instead of having to remember and
type commands, users just click on buttons
to perform a process.
What is GUI?
Preemptive multitasking allows
an operating system to switch
between software programs. This
in turn allows multiple programs
to run without necessarily taking
complete control over the
processor and resulting in system
crashes.
What is
preemptive
multitasking?
PROCESS
MANAGEMENT
A program
loaded into
Process
memory and
executing
A thread is a basic unit of
CPU utilization. In
general, a thread is
composed of a thread ID,
program counter, register
set and the stack.
What is a
thread?
– there is an increased
responsiveness to the user
– resource sharing within the
process
– economy
– utilization of multiprocessing
architecture
Give some
benefits of
multithreaded
programming.
DEADLOCK
When a process requests an available
resource, system must decide if
immediate allocation leaves the
system in a safe state. System is in safe
state if there exists a safe sequence of
all processes. Deadlock Avoidance:
ensure that a system will never enter
an unsafe state.
What is a Safe State
and what is its use in
deadlock
avoidance?
Banker’s algorithm is one form of
deadlock-avoidance in a system. It
gets its name from
a banking system wherein the bank
never allocates available cash in
such a way that it can no longer
satisfy the needs of all of its
customers.
Describe
Banker’s
algorithm
SYNCHRONIZATION
when the outcome of the
multiple process
execution depends on the
order of the execution of
the instructions of the
processes
race condition
elementary synchronization
problem where a set of
threads indefinitely
alternate between
executing the critical section
and non-critical section
mutual exclusion
a requesting
thread is not
allowed to enter
the critical section
starvation
general locking
mechanism;
semaphore
generally
initialized to 1
MEMORY
MANAGEMENT
Main memory is the
What
is storage
main
only
large
media
that
the
CPU
memory?
can access directly.
storage that does not
lose its contents when
power is removed
NVRAM-nonvolatile
storage which is DRAM
with battery backup
power
Nonvolatile
storage
in
which
some
Non-Uniform
parts of memory
Memory
take longer to
Access
access than other
(NUMA)parts
Caching is the processing of
utilizing a region of fast
memory for a limited data
and process.
A cache
What
is caching?
memory is usually much
efficient because of its high
access speed.
Makes sure that an
update of a value of A
in one cache is
Cache
Coherency
immediately reflected
in all other caches
where A resides
Virtual memory is a memory
management technique for
letting processes execute
outside of memory. This is
very useful especially is an
executing program cannot fit
in the physical memory.
What is
virtual
memory?
Paging is a memory
management scheme that
permits the physical-address
space of a process to be
noncontiguous. It avoids the
considerable problem of
having to fit varied sized
memory chunks onto the
backing store.
What is the
basic function
of paging?
Fragmentation is memory
wasted. It can be internal if we
are dealing with systems that
have fixed-sized allocation units,
or external if we are dealing
with systems that have variablesized allocation units.
What is
fragmentation?
if data is accessed
once, it will likely be
locality of reference principle
accessed again in
the future
Demand paging is a system
wherein area of memory
that are not currently being
used are swapped to disk to
make room for an
application’s need.
What is
demand
paging?
Trashing refers to an
instance of high paging
When
activity.
Thisdoes
happens
when
it
is
spending
more
thrashing occur?
time paging instead of
executing.
When a device controller
transfers
an entireAccess
block
Direct Memory
of
data from its own
(DMA)
buffer storage to memory
without CPU intervention
A computer instruction that
can be executed only by a
supervisory program - can
only be executed only in
kernel mode
Privileged
Instruction
added to the hardware of the
computer to indicate the
current mode: kernel(0) or
user (1). Distinguishes
between a task that is
executed on behalf of the OS
and one is that executed on
behalf of the user
Mode Bit
Ability to continue
providing service
proportional
Graceful to the
level of surviving
Degradation
hardware
A trap is a softwaregenerated interrupt
caused by
an
What
is either
a trap?
error or a user
request.
each process is
divided up into a
number of small,
fixed-size partitions
called pages
pages
physical memory is
divided into a large
number
of small,
frames
fixed-size partitions
called frames
per process data
structure that
page table
provides mapping
from page to frame