Learning Goals for Today
The role of the operating system in a
computing environment
The various functions that an operating
system performs
The main components of an operating system
Various types of operating systems 1
Why Have OSes?
1. User/programmer convenience
2. Greater resource utilization
2
The Role of An OS
The 1st program that runs when a typical
computer is turned ON, and the last one to
finish running when the computer is turned OFF
It manages the HW and SW resources of the
computer system, often invisibly. These include
the processor, memory, disk drives, etc.
It provides a simple, consistent way for
applications to interact with the HW.
3
Advantage for App. Developers
App developers do not need to know much
about the HW while they are developing their
app
They just develop with a particular OS in mind.
If the OS runs on many types of computers
having different HW configurations, so will the
app without making any HW-specific
modifications in the app SW. The OS hides the
HW differences from the app
4
Core Tasks of an OS
1. Processor management
2. Memory management
3. Device management
4. Storage management
5. Application Interface
6. User Interface
5
Processor Management
Various programs compete for the attention of
the uP for their own purposes
The OS plays the role of the honest referee,
making sure that each app gets the necessary
attention required for its proper execution
It tries to optimally manages the limited
processing capacity of the uP to the greatest
good of all the users & apps
6
Memory Management
Straight forward for a single-user, single
tasking
Each app must have enough private memory
in which to execute
App can not run into the private memory
space of another app.
Different types of memory (e.g. main, cache)
in the system must be used properly, so that
each app can run most effectively
7
Storage Management
The OS manages storage through one of its
sub-modules, the File Manager
A file system is a collection of directories,
subdirectories, and files organized in a logical
order
File manager maintains an index of the
filenames & where they are located on the disk
File manager make it easy to find the required
file in a logical and timely fashion 8
Device Management
Applications talk to devices through the OS and
OS talks to and manages devices through
Device Drivers
Example: When we print to a laser printer, we
do not need to know its details. All we do is to
tell the printer device driver about what needs
to be printed and it takes care of the details
9
Application Interface
App developers do not need to know much
about the HW, especially the uP, while they are
developing their app
The OS provides all apps with a straight-
forward and consistent interface to the HW
Example: An app uses the OS to store data on
the disk drive. For that, the app does not need
to know about the exact physical characteristics
of that drive; it just tells the OS to do that
through the app interface, and the OS takes
cares of all the details of the task 10
User Interface
Users communicate with the computer using a
consistent user interface provided by the OS
This UI can be a command-line interface in which a
user types in the commands.
Or, it can be a graphical UI, where Windows, Icons,
Menus, and a Pointing device (such as a mouse) is
used to receive and display information.
11
OS Components
12
Device
Manager
File
Manager
Loader Kernel
Command
Interpreter
(Shell) GUI
13
Kernel
The heart of the OS
Responsible for all the essential operations like
basic house keeping, task scheduling, etc.
Size important, as it is memory-resident
14
Types of OSes
Classification w.r.t. the type of computers they
run on and the type of applications they support
Real-Time Operating System (RTOS)
Single-User, Single Task
Single-User, Multi-Tasking
Multi-User
15
RTOS (1)
Used to run computers embedded in
machinery, robots, scientific instruments and
industrial systems
Typically, it has little user interaction capability,
and no end-user utilities, since the system will
be a "sealed box" when delivered for use
Examples: Real-time Linux, Real-time Windows
NT
16
RTOS (2)
An 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
Soft-Real Time
Hard-Real Time
17
Single-User, Single Task
OSes designed to manage the computer so
that one user can effectively do one thing at a
time
The Palm OS used in many palmtop computers
(PDAs) is an example of a single-user, single-
task OS
18
Single-User, Multi-Tasking
Most popular OS
Used by most all PCs and Laptops
Examples: Windows, Mac OS, Linux
Lets a single user interact with several
programs, simultaneously
19
Multi-User
A multi-user OS allows many users to take
advantage of the computer's resources,
simultaneously
The OS must make sure that the requirements
of the various users are balanced, and that the
programs they are using each have sufficient
and separate resources so that a problem with
one user doesn't affect any of the other users
Examples: Linux, Unix and mainframe OSes
20
Another Way of Classifying
Uni-processor OSes
Designed to schedule tasks on a single uP only
Multi-processor OSes
Can control computers having multiple uPs, at
times 1000s of them
21
How many different OSes are there?
100s
OSes from the Windows family dominate the
desktops and run on millions of PCs
OSes from the Unix family (Unix, Linux, etc)
are quite popular on servers
There are hundreds more. Some designed for
mainframes only. Some for embedded
applications only.
22