Operating System
Architecture of Computer System
Hardware
Operating System (OS)
Programming Language (e.g. PASCAL)
Application Programs (e.g. WORD, EXCEL)
2
Detail Layered View of Computer
3
Dynamic View of Computer
4
Computer Hardware Organization
5
System Software, Application
Software and Driver Programs
• System Software- Performs essential operation tasks
– Operating system
– Utility programs
• Application Software - Performs specific tasks for users
– Business application
– Communications application
– Multimedia application
– Entertainment and educational software
• Driver Programs (Device Driver)
– small program that allows a specific input or output device to communicate with the rest of
the computer system
6
3 Types of Programs
• user / application programs
– programs used by the users to perform a task
• system programs
– an interface between user and computer
• driver programs
– communicate I/O devices with computer
7
History Of Operating System
•History of operating system is one of years of
experimentation.
• Was absent in the first commercial form of electronic
computer launched in 1940's.
•Rows of mechanical switches were used to enter
programs.
•At that time programming languages were not in use.
•Naturally there was hardly any idea about operating
system.
8
The earliest version of operating system was used by
the General Motors Research Laboratories.
IBM 701 was the first operating system equipped
computer architecture.
It was a major mark in the history of operating
system. This type of computer system was known as
batch processing system.
9
Operating System
• A collection of programs which control the
resources of a computer system
• Written in low-level languages (i.e. machine-
dependent)
• An interface between the users and the
hardware
• When the computer is on, OS will first load
into the main memory
10
General Definition
Application
• Another aspect for the usage
Programs
of OS is that; it is used as a
predefined library for
hardware-software System Programs
interaction.
• This is why, system programs Operating System
apply to the installed OS
since they cannot reach Machine Language
hardware directly.
HARDWARE
11
General Definition
• Since we have an already written library,
namely the OS, to add two numbers we
simply write the following line to our
program:
c=a+b;
12
General Definition
in a system where there is no OS installed, we
should consider some hardware work as:
(Assuming an MC 6800 computer hardware)
LDAA $80 Loading the number at memory location 80
LDAB $81 Loading the number at memory location 81
ADDB Adding these two numbers
STAA $55 Storing the sum to memory location 55
As seen, we considered memory locations and
used our hardware knowledge of the system.
13
General Definition
• In an OS installed machine, since we have an
intermediate layer, our programs obtain some
advantage of mobility by not dealing with
hardware.
• For example, the above program segment would
not work for an 8086 machine, where as the
“c = a + b ;”
syntax will be suitable for both.
14
General Definition
A more
A simple sophisticated Hardware
program OS program segment Machine
Language
response
segment with with hardware
no hardware consideration
consideration
15
General Definition
• With the advantage of easier programming
provided by the OS, the hardware, its machine
language and the OS constitutes a new
combination called as a virtual (extended)
machine. Operating
Machine System
Virtual
Language Machine (Extende
Machine Language
Hardware d)
Hardware Machine
16
General Definition
• In a more simplistic approach, in fact, OS itself is a
program.
• But it has a priority which application programs don’t
have.
• OS uses the kernel mode of the microprocessor,
whereas other programs use the user mode.
• The difference between two is that; all hardware
instructions are valid in kernel mode, where some of
them cannot be used in the user mode.
17
Basic functions of the operating
system
Device configuration
Controls peripheral devices connected to the computer
File management
Transfers files between main memory and secondary
storage, manages file folders, allocates the secondary
storage space, and provides file protection and
Operating recovery
System
Memory management
Allocates the use of random access memory (RAM) to
requesting processes
Interface platform
Allows the computer to run other applications
18
Function of Operating System
• Best use of the computer resources
• Provide a background for user’s programs to
execute
• Display and deal with errors when it happens
• Control the selection and operation of the
peripherals
• Act as a communication link between users
• System protection
19
Services provided by an OS
• Facilities for program creation
– editors, compilers, linkers.
• Program execution
– loading in memory, I/O and file initialization.
• Access to I/O and files
– deals with the specifics of I/O and file formats.
• System access
– resolves conflicts for resource contention.
– protection in access to resources and data.
20
Views of an Operating System
• There are three classical views (in literature)
1. Resource Manager – manages and allocates
resources.
2. Control program – controls the execution of user
programs and operations of I/O devices.
3. Command Executer – Provides an environment
for running user commands.
• But one more modern view: the Operating
System as a Virtual Machine.
21
1. Resource Manager
• Resource Manager:
– Manages and protects multiple computer resources: CPU,
Processes, Internal/External memory, Tasks, Applications,
Users, Communication channels, etc…
– Handles and allocates resources to multiple users or multiple
programs running at the same time and space (e.g., processor
time, memory, I/O devices).
– Decides between conflicting requests for efficient and fair
resource use (e.g., maximize throughput, minimize response
time).
• Sort of a bottom-up view.
22
OS as a Resource Manager
23
2. Control Program
• Control Program:
– Manages all the components of a complex
computer system in an integrated manner.
– Controls the execution of user programs and
I/O devices to prevent errors and improper
use of computer resources.
– Looks over and protects the computer:
Monitor, Supervisor, Executive, Controller,
Master, Coordinator ….
• Sort of a black box view.
24
3. Command Executer
• Command Executer:
– Interfaces between the users and machine.
– Supplies services/utilities to users.
– Provides the users with a convenient CLI
(Command Language Interface), also called
a Shell (in UNIX), for entering the user
commands.
25
Modern view: Virtual Machine (1)
• Operating System as a Virtual Machine:
– An interface between the user and hardware that
hides the details of the hardware.
– Constructs higher-level (virtual) resources out of
lower-level (physical) resources (e.g., files).
– Definition: OS is a collection of software
enhancements, executed on the bare hardware,
culminating in a high-level virtual machine that
serves as an advanced programming environment.
26
Modern view: Virtual Machine (2)
27
Why are Operating Systems Important?
• Important to understand and know how to correctly
use when writing user applications.
• Large and complex systems that have a high
economic impact and result in interesting problems
of management.
• Few actually involved in OS design and
implementation but nevertheless many general
techniques to be learned and applied.
• Combines concepts from many other areas of
Computer Science: Architecture, Languages,
Data Structures, Algorithms, etc.
28
Good Operating System
• Efficient
– time spent to execute its programs should be
short
• Small in size
– memory occupied should be as small as
possible
• Reliable
29
Special Features of OS
• Multi-tasking
• Multi-programming
• Parallel processing
• Buffering
• Spooling
30
Multi-tasking
• To handle 2 or more programs at the same
time from a single user ‘s perception
– CPU can only perform one task at a time,
however, it runs so fast that 2 or more jobs
seem to execute at the same time
31
Multi-programming
• 2 or more programs store in the main
memory at the same time
• when one job reeds to wait (e.g. I/O
operation), CPU switch to another job to
execute
• when the first job finishes waiting, CPU
will get back the first job to execute
32
Parallel Processing
• Use 2 or more CPUs to handle jobs
• Computer networking without multiprocessing
with multiprocessing Job 4
Job 3
Job 4
Job 2
time Job 3 time
Job 1
Job 1 Job 2
CPU 1 CPU 2 CPU 1 33
Buffering
• A temporary storage area (buffers) to read
data from input device or send data to the
output device
• Keep CPU busy
– because I/O operation is slow
34
Spooling
• A larger buffer from hard disk
• Buffer store the data through I/O operation
– because I/O operation is slow and CPU
operation is fast
35
Type of Operating System
• Batch processing
• Real time processing
• Time sharing processing
36
Batch processing
• Jobs, together with input data, are fed into
the system in a batch.
• The jobs are then run one after another.
• No job can be started until previous job is
completed
37
Real time processing
• Immediate response is needed.
• For example
– anti-missile defense system
– airplane landing control system
– interrupt error in computer system
38
Time sharing processing
• Each user is given a time slice to interact
with the CPU.
• The size of the time slice will depend on the
system.
• Each user is served in sequence.
39
40
Common Operating Systems and
Their Differences
• Network Operating System
– UNIX / Linux / MS Windows2000 Server
• Desktop Operating System
– MS Windows 9X/Me / Mac OS / DOS
• Mobile Operating System
– Palm OS and Pocket PC
41
Examples
• Common operating systems
– WINDOW
• used in IBM compatible microcomputers
– UNIX
• multi-user, multi-tasking OS used in minicomputers
and microcomputers
– VAX/VMS
• used in DEC’s VAX series of minicomputers
42
Different Types of Operating System
43
MS-DOS
• The Microsoft Disk Operating System, MS-DOS, is a traditional
microcomputer operating system that consists of four major components.
The Operating-system loader
- It brings the operating system from the startup into RAM.
The MS-DOS BIOS
- Loaded from the file [Link] during initialization.
- Layer that sits between operating system kernel and hardware.
The User Interface (shell)
- Conventional program that allows the user to interact with the
operating system.
- Default MS – DOS user interface is a shell program called
[Link].
The MS-DOS Kernel
- Heart of the operating system
- it is a proprietary program supplied by Microsoft corporation.
44
Windows 95
GUI Based
It was released on August 24, 1995 by Microsoft.
During development it was referred to as Windows 4.0
Intended to integrate Microsoft's formerly separate MS-
DOS
45
Windows 98
Graphical operating system by Microsoft.
It is the second major release in the Windows 9x line of
operating systems.
It was released to retail on June 25, 1998.
Windows 98 is the successor to Windows 95.
Monolithic product with an MS-DOS based boot loader.
46
Windows 2000
A line of operating systems produced by Microsoft for use on
personal computers, business desktops, laptops, and servers.
Released on 17 February 2000.
It was the successor to Windows NT 4.0
Final release of Microsoft Windows to display the "Windows
NT”.
Windows ME is designed for home use, while Windows 2000 is
designed for business.
47
WINDOWS XP
48
WINDOWS VISTA
Expressed in several variations developed by Microsoft for use on personal
computers, including home and business desktops, laptops, tablet PCs, and
media center PCs.
Development was completed on November 8, 2006
On January 30, 2007, it was released worldwide.
Came more than five years after the introduction of Windows XP
The longest time span between successive releases of Microsoft Windows
desktop operating systems.
49
WINDOWS 7
Windows 7 is a version of Microsoft Windows, a series of operating
systems produced by Microsoft for use on personal computers
Came in less than three years after the release of Windows Vista.
After Windows 7 Windows 8 came, then Windows 8, 8.1, Now ready
to release Windows 10.
50
Unix Operating System
• Manages the resources (CPU and I/O) present in the
computer
• Unix is a true multi-user operating system
• The primary user interface with Unix is through a
command line interface (terminal console)
• It has several GUI interfaces available, all built on X-
windows
• Integrated networking capabilities
• Unix was conceived at AT&T Bell Labs in the late 60’s
• The C language was developed shortly thereafter to
support Unix
• UC Berkeley created a new variant that included
networking in the late 70’s, known as BSD 51
History
• Multics – 1964
• Unics – 1969
• Minix – 1990
• Linux – 1991
52
Multics
• Multiplexed Information and Computing
Service
• Written in 1964
• Timesharing OS
• Last version was shut down on October 30,
2008
• Monolithic kernel
53
Unics
• Uniplexed Information and Computing System
• Later renamed as UNIX
• Written in 1969
• Ken Thompson, Dennis Ritchie were among
the developers
• Multi user, Multi tasking and timesharing
• Monolithic kernel
54
Minix
• Minimal Unix
• Tanenbaum developed this OS
• Mainly for educational purpose
• Unix like OS, implemented with Micro
kernel. So the name Minix
55
Linux
• Developed in 1991 by Linus Torvalds
• Used in most of the computers, ranging from super
computers to embedded system
• Multi user
• Multi tasking
• Time sharing
• Monolithic kernel
• Latest stable version of linux kernel – 2.6.28, released
on 24-Dec-2008
56
Thanks…
57