Professional Documents
Culture Documents
OS1
OS1
Operating System
Operating Systems Course
Outline
Operating System
Operating Systems Course
Outline
Textbooks:
Operating systems Internals and design principles: William
Stallings
References:
Operating System Concepts : Abraham Silberschatz and Peter
Baer Galvin Addison-Wesley, (6th ed.)
Operating Systems: Design and Implementation, Prentice Hall,
Andrew S. Tanenbaum and Albert S. Woodhull
Linux Programming, Richard Stones and Neil Mathew, Wrox
Publications.
Operating System
Software
Computer Programs and associated documentation
Operating System
Application Software
allows end users to accomplish one or more specific (not
directly computer development related) tasks. Typical
applications include:
industrial automation
business software
video games
telecommunications
educational software
medical software
Operating System
Systems Software
System software is a generic term referring to any computer software
which manages and controls the hardware so that application software can
perform a task.
Is a set of programs that organize, utilize and control hardware in a
computer system. If system software is stored on non-volatile storage such
as integrated circuits, it is usually termed firmware.
It helps run the computer hardware and computer system. It includes a
combination of the following:
Device drivers
Operating systems
Servers
Utilities
Window System
Operating System
Operating System
• System Software that controls the system’s
hardware and that interacts with the user
and application software.
• An interface between applications program
and computer hardware
Operating System
Computer System Components
1. Hardware – provides basic computing resources (CPU, memory, I/O
devices).
2. Operating system – controls and coordinates the use of the hardware
among the various application programs for the various users.
3. Applications programs – define the ways in which the system
resources are used to solve the computing problems of the users
(compilers, database systems, video games, business programs).
4. Users (people, machines, other computers).
Operating System
Abstract View of System
Components
Operating System
Why Have OSes?
1. User/programmer convenience
Operating System
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
Operating System
Are OS’es Essential?
• No. If a computer has been designed for limited
functionality (e.g. it runs just a single program all the time
as in a automatic clothes washing machine), it does not
require a traditional OS
Operating System
In the beginning …
• A single user ran a single program ran on a single computer
– there was no need for an OS
Operating System
Core Tasks of an OS
1. Processor management
2. Memory management
3. Device management
4. Storage management
5. Application Interface
6. User Interface
Operating System
Processor Management
• Various programs compete for the attention of the
uP for their own purposes
Operating System
Memory Management
• Straight forward for a single-user, single tasking
Operating System
Storage Management
• The OS manages storage through one of its sub-modules,
the File Manager
Operating System
Device Management
• Applications talk to devices through the OS and OS
talks to and manages devices through Device
Drivers
Operating System
Application Interface
• App developers do not need to know much about the HW,
especially the uP, while they are developing their app
Operating System
User Interface
• Users communicate with the computer using a consistent
user interface provided by the OS
Operating System
What is the OS made of?
The architecture shown below is applicable for
Unix and its family – Including Linux
Hardware
Shell
Kernel and
system software
Users
Other Applications
Operating System
What is the OS made of?
• User – The system representation of the human operator who
requests for services.
• Application Software – Special software to help the user do his
task (E.g.. MS Word)
• Shell – The program that interprets the commands or requests
given by the user and gets the job done by the kernel.
• Kernel – The core of the operating system. It uses the hardware
to do the jobs required by the user or the system. It coordinates
among the hardware and interfaces it with the above layers.
• System Software – Software that can access the hardware
directly and generally provides various system services. (E.g..
The kernel itself, device drivers etc.).
• Hardware – The set of electronic devices that work together to
ultimately do the job required by all the upper levels.
Operating System
Types of OS’es
Classification w.r.t. the type of computers they run
on and the type of applications they support
Operating System
RTOS (1)
• Used to run computers embedded in machinery,
robots, scientific instruments and industrial systems
Operating System
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
Operating System
Single-User, Single Task
• OS’es designed to manage the computer so that one
user can effectively do one thing at a time
Operating System
Single-User, Multi-Tasking
• Most popular OS
Multi-processor OS’es
Can control computers having multiple uPs, at times
1000’s of them
Example: Current versions of Windows, Mac
OS, Linux, Solaris
Operating System
How many different OS’es are there?
• 100’s
Command Interpreter
Information Services
Protection System
I/O System
Operating System
OS structure
Major issues:
•How do we organize all this?
•What are all the code modules, and where do they exist?
•How do they cooperate?
Massive software engineering and design problem
Design a large complex program that:
Performs well, is reliable, is extensible, is backwards
compatible…
Operating System
Different Architectural Approaches
• Various approaches have been tried,
categories include:
– Monolithic system
– Layered system
– Micro kernel
– Virtual machines
– Multithreading
– Symmetric multiprocessing
– Distributed operating systems
– Object-oriented design
Operating System
Operating System
Operating System
Operating System
Operating System
Microkernel Architecture
• Most early OS are a monolithic kernel
– Most OS functionality resides in the kernel.
• A microkernel assigns only a few essential
functions to the kernel
– Address spaces
– Interprocess communication (IPC)
– Basic scheduling
Operating System
Operating System
Virtual Machine
Export a virtual machine to user programs that
resembles hardware.A virtual machine consists of
all hardware features e.g. user/kernel modes, I/O,
interrupts and pretty much everything a real
machine has.A virtual machine may run any OS.
Examples:
JVM, VmWare, User-Mode Linux (UML).
Advantage: portability
Disadvantage: slow speed
Operating System
Multithreading
• Process is divided into threads that can run
concurrently
• Thread
– Dispatchable unit of work
– executes sequentially and is interruptible
• Process is a collection of one or more
threads
Operating System
Symmetric
multiprocessing (SMP)
• An SMP system has
– multiple processors
– These processors share same main memory and
I/O facilities
– All processors can perform the same functions
• The OS of an SMP schedules processes or
threads across all of the processors.
Operating System
SMP Advantages
• Performance
– Allowing parallel processing
• Availability
– Failure of a single process does not halt the
system
• Incremental Growth
– Additional processors can be added.
• Scaling
Operating System
Distributed
Operating Systems
• Provides the illusion of
– a single main memory space and
– single secondary memory space
• Early stage of development
Operating System
Object-oriented design
• Used for adding modular extensions to a
small kernel
• Enables programmers to customize an
operating system without disrupting system
integrity
Operating System
Windows Architecture
Modular Core
kernel
Operating System
Windows Objects
Operating System
Linux
Operating System
Modular
Monolithic Kernel
• Although monolithic, the kernel is
structures as a collection of modules
– Loadable modules
– An object file which can be linked and unlinked
at run time
Operating System
Linux Kernel Components
Operating System