Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
83 views97 pages

Fund'S of Operating Systems: Prakash K

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 97

FUNDS OF

OPERATING SYSTEMS
Prakash K
TOPICS
O
v
e
r
v
i
e
w What is an
OS?
Objectives
and
Functions
Types of OS
S
c
h
e
d
u
l
i
n
g
Long Term
Medium
Term
Short Term
M
e
m
o
r
y

M
a
n
a
g
e
m
e
n
t
The Heap
Allocated
Memory
Paged
Memory
Segmented
Memory
Physical
Memory
WHAT IS AN OS?
What is called interface
Types of interfaces
Windows 7/8 Windows Vista
Windows a series of software operating systems and GUIs
produced by Microsoft. The most recent client version of is
Vista. Windows 7 ,8;
Linux are OS based on the Linux kernel. It is free and open
source; typically all the underlying source code can be
used, freely modified, and redistributed by anyone.
Mac OSX is a line of OS developed, marketed, and sold
by Apple Inc. Mac OS X, whose X means 10.
The OS is one of the most
important components of any
computer system.
This is the system that runs the
computer at its most basic level.
Without an operating system, a
computer is a .
The OS is the most fundamental
program that runs on your
computer. It serves as the basis
for how everything else works.
OS are responsible for
everything from starting
up the computer when
you push the "on"
button to high level
system security.
The type of operating
system a computer has
also determines what
types of software can
be run on it.
to organize and control
hardware and software
so that the device it lives
in behaves in a flexible
but predictable way.
WHAT IS THE FUNCTION OF AN OS?
OS FUNCTIONS
It manages the hardware and software resources
of the system.
In a desktop computer, these resources include
such things as
the processor (is an electronic circuit that can execute
computer programs),
memory,
disk space and
more (On a cell phone, they include the keypad, the
screen, the address book, the phone dialer, the battery
and the network connection).
It provides a stable,
consistent way for
applications to deal with
the hardware without
having to know all the
details of the hardware.
OS FUNCTIONS
OS performs a variety of functions, including
determining what types of software you can install
coordinating the applications running on the computer at any
given time
making sure that individual pieces of hardware, such as printers,
keyboards, and disk drives, all communicate properly
allowing applications such as word processors, email clients, and
web browsers, to perform tasks on the system
reporting errors
OS FUNCTIONS
The OS also determines how you see
information and perform tasks. Some operating
systems utilize a graphical user interface (GUI),
which presents information through pictures
(icons, buttons, dialog boxes, etc.) as well as
words.
TASKS of OS
Acts as parent to share
First Task
The first task, managing the hardware and software
resources, is very important, as various programs compete
for the attention of the central processing unit (CPU).
In this capacity, the OS plays the role of the good parent,
making sure that each application gets the necessary
resources while playing nicely with all the other applications,
as well as husbanding the limited capacity of the system to
the greatest good of all the users and applications.
Specific to the interface
Second Task
The second task, providing a consistent application
interface,
is especially important if there a lot of types of
computer using the operating system,
or if the hardware making up the computer is always
open to change.
A consistent application program interface (API)
allows a software developer to write an application on
one computer and have a high level of confidence that
it will run on another computer of the same type, even
if the amount of memory or the quantity of storage is
different on the two machines.
Note
Even if a particular computer is unique, an
operating system can ensure that applications
continue to run when hardware upgrades and
updates occur.
One of the challenges facing developers is keeping
their operating systems flexible enough to run
hardware from the thousands of vendors
manufacturing computer equipment.
Today's systems can accommodate thousands of
different printers, disk drives and special
peripherals in any possible combination.
TYPES OF OS, BASED ON
CONTROL AND SORTING PROCESS
Types of Operating Systems
Within the broad family of operating
systems, there are generally four types,
categorized based on the types of
computers they control and the sort of
applications they support.
The categories are:
*Real-time operating system (RTOS)
RTOS are used to control
machinery, scientific
instruments and industrial
systems.
1. Real-time operating system (RTOS)
An RTOS typically has very little user-interface capability, and no
end-user utilities, since the system will be a "sealed box" when
delivered for use.
A very important part of an RTOS is managing the resources of the
computer so that a particular operation executes in precisely the
same amount of time, every time it occurs.
In a complex machine, having a part move more quickly just
because system resources are available may be just as
catastrophic as having it not move at all because the system is
busy.
2. Single-user, single task
As the name implies, this operating system is
designed to manage the computer so that
one user can effectively do one thing at a
time.
The Palm OS for Palm handheld
computers is a good example of
a modern single-user, single-
task operating system.
3. Single-user, multi-tasking
This is the type of operating system
most people use on their desktop and
laptop computers today.
Microsoft's Windows and
Apple's MacOS platforms
are both examples of OS
that will let a single user
have several programs in
operation at the same time.
For example, it's entirely
possible for a Windows user
to be writing a note in a word
processor while downloading
a file from the Internet while
printing the text of an e-mail
message.
4. Multi-user
A multi-user operating system allows many
different users to take advantage of the
computer's resources simultaneously.
The operating system must make sure that the
requirements of the various users are balanced,
and that each of the programs they are using
has sufficient and separate resources so that a
problem with one user doesn't affect the entire
community of users.
Unix, VMS and mainframe
operating systems, are
examples of multi-user
operating systems.
SCHEDULING
What is scheduling?
What is scheduling?
Scheduling refers to the way processes are
assigned to run on the available CPUs.
This assignment is carried out by software
known as a scheduler.
Types of OS schedulers
Types of OS schedulers
Long-term Scheduler
Also called admission
decides which jobs or processes are to be
sent to the ready queue;
Process is an instance of a computer program. A computer program itself is
just a collection of instructions, while a process is the actual execution of those
instructions.
A "ready process has been loaded into main memory and is awaiting
execution on a CPU
Queue line of waiting processes
Long-term Scheduler
That is, when an attempt is made to execute a
program, its admission to the set of currently
executing processes is either authorized by the
long-term scheduler.
Long-term Scheduler
Thus, this scheduler dictates what
processes are to run on a system, and the
degree of concurrency to be supported at
any one time
Concurrent all happening at one time
Long-term Scheduler
In modern OS's, this is used to make sure
that real time processes get enough CPU
time to finish their tasks.
Without proper real time scheduling, modern
GUI interfaces would seem sluggish.
GUI Graphical User Interface. Everything you see on the screen.
Real time actual events happening at this moment
Sluggish moving slowly
Long-term Scheduler
Long-term scheduling is also important in
large-scale systems such as batch
processing systems, computer clusters,
supercomputers and render farms.
Batch processing is
execution of a series of
programs on a computer
without human
interaction.
A computer cluster is
a group of linked
computers, working
together closely so
that in many respects
they form a single
computer.
A supercomputer is a
computer that is at the
frontline of current
processing capacity,
particularly speed of
calculation.
A render farm is a computer cluster built to
render computer-generated imagery (CGI),
typically for film and television visual effects,
using off-line batch processing.
Types of OS schedulers
Mid-term Scheduler
referred to as "swapping out" or "swapping in"
present in all systems with virtual memory,
temporarily removes processes from main
memory (RAM) and places them on secondary
memory (such as a disk drive) or vice versa.
With virtual memory, the computer can look for areas of RAM that have not been
used recently and copy them onto the hard disk. This frees up space in RAM to load
the new application. MORE WILL BE DISCUSSED LATER.
Which process to be swapped
Mid-term Scheduler
The mid-term scheduler may decide to swap out
a process which has not been active for some
time,
or a process which has a low priority,
or a process which is taking up a large amount of
memory
Types of OS schedulers
Short-term Scheduler
also known as the dispatcher
decides which of the ready, in-memory
processes are to be executed
Short-term Scheduler
makes scheduling decisions much more
frequently than the long-term or mid-term
schedulers because a decision will be made
after every time slice, and these are very
short.
time slice time per each program per one process CPU
Short-term Scheduler
This scheduler can be preemptive, implying
that it is capable of forcibly removing
processes from a CPU when it decides to
allocate that CPU to another process.
Preemptive characteristic of securing something before someone else.
MEMORY MANAGEMENT
What is Memory Management?
What is Memory Management?
It is a term used to describe how the OS
handles the available RAM. It is managed at
multiple levels.
PHYSICAL MEMORY
The most basic level
Its size is the sum of all the capacities of all RAM.
The
Heap
Allocated
Memory
Paged Memory
Segmented Memory
Physical Memory
Physical Memory
For example, when you have two 512 MB
SDRAM* modules installed in your system,
the OS will have 1 GB of physical memory
at its disposal.
512
MB
512
MB
1 G
*512 Megabytes Synchronous Dynamic RAM
What is RAM?
Just as with your computer, when you want to
write a hardware work on some project, you
need to open programs and spread them out
within your computer's memoryit's RAM.
If you have a simple note to write, you might use
a little program like Notepad.
If it's a more involved project, maybe you'll open
Word or some special stationary program.
What is RAM?
How much is needed
The bigger the program, the more RAM will
be needed and subsequently used.
Just as your computer has lots of RAM to allow
programs to work quickly.
What is RAM?
The two types differ in the technology they use to
hold data.
does not need to be refreshed, which
makes it faster; but it is also more expensive than
dynamic RAM.
needs to be refreshed thousands
of times per second.
Both types of RAM are volatile, meaning that they
lose their contents when the power is turned off.
Virtual Memory
An imaginary memory area supported by some
OS in conjunction with the hardware.
You can think of virtual memory as an alternate
set of memory addresses.
Programs use these virtual addresses rather than
real addresses to store instructions and data.
The purpose of virtual memory is to enlarge
the address space, the set of addresses a
program can utilize.
Kinds of Virtual Memory
The
Heap
Allocated
Memory
Paged Memory
Segmented Memory
Physical Memory
SEGMENTED MEMORY
On top of the physical memory is the segmented memory.
SM is one of the most common ways to achieve memory
protection
The
Heap
Allocated
Memory
Paged
Memory
Segmented
Memory
Physical Memory
Segmented Memory
An address space logically divided into
sections, called segments.
Address space Memory allocated to an application by the operating system.
Logically related
Segmented Memory
A segment has a set of permissions, and a
length, associated with it.
If the currently running process is allowed by
the permissions to make the type of
reference to memory that it is attempting to
make, the reference is permitted.
Segmented Memory
Segmented Memory is the additional 64
KB of RAM for early computers.
But most operating systems today don't
use a segmented memory model, with the
advent of paging.
PAGED MEMORY
A technique used by virtual memory operating systems to help
ensure that the data you need is available as quickly as possible.
The
Heap
Allocated
Memory
Paged
Memory
Segmented Memory
Physical Memory
Paged Memory
the OS retrieves data from secondary
storage in same-size blocks called pages.
The operating system copies a certain
number of pages from your storage device
to main memory.
When a program needs a page that is not in
main memory, the operating system copies
the required page into memory and copies
another page back to the disk.
Paged Memory
When a program needs a page that is not
in main memory, the operating system
copies the required page into memory and
copies another page back to the disk.
Swapping
To replace pages or segments of data in
memory.
Swapping is a useful technique that enables a
computer to execute programs and manipulate
data files larger than main memory.
The operating system copies as much data as
possible into main memory, and leaves the rest
on the disk.
Swapping
When the operating system needs data from
the disk, it exchanges a portion of data (called
a page or segment ) in main memory with a
portion of data on the disk.
Compare
Swapping
Swapping is when an
entire process is
swapped out.
Paging is normal.
Paging
Paging refers to making
individual pages of
memory.
Swapping happens when
the resource load is
heavy and the entire
process is written out to
disk.
ALLOCATED MEMORY
With paging, memory is managed in 4 KB-sized chunks.
Most applications require the ability to be able to get only a fraction
of that size, to store data.
The
Heap
Allocated
Memory
Paged Memory
Segmented Memory
Physical Memory
Allocated Memory
The memory allocator gets a big chunk of
memory
For example
4 pages, or 4 * 4 KB = 16 KB
and divides this into much smaller chunks
which it gives to the applications when
requested.
THE HEAP
In programming, an area of memory reserved for data that is
created at runtime.
The
Heap
Allocated
Memory
Paged
Memory
Segmented
Memory
Physical Memory
The Heap
an area of memory reserved for data when
the program actually executes.
an area of memory reserved for data whose
size can be determined when the program
is compiled.
Heap Sort
begins by building
a heap out of the
data set, and then
removing the largest
item and placing it at
the end of the sorted
array.
After removing the largest item, it
reconstructs the heap and removes
the largest remaining item and
places it in the next open position
from the end of the sorted array.
This is repeated until there are no
items left in the heap and the
sorted array is full.
PARTITIONING
To divide memory or mass storage into isolated sections.
In addition, partitioning on Windows machines can improve disk
efficiency.
BUFFER
Buffer A temporary storage area, usually in RAM.
For example, word processors employ a buffer to keep
track of changes to files.
Then when you save the file, the word processor updates
the disk file with the contents of the buffer.
This is much more efficient than accessing the file on the
disk each time you make a change to the file.
Buffer
Another common use of buffers is for printing
documents.
When you enter a PRINT command, the
operating system copies your document to a
print buffer (a free area in memory or on a disk)
from which the printer can draw characters at
its own pace.
This frees the computer to perform other tasks
while the printer is running in the background.
Print buffering is called spooling.
Buffer
Most keyboard drivers also contain a
buffer so that you can edit typing mistakes
before sending your command to a
program.
Computers
Mobile phones
3d televisions
Video game
ATM
Ticket Wending Machine
Examples of computing devices
which use OS
Speed meters.
Digital Watches.
Micro ovens.
Washing machines.
Calculators.
Examples of computing devices
which are not using OS
Easy to use
User friendly
Intermediate between all
hardware's and software's of the
system
No need to know any technical
languages
Its the platformof all programs
Ads & Dads of OS
If any problems affected
in OS, you may lose all the
contents which have been
stored already
Unwanted user can use
your own system
Topics Discussed
O
v
e
r
v
i
e
w
What is an
OS?
Objectives
and
Functions
Types of OS
S
c
h
e
d
u
l
i
n
g
Long Term
Medium Term
Short Term
M
e
m
o
r
y

M
a
n
a
g
e
m
e
n
t
The Heap
Allocated
Memory
Paged
Memory
Segmented
Memory
Physical
Memory

You might also like