Lecture 07
Lecture 07
Introduction to Computers
Introduction to Operating Systems
By Isuri
Anupama Uwanthika
Gunathilake
What is an Operating System?
A modern computer consist of
One or more processors
Main memory
Disks
Printers
Various input/output devices
2
What is an Operating System?
For this reason, computers are equipped with a layer of
software called operating system.
3
What is an Operating System?
4
What is an Operating System?
• Examples
– Windows
– Linux
– Mac OS
5
Operating System as an Extended
Machine
The architecture (instruction set, memory organization,
I/O and bus structure) of most computers at the machine
language level is primitive and awkward to program.
Users does not want to involved with the programming
hardware.
Instead, what the user want is a simple, high level
abstraction to dealwith.
– In the case of disks, a typical abstraction would be that
the disk contains a collection of named files, each file
can be open, read, write andclose.
6
Operating System as an Extended
Machine
The program that hides the truth about the hardware
from the user and present a nice, simple view of named
files that can be read and written is the Operating
System.
The abstraction offered by the operating system is
simpler and easier to use than that offered by the
underlyingnhardware.
7
Operating System as an Extended
Machine
8
Operating System as a Resource
Manager
A modern computer consists of one or more
processors, memories, disks, printers and wide
variety of other devices.
The job of the operating system is to provide for an
orderly and controlled allocation of the above
devices among the various programs competing for
them.
9
Operating System as a Resource
Manager
Operating system need to keep track of who
is using which resources
To grant recourse request,
To account for usage,
And to mediate conflicting requests.
Resource sharing (multiplexing) can be done
in two ways.
In time
In space
10
Operating System as a Resource
Manager
In time multiplexing, different programs take turns
to use resources. First one gets to use the resource,
then another, and so on.
11
Operating System as a Resource
Manager
In space multiplexing, each program gets part of the
resources.
12
Functions of an Operating System
Memory Management
Processor Management
Device Management
File Management
Security
Control over systemperformance
Ob accounting
Error detecting aids
Coordination between other software and users.
13
Memory Management
Main memory provides a fast storage that can be
accessed directly by the CPU. For a program to be
executed, it must in the main memory.
An Operating System does the following activities
for memory management.
Keep track of primary memory : what part of it
are in use by whom, what part is not.
In multiprogramming, the OS decides which
process will get memory when and how much.
Allocate and de-allocates the memory.
14
Processor Management
In multiprogramming environment, the OS decides
which process gets the processor when and for how
long. This function is called process scheduling.
An Operating System does the following activities
for processor management.
Keeps track of processor and its status. The
program responsible for this task is known as
traffic controller.
Allocates and de-allocates the CPU (processor)
to a process
15
Device Management
An Operating System manages device
communication via their respective drivers. It does
the following activities for device management.
Keep track of all devices. The program
responsible for this task is known as the I/O
controller.
Decides which process gets the device when and
for how long.
Allocates and de-allocates the device in most
efficient manner.
16
File Management
A file system is normally organized into directories
for easy navigation and usage. These directories may
contain files and other directories.
An Operating System does the following activities
for file management.
Keeps track of information, location, uses, status etc.
The collective facilities are often known as file
system.
Decides who gets the resources.
Allocates and de-allocates the resources
17
Other Important Activities
Security
By means of password and similar other techniques,
it prevent unauthorized accessto programs and data.
Job accounting
Keeping track of time and resources used by various
jobs and users.
18
Other Important Activities
Error detecting aids
Production of trace, error message and other
debugging and error detecting aids.
19
Shell
In computing, a shell is a user interface for access to an
operating system’s services.
Two types
Command line interface (CLI)
Graphical user interface (GUI)
20
Graphical User Interface (GUI)
Is a type of user interface that allows users to interact
with electronic devices through graphical icons and visual
indicators.
For example, all versions of Microsoft Windows utilize a
GUI.
21
Command Line Interface (CLI)
Is a text-based interface that is used to operate software
and operating system while allowing user to respond to
visual prompts by typing single commands into the
interface and receiving a reply in he same way.
– E.g. DOS, Linux, UNIX
22
Types of Operating Systems
Batch Operating System
The users of batch processing system do not interact
with the computer directly. Each user prepares his job
on punch cards and submit it to the computer
operator.
To speed up processing, jobs with similar needs are
batched together and run asa group.
23
Types of Operating Systems
• Batch Operating System
26
Types of Operating Systems
Batch Operating System
27
Types of Operating Systems
Time-sharing Operating System
Time-sharing is a technique which enables many
people, located at various terminals, to use a
particular computer system at the sametime.
Processor’s time which is shared among multiple users
simultaneously is termed astime-sharing.
The OSusesCPUscheduling and multiprogramming.
Objective is to minimize responsetime.
28
Types of Operating Systems
Time-sharing Operating System
An OS does the flowing activities related to
Time-sharing / multitasking.
• A program that us loaded into memory and is
executing is commonly referred to asa processor.
• When a process executes, it typically executes for
only a very short time before it either finishes or
needs to perform I/O.
• Since interactive I/O typically runs at slower
speeds, it may take long time to complete.
• During this time, a CPUcan be utilized by another
process.
29
Types of Operating Systems
Time-sharing Operating System
30
Types of Operating Systems
Memory layout for multi-tasking/time- sharing/multi-
programming
31
Types of Operating Systems
Distributed Operating System
Distributed systems use multiple central processors to
serve multiple real-time applications and multiple
users.
Collection of independent, networked,
communicating and physically separate
computational nodes.
Data processing jobs are distributed among the
processors.
The processors communicate with one another
through various communication lines. E.g. high speed
buses, telephone lines
These also referred asloosely coupled systems. 32
Types of Operating Systems
Distributed Operating System
33
Types of Operating Systems
Network Operating System
A network Operating System runs on a server and
provides the server the capability to manage data,
users, security and application.
The primary purpose of the network operating
system is to allow shared file and printer access
among multiple computers in anetwork.
E.g. Microsoft Windows server 2003, 2008, UNIXX,
Linux, Mac OSX, BSD.
34
Types of Operating Systems
Network Operating System
35
Types of Operating Systems
Real-Time Operating System
This is defined as a data processing system in which
time interval required to process and respond to
inputs is so small that it controls the environment.
The time taken by the system to respond to an input
and display of required updated information is
termed asthe response time.
A real-time operating systems must have well
defined, fixed time constraints, otherwise the system
will fail.
E.g. Scientific experiments, weapon system, air
traffic control systems
36
Types of Operating Systems
Real time Operating System
There are two types of realtime operating
systems.
Hard real time systems
Less restrictive.
A critical real time task get priority over
other tasks and retains the priority until it
complete
37
Types of Operating Systems
Mobile Operating System
Specifically designed to run on mobile devices such as
mobile phones, PDAs, tablet computers and other
handheld devices.
• Android OS
• BlackBerry OS
• Symbian OS
• iOS
• webOS
• MeeGO OS
38
MS – DOS OS
MS-DOS (Microsoft Disk Operation System) is a
single – user, single – tasking computer operating
system that uses a non – graphical command line
interface.
DOS uses a directory system, where all the files are
contained within a particular directory or a subdirectory.
39
Windows OS
Is a graphical operating system developed, marketed
and sold by Microsoft.
Is a commercial product.
Eliminated the need for remembering the codes and the
actions that go with the code.
40
DOS vs Windows
41
Linux
Linux is an open source, cross platform operating system.
Some of the popular Linux distributions (Linux based OS)
include Ubuntu, Fedora and Debian.
Users can even alter the kernel in order to make changes
to the operating system itself.
Having full access to the code helps bring about faster
improvements and bugfixes.
42
Homework
• “Linux is better than Windows”. Do you agree with this
statement? If soprovide necessary points to proveit.
43
THANK YOU
44