Title: OPERATING SYSTEM CONCEPTS
1OPERATING SYSTEM CONCEPTS
- Prepared by
- A.Shamila Ebenezer
2FUNDAMENTALS
3An 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
computerfrom cellular phones and video game
consoles to supercomputers and web servers.
OPERATING SYSTEM
4Android  BSD iOS Linux OS X  QNX  Microsoft
Windows Windows Phone  IBM z/OS
MOST POPULAR OPERATING SYSTEMS
5MARKET STATUS OF USAGE OF OPERATING SYSTEM
2013 Worldwide Device Shipments by Operating System 2013 Worldwide Device Shipments by 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
6management of multiple processes on a
uniprocessor architecture
multiprogramming
7The main objective of multiprogramming is to have
process running at all times. With this design,
CPU utilization is said to be maximized.
Objective of multiprogramming
8CPU SCHEDULING
- FCFS
- SJF
- PREMPTIVE AND NON PREEMPTIVE SJF
- PREEMPTIVE SCHEDULING
- ROUND ROBIN
9management of multiple processes on a
multiprocessor architecture
multiprocessing
10each processor is assigned specific tasks by a
"Master processor
Asymmetric Multiprocessing
11With 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?
12number of processes that complete their execution
per time unit.
Throughput
13amount of time to execute a particular process.Â
Turnaround time
14Â amount of time a process has been waiting in the
ready queue.
Waiting timeÂ
15time it takes for the computer system to give
response to the service request
Response Time
16In 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?
17- 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
18loading a program into memory on demand
dynamic loading
19loading a program all at once in memory
static loading
20library functions can be connected at load-time
dynamic linking
21all library functions included in the code
static linking
22Context Switch
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).
23signal sent from hardware or software to CPU to
transfer execution to some other instructions
Interrupt
24Device 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?
25GUI 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?
26Preemptive 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?
27PROCESS MANAGEMENT
28A program loaded into memory and executing
Process
29A 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?
30 there is an increased responsiveness to the
user resource sharing within the process
economy utilization of multiprocessing
architecture
Give some benefits of multithreaded programming.
31DEADLOCK
32When 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?Â
33Bankers 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 Bankers algorithm
34SYNCHRONIZATION
35when the outcome of the multiple process
execution depends on the order of the execution
of the instructions of the processes
race condition
36elementary synchronization problem where a set of
threads indefinitely alternate between executing
the critical section and non-critical section
mutual exclusion
37a requesting thread is not allowed to enter the
critical section
starvation
38general locking mechanism generally initialized
to 1
semaphore
39MEMORY MANAGEMENT
40Main memory is the only large storage media that
the CPU can access directly.
What is main memory?
41storage that does not lose its contents when
power is removed NVRAM-nonvolatile storage which
is DRAM with battery backup power
Nonvolatile storage
42Â in which some parts of memory take longer to
access than other parts
Non-Uniform Memory Access (NUMA)-
43Caching is the processing of utilizing a region
of fast memory for a limited data and process. A
cache memory is usually much efficient because of
its high access speed.
What is caching?
44Makes sure that an update of a value of A in one
cache is immediately reflected in all other
caches where A resides
Cache Coherency
45Virtual 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?
46Â What is the basic function of paging?
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.
47Fragmentation 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 variable-sized
allocation units.
What is fragmentation?
48if data is accessed once, it will likely be
accessed again in the future
locality of reference principle
49Demand paging is a system wherein area of memory
that are not currently being used are swapped to
disk to make room for an applications need.
What is demand paging?
50Trashing refers to an instance of high paging
activity. This happens when it is spending more
time paging instead of executing.
When does thrashing occur?
51When a device controller transfers an entire
block of data from its own buffer storage to
memory without CPU intervention
Direct Memory Access (DMA)
52A computer instruction that can be executed only
by a supervisory program - can only be executed
only in kernel mode
Privileged Instruction
53added 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
54Ability to continue providing service
proportional to the level of surviving hardware
Graceful Degradation
55A trap is a software-generated interrupt caused
by either an error or a user request.
What is a trap?
56each process is divided up into a number of
small, fixed-size partitions called pages
pages
57physical memory is divided into a large number of
small, fixed-size partitions called frames
frames
58per process data structure that provides mapping
from page to frame
page table